Skip to content

Commit

Permalink
Make hadoop build OS agnostic
Browse files Browse the repository at this point in the history
Pass in file/path SEP variable to makefiles.
Do not use softlinks, especially pulled from GIT to windoze.
  • Loading branch information
cliffclick committed Jul 25, 2013
1 parent 14cf185 commit ac0a436
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ syn_datasets
target/
.settings/*
cypof*
typemap
/libpeerconnection.log
src/main/java/water/BuildVersion.java
hadoop/build.log
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ function build_src_jar() {

function build_hadoop() {
echo "building hadoop package..."
make -C hadoop
make -C hadoop SEP=${SEP} >& hadoop/build.log || ( grep failed hadoop/build.log ; exit 1 )
}

function build_javadoc() {
Expand Down
6 changes: 3 additions & 3 deletions hadoop/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ cdh3_JAR_DIR=../lib/hadoop/cdh3
cdh3_JARS=$(cdh3_JAR_DIR)/hadoop-core-0.20.2-cdh3u6.jar

cdh4_JAR_DIR=../lib/hadoop/cdh4
cdh4_JARS=$(cdh4_JAR_DIR)/hadoop-common.jar:$(cdh4_JAR_DIR)/hadoop-mapreduce-client-core-2.0.0-cdh4.2.0.jar
cdh4_JARS=$(cdh4_JAR_DIR)/hadoop-common.jar${SEP}$(cdh4_JAR_DIR)/hadoop-mapreduce-client-core-2.0.0-cdh4.2.0.jar

mapr2.1.3_JAR_DIR=../lib/hadoop/mapr2.1.3
mapr2.1.3_JARS=$(mapr2.1.3_JAR_DIR)/hadoop-0.20.2-dev-core.jar

# ------------------------------

COMMON_JARS=lib/log4j-1.2.15.jar:lib/h2o.jar
COMMON_JARS=../lib/log4j/log4j-1.2.15.jar${SEP}../target/h2o.jar
HADOOP_JARS=$($(HADOOP_VERSION)_JARS)

default: build

build_inner:
mkdir classes/$(HADOOP_VERSION)
javac -source 1.6 -target 1.6 -sourcepath src/main/java -classpath $(COMMON_JARS):$(HADOOP_JARS) -d classes/$(HADOOP_VERSION) src/main/java/water/hadoop/*.java
javac -source 1.6 -target 1.6 -sourcepath src/main/java -classpath "$(COMMON_JARS)${SEP}$(HADOOP_JARS)" -d classes/$(HADOOP_VERSION) src/main/java/water/hadoop/*.java
jar cf target/h2odriver_$(HADOOP_VERSION).jar -C classes/$(HADOOP_VERSION) .

clean:
Expand Down
1 change: 0 additions & 1 deletion hadoop/lib/h2o-sources.jar

This file was deleted.

1 change: 0 additions & 1 deletion hadoop/lib/h2o.jar

This file was deleted.

1 change: 0 additions & 1 deletion hadoop/lib/log4j-1.2.15.jar

This file was deleted.

0 comments on commit ac0a436

Please sign in to comment.