Last active
December 24, 2015 07:59
-
-
Save matthayes/6767077 to your computer and use it in GitHub Desktop.
DataFu's Hourglass: Quick Start
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone git://git.apache.org/incubator-datafu.git datafu | |
cd datafu/contrib/hourglass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm temp.avro | |
hadoop fs -copyToLocal /output/20130315/part-r-00000.avro temp.avro | |
java -jar lib/test/avro-tools-jar-1.7.4.jar tojson temp.avro | head |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ant jar | |
ant testjar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export LIBJARS=$(find "lib/common" -name '*.jar' | xargs echo | tr ' ' ',') | |
export LIBJARS=$LIBJARS,$(find "build" -name '*.jar' | xargs echo | tr ' ' ',') | |
export HADOOP_CLASSPATH=`echo ${LIBJARS} | sed s/,/:/g` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hadoop jar build/datafu-hourglass-test.jar generate -libjars ${LIBJARS} /data/event 2013/03/01-2013/03/14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hadoop fs -copyToLocal /data/event/2013/03/01/part-00000.avro temp.avro | |
java -jar lib/test/avro-tools-jar-1.7.4.jar tojson temp.avro | head |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hadoop jar build/datafu-hourglass-test.jar countbyid -libjars ${LIBJARS} /data/event /output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm temp.avro | |
hadoop fs -copyToLocal /output/20130314/part-r-00000.avro temp.avro | |
java -jar lib/test/avro-tools-jar-1.7.4.jar tojson temp.avro | head |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hadoop jar build/datafu-hourglass-test.jar generate -libjars ${LIBJARS} /data/event 2013/03/15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hadoop jar build/datafu-hourglass-test.jar countbyid -libjars ${LIBJARS} /data/event /output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment