13 lines
421 B
Bash
13 lines
421 B
Bash
hdfs dfs -mkdir -p tmp/python
|
|
hdfs dfs -rm -r tmp/python/output
|
|
yarn jar /usr/lib/hadoop/hadoop-streaming.jar \
|
|
-D mapred.reduce.tasks=2 \
|
|
-input tmp/books \
|
|
-output tmp/python/output \
|
|
-mapper ~/hadoop_sorted/mr/python/mapper.py \
|
|
-reducer ~/hadoop_sorted/mr/python/reducer.py \
|
|
-file ~/hadoop_sorted/mr/python/mapper.py \
|
|
-file ~/hadoop_sorted/mr/python/reducer.py
|
|
|
|
hdfs dfs -cat tmp/python/output/part-*
|