Created
July 30, 2014 11:58
-
-
Save papercompute/245a8405b97b0b1b3679 to your computer and use it in GitHub Desktop.
hadoop Makefile
This file contains hidden or 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
| TARGET_JAR = SumCount | |
| TARGET_CLASS = $(TARGET_JAR) | |
| INPUT = input.txt | |
| OUTPUT = output | |
| all:$(TARGET_JAR) | |
| $(TARGET_JAR): | |
| javac -cp "`hadoop classpath`" *.java -d classes | |
| jar -cvf $(TARGET_JAR).jar -C classes ./ | |
| run: | |
| rm -rf $(OUTPUT) | |
| hadoop jar $(TARGET_JAR).jar $(TARGET_CLASS) $(INPUT) $(OUTPUT) | |
| cat $(OUTPUT)/part-r-00000 | |
| res: | |
| cat $(OUTPUT)/part-r-00000 | |
| clean: | |
| rm -rf *.jar | |
| rm -rf *~ *class |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment