Hi Venkatesh, Don't you need to schedule the execution so that not multiple jobs run in parallel? And even if they were to run in parallel, won't you need to be able to identify them? In that case, why no assign a unique name when you launch the way David suggested?
Thomas On Fri, Jan 8, 2016 at 9:44 AM, Kottapalli, Venkatesh < [email protected]> wrote: > Ok. I see we do the same using UI where the application gets suffixed by > int values to make it unique. > > In that case, is there a way to retrieve the current running job name and > id from within the application? > > My use case needs to access the application details from with in the > application to track certain things. > > So, how do I retrieve "dt.attr.APPLICATION_NAME" that I have set from > within the application? > > > Regards, > Venkatesh. > > > > -----Original Message----- > From: David Yan [mailto:[email protected]] > Sent: Thursday, January 07, 2016 6:07 PM > To: [email protected] > Subject: Re: Reg job failure when submitted using curl > > It's an expected behavior. Apex does not allow multiple application > instances with the same application name. > What you can do is to use a different name, by adding > "dt.attr.APPLICATION_NAME": "some-other-name" in your POST payload. > For example: > > curl -XPOST -d '{ "dt.attr.APPLICATION_NAME": "some-other-name" }' http:// > <gatewayserver:9090>/ws/v2/appPackages/<admin>/<jarname>/0.0.1-SNAPSHOT/ > applications/<Processing_Job>/launch > > David > > On Thu, Jan 7, 2016 at 6:02 PM, Kottapalli, Venkatesh < > [email protected]> wrote: > > > Hi, > > > > When I try to submit the same job with the same name > > using the curl command, the second job will be accepted but will be > > killed. When I submit the job with a different name, it will accept and > run the job. > > > > Can you help me understand this behavior. > > > > I need to submit same job multiple times, it is okay if it gets > > submitted and shows a different name like it does when we submit the job > from DT UI. > > > > Curl -XPOST -d <DT_ARGUMENTS> http:// > > > <gatewayserver:9090>/ws/v2/appPackages/<admin>/<jarname>/0.0.1-SNAPSHOT/applications/<Processing_Job>/launch. > > > > I am using 3.1.1 version of data torrent. > > > > > > Regards, > > Venkatesh. > > >
