八、日誌彙集服務

Log Aggregation

日誌彙集node

sudo gedit etc/hadoop/yarn-site.xml

增長如下配置信息啓動日誌服務器服務器

<property>
    <name>yarn.nodemanager.aux-services</name>
    <value>mapreduce_shuffle</value>
</property>

<property>
    <name>yarn.resourcemanager.hostname</name>
    <value>hw-TM1612</value>
</property>
##  是否開啓日誌彙集服務
<property>
    <name>yarn.log-aggregation-enable</name>
    <value>true</value>
</property>
##  日誌保存時間 7天
<property>  
    <name>yarn.log-aggregation.retain-seconds</name>
    <value>640800</value>
</property>

從新啓動yarn服務oop

sudo sbin/yarn-daemon.sh stop resourcemanager
 sudo sbin/yarn-daemon.sh stop nodemanager
 sudo sbin/mr-jobhistory-daemon.sh stop historyserver
 sudo sbin/yarn-daemon.sh start resourcemanager
 sudo sbin/yarn-daemon.sh start nodemanager
 sudo sbin/mr-jobhistory-daemon.sh start historyserver
 sudo bin/yarn jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.6.0-cdh5.5.0.jar wordcount /user/hw/mapreduce/wordcount/input/ /user/hw/mapreduce/wordcount/output2
相關文章
相關標籤/搜索