win7运行mapreduce报错Could not locate executable nullbinwinutils
发布时间:2020-11-17 12:08:26 所属栏目: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 Phone 7 – Windows Phone开发Visual Studio 2012
- Windows BATCH:如何为单个脚本禁用QuickEdit模式?
- Windows Vista 64位的命令行subversion客户端
- windows – 为什么没有64位版本的VS2013?
- pyshark无法在Windows 7(python)上捕获数据包
- windows – 启动进程时“print”和“printo”动词之间有什么
- windows – 以MONO Runtime为目标导致Xamarin Build失败
- windows – ruby win32apistructs(VerQueryValue)
- winforms – .NET ListView和Windows 7
- haskell – 用于Windows的Linux主机上的GHC交叉编译源代码
推荐文章
站长推荐
- 批处理文件 – 以编程方式更改和刷新图标(无需重
- wcf – 有关替换Microsoft .NET的Web服务增强功能
- 在Windows上使用clang编译c 11程序时出错
- winapi – Windows SDK 7.0的signtool中的signwi
- Windows上的64位版Octave
- windows-8 – 屏幕关闭时,WinRT应用程序可以继续
- windows – CreateWindowEx的lpClassName参数如何
- Windows Vista 64位的命令行subversion客户端
- windows-services – 首先是TopShelf,Ninject和E
- Windows Azure SDK for C
热点阅读