zoukankan      html  css  js  c++  java
  • HADOOP_HOME or hadoop.home.dir are not set.

    ava.io.IOException: HADOOP_HOME or hadoop.home.dir are not set.
    
    at org.apache.hadoop.util.Shell.checkHadoopHome(Shell.java:302)
    at org.apache.hadoop.util.Shell.<clinit>(Shell.java:327)
    at org.apache.hadoop.util.GenericOptionsParser.preProcessForWindows(GenericOptionsParser.java:438)
    at org.apache.hadoop.util.GenericOptionsParser.parseGeneralOptions(GenericOptionsParser.java:484)
    at org.apache.hadoop.util.GenericOptionsParser.<init>(GenericOptionsParser.java:170)
    at org.apache.hadoop.util.GenericOptionsParser.<init>(GenericOptionsParser.java:153)
    at WordCount.main(WordCount.java:52)
    ERROR - Failed to locate the winutils binary in the hadoop binary path
     java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries

    解决办法:在main方法内部第一行添加如下代码 在APPLICATION.java

    System.setProperty("hadoop.home.dir", "D:\\Develop\\hadoop-2.6.0");

    早年同窗始相知,三载瞬逝情却萌。年少不知愁滋味,犹读红豆生南国。别离方知相思苦,心田红豆根以生。
  • 相关阅读:
    Leon-ai on WSL
    自动化测试工具
    创建自己的Spring Boot Starter
    Spring Boot内嵌Tomcat session超时问题
    Spring Boot
    Spring Cloud
    Socket编程之Tomcat模拟_采坑汇总
    访问者模式
    模版模式
    策略模式
  • 原文地址:https://www.cnblogs.com/shanheyongmu/p/15632912.html
Copyright © 2011-2022 走看看