Ask Your Question
0

Not able to update StreamSets Job by JobID

asked 2020-02-16 07:36:14 -0500

Souvik gravatar image

updated 2020-02-16 08:31:34 -0500

I was trying to update job name along with labels but getting below exception: Can you please help me out to resolve this issue. I am using StreamSets Control Hub 3.14.0 Please let me know what are the mandatory parameters that need to be passed as a part of body. Since there is no good documentation for StreamSets Rest API.

job_conf='{"name":"J_JSON_TEST_SOUVIK","organization":"dev","labels":["all"],"executorType": "COLLECTOR"}'
JobID='xxx:dev'
JobStatusCode=$(curl --write-out %{http_code} -s --output /dev/null -X POST "${STREAMSETS_URL}"/jobrunner/rest/v1/job/"${JobID}"  --header "Content-Type:application/json" --header "X-Requested-By:SDC" --header "X-SS-REST-CALL:true" --header "X-SS-User-Auth-Token:$sessionToken" --data ${job_conf} -k)

Exception:

{"EXCEPTION":{"rawMessage":"java.lang.NullPointerException","className":"java.lang.NullPointerException","message":null,"stackTrace":"java.lang.NullPointerException\n\tat com.streamsets.apps.jobrunner.backend.impl.JpaJobRunnerBackend$9.call(JpaJobRunnerBackend.java:943)\n\tat com.streamsets.apps.jobrunner.backend.impl.JpaJobRunnerBackend$9.call(JpaJobRunnerBackend.java:936)\n\tat com.streamsets.lib.jpa.JpaExecutor.executeTrx(JpaExecutor.java:565)\n\tat com.streamsets.apps.jobrunner.backend.impl.JpaJobRunnerBackend.updateJob(JpaJobRunnerBackend.java:936)\n\tat com.streamsets.apps.jobrunner.rest.JobResource.updateJob(JobResource.java:174)\n\tat sun.reflect.GeneratedMethodAccessor3067.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:76)\n\tat org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:148)\n\tat org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:191)\n\tat org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:200)\n\tat org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:103)\n\tat org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:493)\n\tat org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:415)\n\tat org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:104)\n\tat org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:277)\n\tat org.glassfish.jersey.internal.Errors$1.call(Errors.java:272)\n\tat org.glassfish.jersey.internal.Errors$1.call(Errors.java:268)\n\tat org.glassfish.jersey.internal.Errors.process(Errors.java:316)\n\tat org.glassfish.jersey.internal.Errors.process(Errors.java:298)\n\tat org.glassfish.jersey.internal.Errors.process(Errors.java:268)\n\tat org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:289)\n\tat org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:256)\n\tat org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:703)\n\tat org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:416)\n\tat org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:370)\n\tat org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:389)\n\tat org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:342)\n\tat org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:229)\n\tat org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:760)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1617)\n ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-02-17 18:05:22 -0500

iamontheinet gravatar image

Hi!

If you're a customer, please reach out to our support team and they'll be able to help you out.

Cheers, Dash

edit flag offensive delete link more

Comments

Thanks for your reply but I am a StreamSets developer. Can you please help me on that since there is no enough document on that. It's very urgent...

Souvik gravatar imageSouvik ( 2020-02-17 23:30:22 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-02-16 07:36:14 -0500

Seen: 41 times

Last updated: Feb 17