hadoop configuration windows and run the program

Download the package and configure

1.http: //archive.apache.org/dist/hadoop/core/hadoop-3.0.0/
2. decompression
3. New System Variable HADOOP_HOME is
the Path% HADOOP_HOME is increased bin% \
5. The download winUtils corresponding version of the bin, add pressure and cover the bin directory under HADOOP_HOME
6.cmd execute command hadoop version to see if the configuration is successful

idea to restart operation

FAQ

idea to run an error

If no HADOOP_HOME and Path, and no reboot idea, will complain

java.io.FileNotFoundException: Could not locate Hadoop executable: D:\work\tools\hadoop-3.0.0\bin\winutils.exe -see https://wiki.apache.org/hadoop/WindowsProblems
    at org.apache.hadoop.util.Shell.getQualifiedBinInner(Shell.java:605)
    at org.apache.hadoop.util.Shell.getQualifiedBin(Shell.java:578)

Solutions
New System Variable HADOOP_HOME
Path increase% HADOOP_HOME% \ bin

hadoop version error

PS C:\Users\juncai> hadoop   version
系统找不到指定的路径。
Error: JAVA_HOME is incorrectly set.
       Please update D:\work\tools\hadoop-3.0.0\etc\hadoop\hadoop-env.cmd
'-Xmx512m' 不是内部或外部命令,也不是可运行的程序

The reason is because the spaces JAVA_HOME path, C: \ Program Files \ Java \ jdk1.8.0_231
solution
1. Modify JAVA_HOME
2. Modify hadoop-env.cmd, set JAVA_HOME = C : \ PROGRA ~ 1 \ Java \ jdk1.8.0 _231

Guess you like

Origin www.cnblogs.com/JuncaiF/p/12392706.html