jydoop/Makefile

29 строки
961 B
Makefile
Исходник Обычный вид История

2013-03-13 23:12:53 +04:00
#javac -classpath HBaseDriver.java -d out -Xlint:deprecation && jar -cvf taras.jar -C out/ .
2013-03-07 09:12:37 +04:00
export HADOOP_USER_CLASSPATH_FIRST="true"
# this will need to change once more jars are added
2013-03-13 10:33:49 +04:00
export HADOOP_CLASSPATH=jython-2.7b1.jar:jyson-1.0.2.jar:akela-0.5-SNAPSHOT.jar
CP=$(HADOOP_CLASSPATH):/usr/lib/hbase/lib/hadoop-core.jar:/usr/lib/hive/lib/commons-cli-1.2.jar:/usr/lib/hbase/hbase-0.90.6-cdh3u4.jar
2013-03-07 09:12:37 +04:00
comma:=,
2013-03-13 23:12:53 +04:00
JAVA_SOURCE=HDFSDriver.java PythonWrapper.java HBaseDriver.java
TASK=HBaseDriver
2013-03-13 10:33:49 +04:00
ARGS=input output
2013-03-13 23:12:53 +04:00
SCRIPT=CallJava.py
all: driver.jar
2013-03-13 23:12:53 +04:00
run: driver.jar
java -cp driver.jar:$(CP) taras.$(TASK)
2013-03-13 23:12:53 +04:00
hadoop: driver.jar
2013-03-07 09:12:37 +04:00
-hadoop fs -rmr /user/tglek/output
2013-03-13 10:33:49 +04:00
time hadoop jar $< taras.$(TASK) -libjars $(subst :,$(comma),$(HADOOP_CLASSPATH)) $(ARGS)
driver.jar: out/CallJava.py $(JAVA_SOURCE)
2013-03-13 10:33:49 +04:00
javac -Xlint:deprecation -d out -cp $(CP) $(JAVA_SOURCE)
jar -cvf $@ -C out .
2013-03-13 23:12:53 +04:00
out/CallJava.py: $(SCRIPT)
mkdir -p out/script
ln $< $@
%.class: ../%.java