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

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日

悬赏问题

  • ¥100 房产抖音小程序苹果搜不到安卓可以付费悬赏
  • ¥15 STM32串口接收问题
  • ¥15 腾讯IOA系统怎么在文件夹里修改办公网络的连接
  • ¥15 filenotfounderror:文件是存在的,权限也给了,但还一直报错
  • ¥15 MATLAB和mosek的求解问题
  • ¥20 修改中兴光猫sn的时候提示失败
  • ¥15 java大作业爬取网页
  • ¥15 怎么获取欧易的btc永续合约和交割合约的5m级的历史数据用来回测套利策略?
  • ¥15 有没有办法利用libusb读取usb设备数据
  • ¥15 为什么openeluer里面按不了python3呢?