jydoop/Makefile

45 строки
1.6 KiB
Makefile
Исходник Обычный вид История

HBASE_PATH ?= /usr/lib/hbase
SPACE := $(NULL) $(NULL)
HBASE_CP = $(subst $(SPACE),:,$(wildcard $(HBASE_PATH)/*.jar) $(wildcard $(HBASE_PATH)/lib/*.jar))
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
export HADOOP_CLASSPATH=jython-standalone-2.7-b1.jar:akela-0.5-SNAPSHOT.jar:jackson-core-2.1.4.jar
CP=$(HADOOP_CLASSPATH):$(HBASE_CP)
2013-03-07 09:12:37 +04:00
comma:=,
JAVA_SOURCE=$(addprefix org/mozilla/jydoop/,PythonWrapper.java PythonValue.java PythonKey.java HBaseDriver.java JacksonWrapper.java)
2013-03-13 23:12:53 +04:00
TASK=HBaseDriver
2013-03-13 10:33:49 +04:00
ARGS=input output
SCRIPT=$(error Must specify SCRIPT=)
TEST_PY=test.py
2013-03-13 23:12:53 +04:00
all: driver.jar
check: driver.jar
java -cp driver.jar:$(CP) org.python.util.jython $(TEST_PY)
2013-03-13 23:12:53 +04:00
run: driver.jar
java -cp driver.jar:$(CP) org.mozilla.jydoop.$(TASK)
2013-03-13 23:12:53 +04:00
hadoop: driver.jar
time hadoop jar $< org.mozilla.jydoop.$(TASK) -libjars $(subst :,$(comma),$(HADOOP_CLASSPATH)) $(ARGS)
out/pylib:
mkdir -p out
ln -s ../pylib out/pylib
out/scripts:
mkdir -p out
ln -s ../scripts out/scripts
driver.jar: out/scripts out/pylib $(wildcard scripts/*.py) $(wildcard pylib/*.py) $(JAVA_SOURCE)
javac -Xlint:deprecation -d out -cp $(CP) $(JAVA_SOURCE)
jar -cvf $@ -C out .
%.class: ../%.java
2013-03-18 19:45:52 +04:00
download:
2013-03-21 13:38:37 +04:00
wget -c http://repo1.maven.org/maven2/org/python/jython-standalone/2.7-b1/jython-standalone-2.7-b1.jar -O jython-standalone-2.7-b1.jar
wget -c http://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/2.1.4/jackson-core-2.1.4.jar -O jackson-core-2.1.4.jar
2013-03-21 13:38:37 +04:00
wget -c http://people.mozilla.org/~bsmedberg/akela-0.5-SNAPSHOT.jar -O akela-0.5-SNAPSHOT.jar