1:问题出现的原因,部署好的hadoop-2.6.4进行window10操作hadoop api出现的错误,具体错误是我向hdfs上传文件,还好点,之前解决过,这里不叙述,这里说一下从hdfs下载文件出现的错误:

详细错误如下所示:

java.lang.NullPointerException
at java.lang.ProcessBuilder.start(Unknown Source)
at org.apache.hadoop.util.Shell.runCommand(Shell.java:)
at org.apache.hadoop.util.Shell.run(Shell.java:)
at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:)
at org.apache.hadoop.util.Shell.execCommand(Shell.java:)
at org.apache.hadoop.util.Shell.execCommand(Shell.java:)
at org.apache.hadoop.fs.RawLocalFileSystem.setPermission(RawLocalFileSystem.java:)
at org.apache.hadoop.fs.FilterFileSystem.setPermission(FilterFileSystem.java:)
at org.apache.hadoop.fs.ChecksumFileSystem.create(ChecksumFileSystem.java:)
at org.apache.hadoop.fs.ChecksumFileSystem.create(ChecksumFileSystem.java:)
at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:)
at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:)
at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:)
at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:)
at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:)
at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:)
at org.apache.hadoop.fs.FileSystem.copyToLocalFile(FileSystem.java:)
at org.apache.hadoop.fs.FileSystem.copyToLocalFile(FileSystem.java:)
at org.apache.hadoop.fs.FileSystem.copyToLocalFile(FileSystem.java:)
at com.bie.lesson01.HdfsClientTest.downloadFile(HdfsClientTest.java:)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$.runReflectiveCall(FrameworkMethod.java:)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:)
at org.junit.runners.ParentRunner$.run(ParentRunner.java:)
at org.junit.runners.ParentRunner$.schedule(ParentRunner.java:)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:)
at org.junit.runners.ParentRunner.access$(ParentRunner.java:)
at org.junit.runners.ParentRunner$.evaluate(ParentRunner.java:)
at org.junit.runners.ParentRunner.run(ParentRunner.java:)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:)

确实如很多网友说的:
出现原因:缺少hadoop.dll或winutils.exe

解决办法:缺少哪个,就在本地的E:\hadoop\hadoop-2.6.4\bin下加上哪个。
而这个方法,貌似不好使,经过亲自测试,解决方法如下所示:

在你的bin目录里面加上这两个文件,然后呢,在你的C:\Windows\System32加上hadoop.dll就可以解决上面出现的错误。

而且可以完成你想要完成的操作:

资源下载地址:http://download.csdn.net/download/biexiansheng/10132712

停更......

2017-11-25 17:28:05

java.lang.NullPointerException at java.lang.ProcessBuilder.start(Unknown Source) at org.apache.hadoop.util.Shell.runCommand(Shell.java:482)的更多相关文章

  1. 执行Hive时出现org.apache.hadoop.util.RunJar.main(RunJar.java:136) Caused by: java.lang.NumberFormatException: For input string: "1s"错误的解决办法(图文详解)

    不多说,直接上干货 问题详情 [kfk@bigdata-pro01 apache-hive--bin]$ bin/hive Logging initialized -bin/conf/hive-log ...

  2. at org.apache.hadoop.util.RunJar.main(RunJar.java:153)

    关于手动编译hadoop入门例子WordCount并执行 之前做的例子都是用hadoop中已经编译好jar包来运行示例的但是这次想要手动编译个实例,练下手没想到还是遇到点了小困难 [root@cent ...

  3. java.lang.UnsatisfiedLinkError: org.apache.hadoop.util.NativeCrc32.nativeComputeChunkedSumsByteArray(II[BI[BIILjava/lang/String;JZ)V

    环境: Spark2.1.0 .Hadoop-2.7.5   代码运行系统:Win 7在运行Spark程序写出文件(savaAsTextFile)的时候,我遇到了这个错误: // :: ERROR U ...

  4. Exceptionin thread "main" java.lang.UnsatisfiedLinkError:org.apache.hadoop.util.NativeCrc32.nativeComputeChunkedSumsByteArray(II[BI[BIILjav

    在eclipse上运行hadoop报错:Exceptionin thread "main" java.lang.UnsatisfiedLinkError:org.apache.ha ...

  5. win7上代码连接hadoop出现错误 :org.apache.hadoop.util.NativeCrc32.nativeComputeChunkedSumsByteArray(II[BI[BIILjava/lang/String;JZ)V

    在idea和eclipse中调试hadoop中hdfs文件,之前好好的,结果突然就出现java.lang.UnsatisfiedLinkError: org.apache.hadoop.util.Na ...

  6. hadoop错误Ignoring exception during close for org.apache.hadoop.mapred.MapTask$NewOutputCollector@17bda0f2 java.io.IOException Spill failed

    1.错误    Ignoring exception during close for org.apache.hadoop.mapred.MapTask$NewOutputCollector@17bd ...

  7. Exceptionin thread "main" java.lang.UnsatisfiedLinkError:org.apache.hadoop.util.NativeCrc32.nativeComputeChunkedSumsByteArray(II[BI[BIILjava

    这是由于hadoop.dll 版本问题,2.4之前的和自后的需要的不一样 需要选择正确的版本并且在 Hadoop/bin和 C:\windows\system32 上将其替换

  8. [bug] Window远程连接hdfs错误:java.lang.UnsatisfiedLinkError: org.apache.hadoop.util.NativeCrc32.nativeComput

    原因 hadoop.dll 版本问题 解决 查询远程主机中hadoop版本,下载相同或稍高版本的hadoop.dll,将下载的 hadoop.dll 复制到windows系统的c:/window/sy ...

  9. Exception in thread "main" java.io.IOException: Mkdirs failed to create /var/folders/q0/1wg8sw1x0dg08cmm5m59sy8r0000gn/T/hadoop-unjar6090005653875084137/META-INF/license at org.apache.hadoop.util.Run

    在使用hadoop运行jar时出现. 解决方法 zip -d Test.jar LICENSE zip -d Test.jar META-INF/LICENSE 完美解决.

随机推荐

  1. mysql死锁-查询锁表进程-分析锁表原因【转】

    查询锁表进程: 1.查询是否锁表 show OPEN TABLES where In_use > 0;   2.查询进程     show processlist   查询到相对应的进程===然 ...

  2. Git学习笔记02-创建版本库

    版本库就是一个目录,这个目录里面的所有文件都会被Git管理,每个文件的修改,删除都能追踪.以便在某个时刻追踪历史记录,或者还原 路径切换,查看文件命令和linux差不多,cd 文件路径  ls查看路径 ...

  3. 修改Linux主机名与IP之间的映射关系

    linux主机版本: Distributor ID: UbuntuDescription: Ubuntu 14.10Release: 14.10 一.修改linux主机名 1.使用hostname命令 ...

  4. 几种 WebP 动态图制作方法

    1.RealWorld Paint 目前唯一有图形用户界面的 动态 webp 编辑器, 利用最新版本 libwebp v1.0.0 生成的有损动态图是打不开.这个有两个版本, 推荐使用 2013.1, ...

  5. (常用)loogging模块及(项目字典)

    loogging模块 '''import logging logging.debug('debug日志') # 10logging.info('info日志')   # 20logging.warni ...

  6. java压缩图片质量

    使用了工具thumbnailator,据说thumbnailator是一个非常好的图片开源工具,使用起来很方便.不过没仔细看过,我只是需要压缩图片,让其占用空间变小而已.使用maven引入jar包 & ...

  7. https openssl http2

    2018-3-21 10:27:45 星期三 参考: 对https, http2的解释 总结: 生成自有证书(非第三方证书颁发公司) 我使用的是gitbash工具, 命令为: $ openssl re ...

  8. 2)实现github自动登陆获取信息

    # -*- coding:utf-8 -*- # __author__ = 'lixiang' # 实现github自动登陆和获取数据 import requests from bs4 import ...

  9. Confluence 6 配置字符集编码

    Confluence 和你的数据库必须配置使用相同的字符集.为了避免字符出现问题,请将所有的字符集设置为使用 UTF-8 编码(或者根据你配置的数据库来制定正确的 UTF-8 编码字符集,例如在 Or ...

  10. Swift中使用oc代码桥接设置

    1 将oc的代码拖入项目中 2 新建一个头文件 在头文件中导入你想用的oc头文件  import "****.h" 3 在设置build Setting 中搜索bird 找到 Ob ...