当前位置:   article > 正文

解决spark运行中ERROR Shell:Failed to locate the winutils binary in the hadoop binary path的问题

failed to locate the winutils binary in the hadoop binary path

  1. 17/09/03 21:27:13 ERROR Shell: Failed to locate the winutils binary in the hadoop binary path
  2. java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries.
  3. at org.apache.hadoop.util.Shell.getQualifiedBinPath(Shell.java:278)
  4. at org.apache.hadoop.util.Shell.getWinUtilsPath(Shell.java:300)
  5. at org.apache.hadoop.util.Shell.<clinit>(Shell.java:293)
  6. at org.apache.hadoop.util.StringUtils.<clinit>(StringUtils.java:76)
  7. at org.apache.hadoop.mapred.FileInputFormat.setInputPaths(FileInputFormat.java:362)
  8. at org.apache.spark.SparkContext$$anonfun$hadoopFile$1$$anonfun$30.apply(SparkContext.scala:1014)
  9. at org.apache.spark.SparkContext$$anonfun$hadoopFile$1$$anonfun$30.apply(SparkContext.scala:1014)
  10. at org.apache.spark.rdd.HadoopRDD$$anonfun$getJobConf$6.apply(HadoopRDD.scala:179)
  11. at org.apache.spark.rdd.HadoopRDD$$anonfun$getJobConf$6.apply(HadoopRDD.scala:179)


在代码中设置hadoop.home.dir

System.setProperty("hadoop.home.dir", "D:\\hadoop-2.5.0\\hadoop-2.5.0")

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/686099
推荐阅读
相关标签
  

闽ICP备14008679号