weixin_47882136 2022-04-24 18:59 采纳率: 100%
浏览 224
已结题

hadoop集群测试pi实例出错

2022-04-24 18:42:02,232 DEBUG security.UserGroupInformation: PrivilegedAction [as: ydh (auth:SIMPLE)][action: org.apache.hadoop.mapreduce.Job$1@58faa93b]
java.lang.Exception
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1875)
at org.apache.hadoop.mapreduce.Job.updateStatus(Job.java:330)
at org.apache.hadoop.mapreduce.Job.isComplete(Job.java:614)
at org.apache.hadoop.mapreduce.Job.monitorAndPrintJob(Job.java:1631)
at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1592)
at org.apache.hadoop.examples.QuasiMonteCarlo.estimatePi(QuasiMonteCarlo.java:307)
at org.apache.hadoop.examples.QuasiMonteCarlo.run(QuasiMonteCarlo.java:360)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:81)
at org.apache.hadoop.examples.QuasiMonteCarlo.main(QuasiMonteCarlo.java:368)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:71)
at org.apache.hadoop.util.ProgramDriver.run(ProgramDriver.java:144)
at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hadoop.util.RunJar.run(RunJar.java:323)
at org.apache.hadoop.util.RunJar.main(RunJar.java:236)

hadoop集群测试pi实例出错一直running没有结果,请问大家是什么问题

  • 写回答

1条回答 默认 最新

  • 吕布辕门 后端领域新星创作者 2022-04-24 19:09
    关注

    你好,我之前测试成功过,如有帮助,请采纳!

    然后进入到etc/hadoop 目录下,使用命令vim mapred-site.xml将路径添加到<property></property>标签,注意把路径中的:替换成,

    <property>
      <name>yarn.application.classpath</name>
      <value>/opt/hadoop-3.3.2/etc/hadoop,/opt/hadoop-3.3.2/share/hadoop/common/lib/*,/opt/hadoop-3.3.2/share/hadoop/common/*,/opt/hadoop-3.3.2/share/hadoop/hdfs,/opt/hadoop-3.3.2/share/hadoop/hdfs/lib/*,/opt/hadoop-3.3.2/share/hadoop/hdfs/*,/opt/hadoop-3.3.2/share/hadoop/mapreduce/*,/opt/hadoop-3.3.2/share/hadoop/yarn,/opt/hadoop-3.3.2/share/hadoop/yarn/lib/*,/opt/hadoop-3.3.2/share/hadoop/yarn/*
      </value>
    </property>
    

    配置修改完成后,保存退出。关闭集群(stop-all.sh),再打开集群(start-all.sh)。

    hadoop jar $HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-examples-3.3.2.jar pi 5 5
    

    运行成功.

    Estimated value of Pi is 3.6800000000000000000
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 5月3日
  • 已采纳回答 4月25日
  • 创建了问题 4月24日

悬赏问题

  • ¥15 Pythontxt文本可视化
  • ¥15 如何基于Ryu环境下使用scapy包进行数据包构造
  • ¥15 springboot国际化
  • ¥15 搭建QEMU环境运行OP-TEE出现错误
  • ¥15 Minifilter文件保护
  • ¥15 有限元软件终止时间超过设定值
  • ¥15 onvif框架引用一直报错
  • ¥50 C#和C++混合编程,使用CLR托管,报错System.Runtime.InteropServices.SEHException
  • ¥30 .NET使用sqlite发布后报错
  • ¥15 Unity在WebGL平台导出Word报错问题