之前在mac上调试hadoop程序(mac之前配置过hadoop环境)一直都是正常的。因为工作需要,需要在windows上先调试该程序,然后再转到linux下。程序运行的过程中,报Failed to locate the winutils binary in the hadoop binary path java.io.IOException: Could not locate executable
null
binwinutils.exe in the Hadoop binaries.
Winutils free download - WinUtilities Professional Edition, WinUtilities Free Undelete, WinUtilities Free Memory Optimizer, and many more programs. Cloud Hadoop Scaling Apache Spark Apache Spark 2.4 for Big Data Applications Machine Learning and Data Science Series Spark as a Data Science Tool.
- 之前在mac上调试hadoop程序(mac之前配置过hadoop环境)一直都是正常的。因为工作需要,需要在windows上先调试该程序,然后再转到linux下。程序运行的过程中,报Failed to locate the winutils binary in the hadoop binary path java.io.IOException: Could not locate executab.
- This post enumerates the steps necessary to setup Atlas development environment using IntelliJ on Mac and Windows. This setup uses the BerkeleyDB for backend and embedded Solr as index engine. Setup with other backend and index engine variations are similar but will involve additional setup.
通过断点调试、查看源码发现程序需要根据HADOOP_HOME找到winutils.exe,由于win机器并没有配置该环境变量,所以程序报 nullbinwinutils.exe。
privatestatic String HADOOP_HOME_DIR = checkHadoopHome();
找到原因后就去网上问了度娘,找到了解决方案,很简单,如下:
1.下载winutils的windows版本
GitHub上,有人提供了winutils的windows的版本,项目地址是:https://github.com/srccodes/hadoop-common-2.2.0-bin,直接下载此项目的zip包,下载后是文件名是hadoop-common-2.2.0-bin-master.zip,随便解压到一个目录
2.配置环境变量
Hadoop Windows Winutils
增加用户变量HADOOP_HOME,值是下载的zip包解压的目录,然后在系统变量path里增加$HADOOP_HOMEbin 即可。
再次运行程序,正常执行。