hadoop_zaliczenie/mr/python/wordcount.sh

13 lines
437 B
Bash
Raw Normal View History

2024-03-27 13:49:30 +01:00
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_zaliczenie/mr/python/mapper.py \
-reducer ~/hadoop_zaliczenie/mr/python/reducer.py \
-file ~/hadoop_zaliczenie/mr/python/mapper.py \
-file ~/hadoop_zaliczenie/mr/python/reducer.py
hdfs dfs -cat tmp/python/output/part-*