history server配置:
mapred-site.xml

<!-- 指定mapreduce运行在yarn上 -->
    <property>
        <name>mapreduce.framework.name</name>
        <value>yarn</value>
    </property>
    <!-- 历史服务器地址 -->
    <property>
        <name>mapreduce.jobhistory.address</name>
        <value>hadoop-4:10020</value>
    </property>
    <!-- 历史服务器web端地址 -->
    <property>
        <name>mapreduce.jobhistory.webapp.address</name>
        <value>hadoop-4:19888</value>
    </property>

yarn-site.xml

<!--日志聚集-->
 <property>
   <name>yarn.log-aggregation-enable</name>
   <value>true</value>
 </property>
<!--日志聚集服务器地址-->
 <property>
   <name>yarn.log.server.url</name>
   <value>http://hadoop-4:19888/jobhistory/logs</value>
 </property>
<!--日志保留时间-->
 <property>
   <name>yarn.log-aggregation.retain-seconds</name>
   <value>6048000</value>
 </property>

启动history server
mapred --daemon start historyserver
history server web端
http://hadoop-4:19888/jobhistory


馒头
8 声望0 粉丝

java工程师