麻烦与cygwin和hadoop 2.6.1 - null \ bin \ winutils.exe

时间:2015-10-07 19:26:52

标签: hadoop cygwin hbase

我想在cygwin64上运行hadoop 2.6.1。 (后来我也想运行hBsae) 问题是,我开始start-dfs.sh,我会得到这个例外:

 15/10/07 21:13:54 ERROR 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.GenericOptionsParser.preProcessForWindows(GenericOptionsParser.java:438)
    at org.apache.hadoop.util.GenericOptionsParser.parseGeneralOptions(GenericOptionsParser.java:484)
    at org.apache.hadoop.util.GenericOptionsParser.<init>(GenericOptionsParser.java:170)
    at org.apache.hadoop.util.GenericOptionsParser.<init>(GenericOptionsParser.java:153)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:64)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
    at org.apache.hadoop.hdfs.tools.GetConf.main(GetConf.java:331)

好的,我知道这是一个众所周知的问题,本论坛中的一些解决方案说明了将HADOOP_HOME添加到环境中的问题。但问题仍然存在。 这是我的bash_profile

的片段
# cygwin path translation

export JAVA_HOME=$(cygpath -u $(cygpath -m -s "${JAVA_HOME}"))
export HADOOP_PREFIX=/home/user/hadoop-2.6.1

export PATH=$PATH:$(cygpath -u $(cygpath -m -s "${JAVA_HOME}\bin")):/home/user/hadoop-2.6.1/bin
export HADOOP_INSTALL=/home/user/hadoop-2.6.1

export HADOOP_HOME=/home/user/hadoop-2.6.1/
export HADOOP_MAPRED_HOME=$HADOOP_INSTALL
export HADOOP_COMMON_HOME=$HADOOP_INSTALL
export HADOOP_HDFS_HOME=$HADOOP_INSTALL
export YARN_HOME=$HADOOP_INSTALL
export HADOOP_COMMON_LIB_NATIVE_DIR=/home/user/hadoop-2.6.1/lib/native
export PATH=$PATH:$HADOOP_INSTALL/sbin
export PATH=$PATH:$HADOOP_INSTALL/bin

echo $HADOOP_HOME也会打印路径。但为什么winutils的路径不完整?或者我有一个可变的变量吗?

问候

1 个答案:

答案 0 :(得分:1)

您应该在PATH(环境变量)中设置winutils.exe。