• hadoop2.7.2运行例子时报错


    1.运行的时候报错
    Exception in thread "main" java.lang.NullPointerException
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1010)
    at org.apache.hadoop.util.Shell.runCommand(Shell.java:483)
    at org.apache.hadoop.util.Shell.run(Shell.java:456)
    at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:722)
    at org.apache.hadoop.util.Shell.execCommand(Shell.java:815)
    at org.apache.hadoop.util.Shell.execCommand(Shell.java:798)
    at org.apache.hadoop.fs.RawLocalFileSystem.setPermission(RawLocalFileSystem.java:731)
    at org.apache.hadoop.fs.RawLocalFileSystem.mkOneDirWithMode(RawLocalFileSystem.java:489)
    at org.apache.hadoop.fs.RawLocalFileSystem.mkdirsWithOptionalPermission(RawLocalFileSystem.java:529)
    at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:507)
    at org.apache.hadoop.fs.FilterFileSystem.mkdirs(FilterFileSystem.java:305)
    at org.apache.hadoop.mapreduce.JobSubmissionFiles.getStagingDir(JobSubmissionFiles.java:133)
    at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:144)
    at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1290)
    at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1287)
    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:1657)
    at org.apache.hadoop.mapreduce.Job.submit(Job.java:1287)
    at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1308)
    at com.xiaoskery.hadoop.examples.WordCount.main(WordCount.java:87)
    缺少hadoop.dll,把这个文件拷贝到C:WindowsSystem32下面即可。

    2.报错
    java.io.IOException: Could not locate executable nullinwinutils.exe in the Hadoop binaries.
    因为没有设置HADOOP_HOME,在windows上需要重启,或者在代码中设置:System.setProperty("hadoop.home.dir", "E:\Work\hadoop-2.7.2");

    3.报错
    org.apache.hadoop.security.AccessControlException:Permission denied:user=Administrator,access=WRITE,inode="tmp":root:supergroup:rwxr-xr-x 。

    去掉权限校验
    修改hdfs-site.xml
    <property>
    <name>dfs.permissions</name>
    <value>false</value>
    </property>

    4.hadoop eclipse插件

    Map/Reduce(V2) master,port对应的是yarn-site.xml中的yarn.resourcemanager.scheduler.address的值

    DFS master port对应的是core-site.xml中的fs.defaultFS的值

    5.如何运行的时候没有报错信息,但是又不成功

    拷贝一个log4j.properties文件到classpath目录,即可看到未输出的错误日志

  • 相关阅读:
    使用textarea标签按Enter键后web页面中成换行 vue
    关于json数组对象和对象数组遇到的一些问题
    vue.js实现checkbox的全选和反选
    关于arcgis js 中要素更新的问题
    C# 图片上传问题
    arcgis js 几种拓扑关系详解
    ISS部署网站--HTTP 错误 404.17
    ADODB.Stream在进行文件上传时报错
    window.open 打开Excel或者Word 无权限问题
    Aspose.cell生成表格
  • 原文地址:https://www.cnblogs.com/xiaoskery/p/5648171.html
Copyright © 2020-2023  润新知