微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在Windows中设置HADOOP_HOMEvariables

我试图在Windows 8中使用Spark和Hadoop。但是不pipe我的代码是什么,我收到这个错误

15/08/25 19:29:58 ERROR Shell: Failed to locate the winutils binary in the hadoop binary path java.io.IOException: Could not locate executable nullbinwinutils.exe in the Hadoop binaries. at org.apache.hadoop.util.Shell.getQualifiedBinPath(Shell.java:355) at org.apache.hadoop.util.Shell.getWinUtilsPath(Shell.java:370) at org.apache.hadoop.util.Shell.<clinit>(Shell.java:363) at org.apache.hadoop.util.StringUtils.<clinit>(StringUtils.java:79) at org.apache.hadoop.security.Groups.parseStaticMapping(Groups.java:104) at org.apache.hadoop.security.Groups.<init>(Groups.java:86) at org.apache.hadoop.security.Groups.<init>(Groups.java:66) at org.apache.hadoop.security.Groups.getUserToGroupsMappingService(Groups.java:280) at org.apache.hadoop.security.UserGroup@R_290_404[email protected](UserGroup@R_290_404[email protected]:271) at org.apache.hadoop.security.UserGroup@R_290_404[email protected](UserGroup@R_290_404[email protected]:248) at org.apache.hadoop.security.UserGroup@R_290_404[email protected](UserGroup@R_290_404[email protected]:763) at org.apache.hadoop.security.UserGroup@R_290_404[email protected](UserGroup@R_290_404[email protected]:748) at org.apache.hadoop.security.UserGroup@R_290_404[email protected](UserGroup@R_290_404[email protected]:621) at org.apache.spark.util.Utils$$anonfun$getCurrentUserName$1.apply(Utils.scala:2162) at org.apache.spark.util.Utils$$anonfun$getCurrentUserName$1.apply(Utils.scala:2162) at scala.Option.getorElse(Option.scala:120) at org.apache.spark.util.Utils$.getCurrentUserName(Utils.scala:2162) at org.apache.spark.SparkContext.<init>(SparkContext.scala:301) at org.apache.spark.api.java.JavaSparkContext.<init>(JavaSparkContext.scala:61) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(UnkNown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(UnkNown Source) at java.lang.reflect.Constructor.newInstance(UnkNown Source) at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:234) at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:379) at py4j.Gateway.invoke(Gateway.java:214) at py4j.commands.ConstructorCommand.invokeConstructor(ConstructorCommand.java:79) at py4j.commands.ConstructorCommand.execute(ConstructorCommand.java:68) at py4j.GatewayConnectionun(GatewayConnection.java:207) at java.lang.Thread.run(UnkNown Source)

如你看到的:

nullbinwinutils.exe

hadoop主path为null。 我试图设置HADOOP_HOME作为一个环境variables,但没有解决这个问题。 任何帮助或评论关于这将不胜感激。

谢谢

为什么DwmRegisterThumbnail可能会失败?

Windows 8:对通过WOW64运行的32位应用程序进行堆分析

我如何使JDK成为认的JRE?

couchDB完整的包与Windows的所有依赖项

Windows 8手机应用程序与Windows 8的选项卡应用程序

在TideSDK中安装python模块

如何利用Windows中的RDMA

我如何使用和访问使用PHP和Wamp服务器的sqlite数据库

如何在Windows上安装厨师服务器

应用程序不会从创build者启动

我设法解决这个问题在开始时使用下面的代码部分:

import sys import os os.environ['HADOOP_HOME'] = "C:/mine/Spark/hadoop-2.6.0" sys.path.append("C:/mine/Spark/hadoop-2.6.0/bin")

希望这可以帮助别人,如果有人有更好的主意,我一定会明白的。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐