scp -P 9922 /root/wz/FBI2.txt root@node2:/wz
val text = sc.textFile("file:///wz/part-00000") //读本地文件 val stopwords = sc.textFile("file:///wz/chinese_stopword.txt") //分词包 val words = text.flatMap(line => line.split("\\W")) val clean = words.subtract(stopwords).foreach(println(_)) //打印
service iptables stop //关闭防火墙命令
hdfs不能访问/root下的本地文档
sudo -u hdfs hdfs dfs /wz/wz.txt /data/wz
集群布在node13456 在node2上没法hdfs dfs -put
Spark不能存为txt,只能为part-00000这样,所以你的.txt是被当成directory
sc.textFile读文件http://blog.csdn.net/legotime/article/details/51871724