py4j.protocol.Py4JJavaError: An error occurred while calling o30.toDebugString.
: org.apache.hadoop.mapred.InvalidInputException: Input path does not exist: hdfs://192.168.1.84:9000/user/root/shakespeare.txt
原因:
text = sc.textFile("shakespeare.txt")
spark默认去hdfs寻找,然而我的放在本地,应该改为:
text = sc.textFile("file:///root/shakespeare.txt")