java.io.IOException: Could not locate executable n

2019-08-10 03:36发布

$ 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.<clinit>(Shell.java:363)
        at org.apache.hadoop.util.StringUtils.<clinit>(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)

1条回答
别忘想泡老子
2楼-- · 2019-08-10 04:28

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" );
查看更多
登录 后发表回答