spark window running locally wordcount error

When you run the code locally run hadoop spark or about three kinds of problems you may encounter

 
1.Exception in thread "main" java.lang.UnsatisfiedLinkError:org.apache.hadoop.io.native.NativeID$Windows.access0
2.java.lang.NullPointerException at java.lang.ProcessBuilder.start.
3.java.io.IOException: Could not rename file  
    
    
    The solution is to attach inside hadoop-common-bin-2.7.2-x64.zip/hadoop-2.7.2.tar.gz extract to any directory.
Configuration Run Configuration in IDEA, add variable HADOOP_HOME
 
    
Then add hadoop.dll, winutils.exe to% HADOOP_HOME% \ bin and c: / windows / System32 under
 
 
hadoop.dll, winutils.exe file

Link: https: //pan.baidu.com/s/1RWYxDwN0-iH_lso9Q8jtSA
extraction code: l2ej

 

 

Guess you like

Origin www.cnblogs.com/huangguoming/p/12095379.html
Recommended