bluebreezecf / SparkJobServerClient

Java Client of the Spark Job Server implementing the arranged Rest APIs
Apache License 2.0
50 stars 33 forks source link

Issue with no status from server #6

Closed jamalahmedmaaz closed 7 years ago

jamalahmedmaaz commented 8 years ago

Hi,

Thanks for repository. Nice to have something like this.

There is an issue from server i am getting the correct response as expected.

But this line fails. Can you please check this out.

jobResult.setStatus(jsonObj.getString(SparkJobBaseInfo.INFO_KEY_STATUS));

One question why are you expecting INFO_KEY_STATUS

Response from server { "result": ["[Data Export,1296178]", "[Data Import,1296143]", "[Download,1295760]", "[File Share,1296351]", "[Login,1297823]", "[Logout,1295147]", "[Page Click,1296103]", "[Report Run,1296246]", "[Sign UP,1293168]", "[Upload,1295785]"] }

This is correct what i am expecting.

bradfordwagner commented 8 years ago

Could you tell me what version of SparkJobServer and Spark you are running? What value(s) are you returning in your SparkJobBase.runJob(..)?

jamalahmedmaaz commented 8 years ago

Hi Bradford,

Apologies for late reply. I am using spark 1.5.3 and 0.6.2-SNAPSHOT (master).

calvin-pietersen commented 7 years ago

Think I am getting a similar issue

2017-03-31 01:04:13,858 ERROR [Timer-Driven Process Thread-2] o.k.c.t.s.api.SparkJobServerClientImpl Error occurs when trying to start a new job:
net.sf.json.JSONException: JSONObject["status"] not found.
    at net.sf.json.JSONObject.getString(JSONObject.java:2092) ~[json-lib-2.4-jdk15.jar:na]
    at org.khaleesi.carfield.tools.sparkjobserver.api.SparkJobServerClientImpl.parseResult(SparkJobServerClientImpl.java:516) ~[spark-job-server-client-1.0.0.jar:na]
    at org.khaleesi.carfield.tools.sparkjobserver.api.SparkJobServerClientImpl.startJob(SparkJobServerClientImpl.java:314) ~[spark-job-server-client-1.0.0.jar:na]
    at com.thinkbiganalytics.nifi.v2.spark.JobServerService.executeSparkContextJob(JobServerService.java:192) [kylo-nifi-hadoop-service-0.8.0-SNAPSHOT.jar:na]
    at sun.reflect.GeneratedMethodAccessor326.invoke(Unknown Source) ~[na:na]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_92]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_92]
    at org.apache.nifi.controller.service.StandardControllerServiceProvider$1.invoke(StandardControllerServiceProvider.java:177) [nifi-framework-core-1.0.0.jar:1.0.0]
    at com.sun.proxy.$Proxy90.executeSparkContextJob(Unknown Source) [na:na]
    at com.thinkbiganalytics.nifi.v2.spark.ExecuteSparkContextJob.onTrigger(ExecuteSparkContextJob.java:165) [kylo-nifi-spark-processors-0.8.0-SNAPSHOT.jar:na]
    at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) [nifi-api-1.0.0.jar:1.0.0]
    at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1064) [nifi-framework-core-1.0.0.jar:1.0.0]
    at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:136) [nifi-framework-core-1.0.0.jar:1.0.0]
    at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) [nifi-framework-core-1.0.0.jar:1.0.0]
    at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132) [nifi-framework-core-1.0.0.jar:1.0.0]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_92]
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_92]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_92]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_92]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_92]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_92]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_92]
bluebreezecf commented 7 years ago

@jamalahmedmaaz @calvin-pietersen Updates to the latest code, and try again. The problem seems to be fixed.