詞頻統計任務程式設計實踐

软件拓荒人發表於2024-10-14

hadoop jar $HADOOP_HOME/share/hadoop/tools/lib/hadoop-streaming-3.3.4.jar \
-input /export/server/input \
-output /export/server/output \
-mapper "python /export/server/WordCount.py mapper" \
-reducer "python /export/server/WordCount.py reducer" \
-file /export/server/WordCount.py

hadoop fs -mkdir -p /export/server/input

hadoop fs -put wordfile1.txt /export/server/input/

hadoop fs -put wordfile2.txt /export/server/input/

cat /export/server/input/*

hadoop fs -cat /export/server/output/part-00000

相關文章