Developing wordcount programs with spark-shell
Edit the file to be processed
Vim spark.txt
The contents are as follows
Upload files to hdfs
Hadoop fs-put / spark.txt /
View
Hadoop fs-ls /
Go to the bin directory of spark and execute. / spark-shell
Write scala code