org.apache.hadoop.mapred.InvalidInputException: Input path does not exist: file:/spark/hello.txt
解决办法:
从本地上运行wordcount程序
sc.textFile("/spark/hi.txt").flatMap(_.split(",")).map((_,1)).reduceByKey(_+_).saveAsTextFile("/spark/out")
从hdfs运行wordcount程序
sc.textFile("hdfs://hdp-1:9000/spark/hello.txt").flatMap(_.split(",")).map((_,1)).reduceByKey(_+_).saveAsTextFile("/spark/out")
ERROR StandaloneSchedulerBackend: Application has been killed. Reason: All masters are unresponsive! Giving up
解决办法:
1、查看zk是否健康运行
2、查看master是否健康运行
Exception in thread "main" java.lang.IllegalStateException: The main method in the given main class must be static
解决办法:检查代码是否正确
java.lang.ClassNotFoundException: ScalaWordCount.WordCount
解决方法:
1、检查运行命令jar包绝对路径是否正确
2、检查hdfs输入包是否正确