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

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 前端加access数据库
  • ¥15 ARCGIS 多值提取到点 ERROR 999999
  • ¥15 mysql异常断电, [MY-011971] [InnoDB]
  • ¥15 uni.onBluetoothDeviceFound熄屏不运行
  • ¥35 关于shodan搜索网络摄像头的各种方法详解
  • ¥15 求PHDA糖尿病并发症数据集,有偿
  • ¥15 为什么AVL fire DVI 界面里面的response Editor project 中的Summary result 点不了
  • ¥20 中标麒麟系统V4.0,linux3.10.0的内核,3A4000处理器,如何安装英伟达或AMD的显卡驱动,
  • ¥20 求文心中文心理分析系统(TextMind)
  • ¥15 chipyard环境搭建问题