java无法执行二进制文件,java.io.IOException:无法在Hadoop二进制文件中找到可执行文件null\bin\winutils.exe...

$ bin/start-hbase.sh

2015-07-01 19:21:34,971 ERROR [main] util.Shell: Failed to locate the winutils binary in the hadoop binary path

java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries.

at org.apache.hadoop.util.Shell.getQualifiedBinPath(Shell.java:355)

at org.apache.hadoop.util.Shell.getWinUtilsPath(Shell.java:370)

at org.apache.hadoop.util.Shell.(Shell.java:363)

at org.apache.hadoop.util.StringUtils.(StringUtils.java:78)

at org.apache.hadoop.conf.Configuration.getStrings(Configuration.java:1699)

at org.apache.hadoop.hbase.zookeeper.ZKConfig.makeZKProps(ZKConfig.java:113)

at org.apache.hadoop.hbase.zookeeper.ZKServerTool.main(ZKServerTool.java:45)

解决方案

You are missing winutils.exe, a hadoop binary. Depending upon x64 bit / x32 bit system, download the winutils.exe file & set your hadoop home pointing to it.

1st way :

1.Download the file

2.Create hadoop folder in Your System ex " C:"

3.Create bin folder in hadoop directory ex : C:\hadoop\bin

4.paste winutils.exe in bin ex: C:\hadoop\bin\winuitls.exe

5.In User Variables in System Properties -> Advance System Settings

Create New Variable Name: HADOOP_HOME Path: C:\hadoop\

2nd Way :

You can set hadoop home directly in Your Java Program with the following Command like this :

System.setProperty("hadoop.home.dir","C:\hadoop" );

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值