我无法提交仅执行 System.out.println() 的简单作业。这是我从 SnappyData Lead 那里得到的错误。
snappy-job.sh submit --lead 10.0.18.66:8090 --app-name SimpleJobApp
--class snappydata.jobs.SimpleJob --app-jar simpleJob.jar OKOK{ "status": "ERROR", "result": {
"message": "null",
"errorClass": "scala.MatchError",
"stack": ["spark.jobserver.JobManagerActor$$anonfun$spark$jobserver$JobManagerActor$$getJobFuture$4.apply(JobManagerActor.scala:244)", "scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)", "scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)", "java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)", "java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)", "java.lang.Thread.run(Thread.java:745)"] }
这是工作:
public class SimpleJob implements SnappySQLJob {
/**
*
*/
public SimpleJob() {
System.out.println(getClass().getSimpleName()+" Created");
}
@Override
public Object runJob(Object sparkContext, Config jobConfig) {
SnappyContext snappyContext = (SnappyContext)sparkContext;
System.out.println(getClass().getSimpleName()+".runJob: executed");
return null;
}
@Override
public SparkJobValidation validate(Object sparkContext, Config jobConfig) {
SnappyContext snappyContext = (SnappyContext)sparkContext;
System.out.println(getClass().getSimpleName()+".validate: executed");
return null;
}
}
这是 SnappyData 潜在客户日志:
16/08/05 17:44:07.352 UTC SnappyLeadJobServer-akka.actor.default-dispatcher-14 INFO JarManager:为应用程序 SimpleJobApp 存储 jar,1052 字节 16/08/05 17:44:07.368 UTC SnappyLeadJobServer-akka.actor。 default-dispatcher-19 INFO LocalContextSupervisorActor:创建一个名为 snappyContext1470419047337607598 的 SparkContext 16/08/05 17:44:07.369 UTC SnappyLeadJobServer-akka.actor.default-dispatcher-16 INFO JobManagerActor:启动 actor spark.jobserver.JobManagerActor 16/08/05 17:44:07.371 UTC SnappyLeadJobServer-akka.actor.default-dispatcher-16 信息 JobStatusActor:启动演员 spark.jobserver.JobStatusActor 16/08/05 17:44:07.371 UTC SnappyLeadJobServer-akka.actor.default-dispatcher-14 信息JobResultActor:启动演员 spark.jobserver.JobResultActor 16/08/05 17:44:07.371 UTC SnappyLeadJobServer-akka.actor。default-dispatcher-17 信息 LocalContextSupervisorActor:SparkContext snappyContext1470419047337607598 初始化 16/08/05 17:44:07.375 UTC SnappyLeadJobServer-akka.actor.default-dispatcher-16 信息 RddManagerActor:启动演员 spark.jobserver.RddManagerActor 16/08/05 17: 44:07.389 UTC SnappyLeadJobServer-akka.actor.default-dispatcher-17 信息 JobManagerActor:为应用程序 SimpleJobApp 加载类 snappydata.jobs.SimpleJob 16/08/05 17:44:07.389 UTC SnappyLeadJobServer-akka.actor.default-dispatcher-17信息 SparkContext:添加了 JAR /tmp/spark-jobserver/filedao/data/SimpleJobApp-2016-08-05T17_44_07.353Z.jar389 UTC SnappyLeadJobServer-akka.actor.default-dispatcher-17 信息 JobManagerActor:为应用程序 SimpleJobApp 加载类 snappydata.jobs.SimpleJob 16/08/05 17:44:07.389 UTC SnappyLeadJobServer-akka.actor.default-dispatcher-17 信息 SparkContext :添加了 JAR /tmp/spark-jobserver/filedao/data/SimpleJobApp-2016-08-05T17_44_07.353Z.jar 在389 UTC SnappyLeadJobServer-akka.actor.default-dispatcher-17 信息 JobManagerActor:为应用程序 SimpleJobApp 加载类 snappydata.jobs.SimpleJob 16/08/05 17:44:07.389 UTC SnappyLeadJobServer-akka.actor.default-dispatcher-17 信息 SparkContext :添加了 JAR /tmp/spark-jobserver/filedao/data/SimpleJobApp-2016-08-05T17_44_07.353Z.jar 在http://10.0.18.66:50772/jars/SimpleJobApp-2016-08-05T17_44_07.353Z.jar时间戳为 1470419047389 16/08/05 17:44:07.390 UTC SnappyLeadJobServer-akka.actor.default-dispatcher-17 INFO ContextURLClassLoader:添加 URL 文件:/tmp/spark-jobserver/filedao/data/SimpleJobApp-2016-08-05T17_44_07 .353Z.jar 到 ContextURLClassLoader 16/08/05 17:44:07.390 UTC SnappyLeadJobServer-akka.actor.default-dispatcher-17 信息 JarUtils$:使用加载器 spark.jobserver.util.ContextURLClassLoader@ 加载对象 snappydata.jobs.SimpleJob$ 709f3e69 16/08/05 17:44:07.391 UTC SnappyLeadJobServer-akka.actor.default-dispatcher-17 信息 JarUtils$:使用加载程序 spark.jobserver.util.ContextURLClassLoader@709f3e69 加载类 snappydata.jobs.SimpleJob@709f3e69 17:44:07.392 UTC SnappyLeadJobServer-akka.actor.default-dispatcher-17 INFO JobManagerActor:启动 Spark 作业 376c8d23-6b49-4138-aadd-e4cff8f9f945 [snappydata.jobs.SimpleJob] ... 2005 年 8 月 16 日 17:44 :07.398 UTC pool-29-thread-1 INFO JobManagerActor:启动作业未来线程 16/08/05 17:44:07.402 UTC SnappyLeadJobServer-akka.actor.default-dispatcher-17 INFO JobStatusActor:作业 376c8d23-6b49-4138-aadd- e4cff8f9f945 以错误结束 16/08/05 17:44:07.402 UTC pool-29-thread-2 WARN JobManagerActor:来自作业 376c8d23-6b49-4138-aadd-e4cff8f9f945 的异常:scala.MatchError:在 spark.jobserver.JobManagerActor 处为空$$anonfun$spark$jobserver$JobManagerActor$$getJobFuture$4.apply(JobManagerActor.scala:244) at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24) at scala.concurrent.impl.Future $PromiseCompletingRunnable.run(Future.scala:24) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:第617章)