win7运行mapreduce报错Could not locate executable nullbinwinutils
发布时间:2020-09-21 19:00:20 所属栏目:Windows 来源:互联网
导读:我们在本地(windows)运行mapreduce或者habase程序时,可能会出现如下错误: Could not locate executable nullbinwinutils.exe in the Hadoop binaries.Failed to locate the winutils binary in the hadoop binary path 这是因为hadoop主要是在L
|
我们在本地(windows)运行mapreduce或者habase程序时,可能会出现如下错误:
Could not locate executable nullbinwinutils.exe in the Hadoop binaries. Failed to locate the winutils binary in the hadoop binary path 这是因为hadoop主要是在Linux环境上运行的,对windows支持不是特别好。解决方法: 1)下载winutils.exe:GitHub上,有人提供了winutils的windows的版本,项目地址是:https://github.com/srccodes/hadoop-common-2.2.0-bin直接下载此项目的zip包,下载后是文件名是hadoop-common-2.2.0-bin-master.zip,随便解压到一个目录。 或者: 2)设置环境变量: 增加用户变量HADOOP_HOME,值是下载的zip包解压的目录,然后在系统变量path里增加$HADOOP_HOMEbin 即可。 最后,需要重启windows后,再次运行程序即可。 我们在hadoop源码中发现 private static String checkHadoopHome() {
// first check the Dflag hadoop.home.dir with JVM scope
String home = System.getProperty("hadoop.home.dir");
// fall back to the system/user-global env variable
if (home == null) {
home = System.getenv("HADOOP_HOME");
}
...
}
如果觉得添加环境变量的步骤操作很繁琐 ,也可以直接在代码里加上: System.setProperty("hadoop.home.dir","D:Program Fileshadoop-2.5.1"); (编辑:长春站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- windows-mobile – Visual Studio 2010 Professional Beta
- 无法找到MSVCP120D.DLL或0x00007启动错误的解决方法
- NonSerialized 字段如果在dll 中读到数据写入MonoClassFiel
- .net – 为什么我无法在2.0.0.0播放器框架中重用1.8.2.2 Pl
- 2018-5-12 windows 动态链接文件 .dll
- api – Windows Phone应用程序中的捐赠
- https – 如何在非Windows平台上忽略“System.Net.Http.Cur
- windows-8 – Windows 8 JavaScript应用程序开发 – 共享魅
- windows 10常用快捷键汇总
- windows – WFPSampler编译问题 – 找不到wfpcalloutsclass
推荐文章
站长推荐
- IE11 For Win7、win2008中文版官方下载地址
- SAP ECC6 SOLUTION MANAGER KEY 生成脚本 (VBS)
- Windows/Linux命令查看文件MD5,SHA1,SHA256 文件
- 是否可以开发Windows,C,没有Visual Studio?
- Vulkan Tutorial 01 开发环境搭建之Windows
- JNA调用Dll的问题
- Windows Server 2016 新功能HCI(超融合基础架构)
- windows-vista – 使用托管代码调用死亡蓝屏
- .net – Windows Azure Web角色缓存(预览)“挂起
- 立即镜像/同步文件从Windows到Linux服务器的最佳
热点阅读
