java.io.IOException:无法在Hadoop二进制文件中找到可执行文件null\bin\winutils.exe [英] java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries
问题描述
$ bin / start-hbase.sh
2015-07-01 19:21:34,971错误[main] util.Shell:找不到在hadoop二进制路径中的winutils二进制文件
java.io.IOException:在Hadoop二进制文件中找不到可执行文件null \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
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)
在org.apache.hadoop.hbase.zookeeper.ZKServerTool.main(ZKServerTool.java:45)
您缺少winutils.exe,一个hadoop二进制文件。根据x64位/ x32位系统,下载winutils.exe文件&设置您的hadoop主页指向它。
第一种方式:
1.下载文件
2.在系统中创建hadoop文件夹,例如C:
$ b 3.在hadoop目录中创建bin文件夹例如:C :\ haddoop \ bin
4.在bin中输入winutils.exe:C:\ haddoop \ bin\winuitls.exe
5.系统属性中的用户变量 - >高级系统设置
创建新变量名称:HADOOP_HOME路径:C:\ hadoop \
第二种方式:
您可以使用以下命令直接在Java程序中设置hadoop home像这样:
System.setProperty(hadoop.home.dir,C:\hadoop);
$ 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)
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" );
这篇关于java.io.IOException:无法在Hadoop二进制文件中找到可执行文件null\bin\winutils.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!