Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: CDH5b1
-
Fix Version/s: CDH5.0.0
-
Component/s: Hadoop Common
-
Labels:None
-
Environment:Client: Windows; Server CentOS
Description
Initialization of the class Shell on the client required "wintuil.exe", even so the executable is not used afterwards. The following exception is shown in the log:
10:02:13,492 [main] ERROR 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:278) at org.apache.hadoop.util.Shell.getWinUtilsPath(Shell.java:300) at org.apache.hadoop.util.Shell.<clinit>(Shell.java:293) at org.apache.hadoop.util.StringUtils.<clinit>(StringUtils.java:76) at org.apache.hadoop.conf.Configuration.getTrimmedStrings(Configuration.java:1546) at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:556) at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:490) at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:136) at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2433) at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:88) at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2467) at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2449) at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:367) at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:166) ....
The following workaround allows to get rid of this message:
File workaround = new File("."); System.getProperties().put("hadoop.home.dir", workaround.getAbsolutePath()); new File("./bin").mkdirs(); new File("./bin/winutils.exe").createNewFile();
but I suggest to change the code to avoid checking for winutil.exe in case of Windows client.