If we directly take the binary distribution of Apache Hadoop 2.2.0 release and try to run it on Microsoft Windows, then we'll encounter ERROR util.Shell: Failed to locate the winutils binary in the hadoop binary path.In the previous post - Build, Install, Configure and Run Apache Hadoop 2.2.0 in Microsoft Windows OS, I have already described how to build Windows distribution of Apache Hadoop 2.2.0. But if you are feeling little bit lazy to perform all the lengthy steps described there and want to get started with Hadoop quickly by-passing those steps, then this is the post worth looking into.
Winutils.exe Hadoop 2.7
16/04/03 19:59:10 ERROR util.Shell: Failed to locate the winutils binary in the hadoop binary path java.io.IOException: Could not locate executable C: hadoop bin winutils.exe in the Hadoop binaries. 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. Winutils.exe are required for hadoop to perform hadoop related commands. Please download hadoop-common-2.2.0 zip file. Winutils.exe can be found in bin folder. Extract the zip file and copy it in the local hadoop/bin folder. Step 3: Set the System level environment variable HADOOPHOME=C: winutilshadoop and include it in PATH as well (include the name till bin when adding to PATH) Step 4: Run the cmd prompt as Administrator and execute the command-winutils.exe chmod -R 777 C: tmp hive. Ensure you have the folder c: tmp hive.
Tools and Technologies used in this article :
Problem
Command Prompt
Why?
The binary distribution of Apache Hadoop 2.2.0 release does not contain some windows native components (like winutils.exe, hadoop.dll etc). These are required (not optional) to run Hadoop on Windows.
Quick Solution
For this post only, I have separately built hadoop-common-project to generate all the required native components. (Assuming you are using default Apache Hadoop 2.2.0 binary distribution) just download and copy all the files of hadoop-common-2.2.0/bin folder and paste them to /bin folder. And Enjoy!!!
Note : It is highly recommended to build Hadoop Windows binary distribution of your own.
Download SrcCodes
Winutils.exe
Prebuilt hadoop-common-2.2.0/bin is available on GitHub.