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"
|
2013-03-07 00:02:18 +04:00
|
|
|
# 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-07 00:02:18 +04:00
|
|
|
|
2013-03-13 23:12:53 +04:00
|
|
|
run: driver.jar
|
|
|
|
java -cp driver.jar:$(CP) taras.$(TASK)
|
2013-03-07 00:02:18 +04:00
|
|
|
|
2013-03-13 23:12:53 +04:00
|
|
|
hadoop: driver.jar
|
2013-03-14 04:45:35 +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)
|
2013-03-07 00:02:18 +04:00
|
|
|
|
2013-03-14 03:21:29 +04:00
|
|
|
driver.jar: out/CallJava.py $(JAVA_SOURCE)
|
2013-03-13 10:33:49 +04:00
|
|
|
javac -Xlint:deprecation -d out -cp $(CP) $(JAVA_SOURCE)
|
2013-03-07 00:02:18 +04:00
|
|
|
jar -cvf $@ -C out .
|
|
|
|
|
2013-03-13 23:12:53 +04:00
|
|
|
out/CallJava.py: $(SCRIPT)
|
2013-03-07 00:02:18 +04:00
|
|
|
mkdir -p out/script
|
2013-03-14 04:45:35 +04:00
|
|
|
ln -vf $< $@
|
2013-03-07 00:02:18 +04:00
|
|
|
|
|
|
|
%.class: ../%.java
|