Spark Trouble Shooting - Driver NullPointerException

今天遇到一个诡异的错误,Go一下记录一下。

ERROR


Exception in thread "Driver" java.lang.NullPointerException
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at org.apache.spark.deploy.yarn.ApplicationMaster$$anon$2.run(ApplicationMaster.scala:627)

Solution


Your code should be in an object, not class!

你可能感兴趣的:(Spark Trouble Shooting - Driver NullPointerException)