Hadoop MapReduce与YARN深入解析
1. 示例代码执行
示例的完整源代码可在 https://github.com/learninghadoop2/book-examples/blob/master/ch3/src/main/java/com/learninghadoop2/mapreduce/HashTagSentimentChain.java 找到。
使用以下命令执行 HashTagSentimentChain :
$ hadoop jar build/libs/mapreduce-example.jar com.learninghadoop2.mapreduce.HashTagSentimentChain twitter.txt output <positive words> <negative words>
执行后,你会看到与之前示例类似的输出,注意此时每行的主题标签会转换为小写。
2. MapReduce作业执行流程
2.1 启动阶段
在本地机器上运行的驱动程序调用 Job.waitForCompletion() 方法,开
超级会员免费看
订阅专栏 解锁全文
1223

被折叠的 条评论
为什么被折叠?



