Dataflow job status returns UNKNOWN always -


i trying current state of job. following code.

job creation

 final dataflowpipelinejob job =dataflowpipelinerunner.fromoptions(configuration.getoptions())                                   .run(pipe); 

my code job state

dataflowpipelinejob job=new dataflowpipelinejob(utils.getprojectid(), jobid, getdataflowclient());       job.getstate(); 

but throws following warning

com.google.cloud.dataflow.sdk.runners.dataflowpipelinejob getstate: there problems getting current job status:      com.google.api.client.googleapis.json.googlejsonresponseexception: 404 ok not found @    com.google.api.client.googleapis.json.googlejsonresponseexception.from(googlejsonresponseexception.java:145) @ com.google.api.client.googleapis.services.json.abstractgooglejsonclientrequest.newexceptiononerror(abstractgooglejsonclientrequest.java:113) @ com.google.api.client.googleapis.services.json.abstractgooglejsonclientrequest.newexceptiononerror(abstractgooglejsonclientrequest.java:40) @ com.google.api.client.googleapis.services.abstractgoogleclientrequest$1.interceptresponse(abstractgoogleclientrequest.java:321) @ com.google.api.client.http.httprequest.execute(httprequest.java:1049) @ com.google.api.client.googleapis.services.abstractgoogleclientrequest.executeunparsed(abstractgoogleclientrequest.java:419) @ com.google.api.client.googleapis.services.abstractgoogleclientrequest.executeunparsed(abstractgoogleclientrequest.java:352) @ com.google.api.client.googleapis.services.abstractgoogleclientrequest.execute(abstractgoogleclientrequest.java:469) @ com.google.cloud.dataflow.sdk.runners.dataflowpipelinejob.getstate(dataflowpipelinejob.java:188) @ com.pwc.google.dataflow.factory.dataflowfactory.getstatus(dataflowfactory.java:89) @ com.pwc.google.dataflow.controllers.jobmonitor.dopost(jobmonitor.java:28) @ javax.servlet.http.httpservlet.service(httpservlet.java:637) @ javax.servlet.http.httpservlet.service(httpservlet.java:717) @ org.mortbay.jetty.servlet.servletholder.handle(servletholder.java:511) @ org.mortbay.jetty.servlet.servlethandler$cachedchain.dofilter(servlethandler.java:1166) @ com.google.apphosting.utils.servlet.parseblobuploadfilter.dofilter(parseblobuploadfilter.java:125) @ org.mortbay.jetty.servlet.servlethandler$cachedchain.dofilter(servlethandler.java:1157) @ com.google.apphosting.runtime.jetty.savesessionfilter.dofilter(savesessionfilter.java:35) @ org.mortbay.jetty.servlet.servlethandler$cachedchain.dofilter(servlethandler.java:1157) @ com.google.apphosting.utils.servlet.jdbcmysqlconnectioncleanupfilter.dofilter(jdbcmysqlconnectioncleanupfilter.java:60) @ org.mortbay.jetty.servlet.servlethandler$cachedchain.dofilter(servlethandler.java:1157) @ com.google.apphosting.utils.servlet.transactioncleanupfilter.dofilter(transactioncleanupfilter.java:43) @ org.mortbay.jetty.servlet.servlethandler$cachedchain.dofilter(servlethandler.java:1157) @ org.mortbay.jetty.servlet.servlethandler.handle(servlethandler.java:388) @ org.mortbay.jetty.security.securityhandler.handle(securityhandler.java:216) @ org.mortbay.jetty.servlet.sessionhandler.handle(sessionhandler.java:182) @ org.mortbay.jetty.handler.contexthandler.handle(contexthandler.java:765) @ org.mortbay.jetty.webapp.webappcontext.handle(webappcontext.java:418) @ com.google.apphosting.runtime.jetty.appversionhandlermap.handle(appversionhandlermap.java:257) @ org.mortbay.jetty.handler.handlerwrapper.handle(handlerwrapper.java:152) @ org.mortbay.jetty.server.handle(server.java:326) @ org.mortbay.jetty.httpconnection.handlerequest(httpconnection.java:542) @ org.mortbay.jetty.httpconnection$requesthandler.headercomplete(httpconnection.java:923) @ com.google.apphosting.runtime.jetty.rpcrequestparser.parseavailable(rpcrequestparser.java:76) @ org.mortbay.jetty.httpconnection.handle(httpconnection.java:404) @ com.google.apphosting.runtime.jetty.jettyservletengineadapter.servicerequest(jettyservletengineadapter.java:146) @ com.google.apphosting.runtime.javaruntime$requestrunnable.run(javaruntime.java:482) @ com.google.tracing.tracecontext$tracecontextrunnable.runincontext(tracecontext.java:437) @ com.google.tracing.tracecontext$tracecontextrunnable$1.run(tracecontext.java:444) @ com.google.tracing.currentcontext.runincontext(currentcontext.java:230) @ com.google.tracing.tracecontext$abstracttracecontextcallback.runininheritedcontextnounref(tracecontext.java:308) @ com.google.tracing.tracecontext$abstracttracecontextcallback.runininheritedcontext(tracecontext.java:300) @ com.google.tracing.tracecontext$tracecontextrunnable.run(tracecontext.java:441) @ com.google.apphosting.runtime.threadgrouppool$poolentry.run(threadgrouppool.java:234) @ java.lang.thread.run(thread.java:745) 

and returns unknown state.

please fix this.

you should create dataflow client object this:

dataflowpipelineoptions options = pipelineoptionsfactory.create().as(dataflowpipelineoptions.class); dataflow client = com.google.cloud.dataflow.sdk.util.transport.newdataflowclient(options); 

this initialize credentials , automatically handle retries.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -