source: proiecte/HadoopJUnit/Makefile

Last change on this file was 120, checked in by (none), 14 years ago

Added the mail files for the Hadoop JUNit Project

  • Property svn:executable set to *
File size: 980 bytes
Line 
1BIN := classes
2HADOOP_DIR := hadoop-0.20.1
3HADOOP_CONF := $(HADOOP_DIR)/conf
4HADOOP_BIN := $(HADOOP_DIR)/bin
5HADOOP_LOGS := $(HADOOP_DIR)/logs
6
7JAR_FILE := junit-runner-0.1.jar
8HADOOP_JARS := $(shell find . -name \*.jar | tr '\n' ':')
9HADOOP_OPTS := -Dhadoop.log.dir=$(HADOOP_LOGS) -Dhadoop.log.file=hadoop.log -Dhadoop.home.dir=$(HADOOP_DIR) -Dhadoop.id.str= -Dhadoop.root.logger=INFO,console
10# conf/ dir should be in class path (ref. org.apache.hadoop.conf.Configuration)
11CLASSPATH := $(CLASSPATH):$(BIN)/:$(HADOOP_JARS):$(HADOOP_CONF)
12
13run: build
14        rm -rf /tmp/junit_*
15        java -Xmx1000m $(HADOOP_OPTS) org.junit.runner.JUnitCore TestAdd
16
17build:
18        javac src/*.java -d $(BIN)/
19        jar cf $(JAR_FILE) $(BIN)/Hadoop*.class $(BIN)/Base64.class
20
21clean:
22        rm -rf $(BIN)/*
23
24# setup hadoop
25setup: shutdown
26        sudo rm -rf /tmp/hadoop*
27        rm -rf $(HADOOP_LOGS)/*
28        $(HADOOP_BIN)/hadoop namenode -format
29        $(HADOOP_BIN)/start-all.sh
30       
31shutdown:
32        $(HADOOP_BIN)/stop-all.sh
33#sudo killall -9 java || true
34
Note: See TracBrowser for help on using the repository browser.