分享

hadoop执行jar时报错,求大神帮忙

qing_D7BWs 发表于 2017-9-9 00:56:18 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 1 4603
hadoop集群的hdfs和yan都运行正常,
namenode节点运行进程如下:
8773 DFSZKFailoverController
8472 NameNode
9264 Jps
8867 ResourceManager
datanode运行进程如下:
4180 DataNode
4378 NodeManager
2159 QuorumPeerMain
4500 Jps
4261 JournalNode
但是执行jar时报错,错误如下:
java.io.IOException: Cannot initialize Cluster. Please check your configuration for mapreduce.framework.name and the correspond server addresses.
        at org.apache.hadoop.mapreduce.Cluster.initialize(Cluster.java:120)
        at org.apache.hadoop.mapreduce.Cluster.<init>(Cluster.java:82)
        at org.apache.hadoop.mapreduce.Cluster.<init>(Cluster.java:75)
        at org.apache.hadoop.mapreduce.Job$9.run(Job.java:1260)
        at org.apache.hadoop.mapreduce.Job$9.run(Job.java:1256)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:415)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1746)
        at org.apache.hadoop.mapreduce.Job.connect(Job.java:1256)
        at org.apache.hadoop.mapreduce.Job.submit(Job.java:1284)
        at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1308)
        at com.demo.wordcount.RunJob.main(RunJob.java:38)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
求大神帮忙解决。

已有(1)人评论

跳转到指定楼层
nextuser 发表于 2017-9-9 08:17:19
修改mapred-site.xml,是否添加如下内容

<configuration>
<property>
  <name>mapreduce.framework.name</name>
  <value>yarn</value>
</property>
</configuration>

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条