spark启动失败:requirement failed: No output operations registered, so nothing to execute

报错: Exception in thread "main" java.lang.IllegalArgumentException: requirement

报错:

Exception in thread "main" java.lang.IllegalArgumentException: requirement failed: No output operations registered, so nothing to execute

 

原因:在start后,没有触发spark的流数据动作,任意一个触发DStream的动作即可解决该问题,比如JavaReceiverInputDStream的:

print()