前期准备,就是在,IDEA里,maven来创建项目。这里不多赘述。
一般,我们,习惯将默认的D:\Code\IntelliJIDEACode\spark-helloworld\src\main\scala
改为 D:\Code\IntelliJIDEACode\spark-helloworld\src
如下,不是maven创建出来的项目,到了这一步,需要如下。(我这里是manven,所以不需)
name:spark-helloworld:jar
Output directory: D:\Code\IntelliJIDEACode\spark-helloworld\out\artifacts\spark-helloworld_jar
比如,我这里
[spark@sparksinglenode testspark]$ $HADOOP_HOME/bin/hadoop fs -copyFromLocal /home/spark/testspark/words.txt hdfs://sparksinglenode:9000/
原文:http://www.cnblogs.com/zlslch/p/6505940.html