hadoop历史服务器配置问题



作者:sdjnzqr
出处:http://www.cnblogs.com/sdjnzqr/
版权:本文版权归作者和博客园共有
转载:欢迎转载,但未经作者同意,必须保留此段声明;必须在文章中给出原文连接;否则必究法律责任

在mapred-site.xml中做如下配置:

 

<configuration>
  <property>    
    <name>mapreduce.framework.name</name>    
    <value>yarn</value>    
  </property>   
  <property>    
    <name>mapreduce.jobtracker.system.dir</name>    
    <value>file:///home/hadoop/mapred/system</value>     
  </property>    
  <property>    
    <name>mapreduce.cluster.local.dir</name>    
    <value>file:///home/hadoop/mapred/local</value>      
  </property>
   <property>    
    <name>mapreduce.jobtracker.staging.root.dir</name>    
    <value>file:///home/hadoop/mapred/staging</value>      
  </property>
  <property>
  <name>mapreduce.jobhistory.address</name>
  <value>master:10020</value>
  </property>
  <property>
  <name>mapreduce.jobhistory.webapp.address</name>
  <value>master:19888</value>
  </property>
  <property>
<name>yarn.app.mapreduce.am.staging-dir</name>
<value>file:///home/hadoop/mapred/staging</value>
</property>
</configuration>

发现此时运行mapreduce程序的时候报错:

<P>Wrong FS: 
file:/home/hadoop/mapred/staging/hadoop/.staging/job_1406217900097_0003, 
expected: hdfs://master</P>

 

原因是:yarn.app.mapreduce.am.staging-dir和mapreduce.jobtracker.staging.root.dir相同,导致的,去掉配置,即可解决问题。

<configuration>
  <property>    
    <name>mapreduce.framework.name</name>    
    <value>yarn</value>    
  </property>   
  <property>    
    <name>mapreduce.jobtracker.system.dir</name>    
    <value>file:///home/hadoop/mapred/system</value>     
  </property>    
  <property>    
    <name>mapreduce.cluster.local.dir</name>    
    <value>file:///home/hadoop/mapred/local</value>      
  </property>
   <property>    
    <name>mapreduce.jobtracker.staging.root.dir</name>    
    <value>file:///home/hadoop/mapred/staging</value>      
  </property>
  <property>
  <name>mapreduce.jobhistory.address</name>
  <value>master:10020</value>
  </property>
  <property>
  <name>mapreduce.jobhistory.webapp.address</name>
  <value>master:19888</value>
  </property>
</configuration>
posted @ 2014-07-24 16:39  正正杂说  阅读(822)  评论(0编辑  收藏  举报