When a job is submitted we get a handler back called RunningJob , how can one access the status of the job by using RunningJob please post any pointers in regards to this if one available, I would like get atleast JobID of submitted job.
When a job is submitted we get a handler back called RunningJob , how can one access the status of the job by using RunningJob please post any pointers in regards to this if one available, I would like get atleast JobID of submitted job.
SHDP uses the so-called new API, mapreduce . The Job/JobContext provides most of the methods you want - in the worse case scenario you can use reflection to get a hold of the underlying RunningJob. We already have a class that does that in mapreduce package - I'll make it public so you can use that instead.
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
Please use [ c o d e ] [ / c o d e ] tags
By the way, I've added a jira to provide automatic conversion when using the container for injection. Feedback is welcome:
https://jira.springsource.org/browse/SHDP-99
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
Please use [ c o d e ] [ / c o d e ] tags
SHDP now can do the conversion automatically between a Job and a RunningJob (other common types are supported).
So simply inject the job into a RunningJob field and SHDP will take of it behind the scenes.
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
Please use [ c o d e ] [ / c o d e ] tags
Hi costin is the code committed can I checkout the latest build to test this ?
Yes. There's even a snapshot build pushed for it [1]. See SHDP home page for more info on the maven repo for snapshots
[1] https://build.springsource.org/brows...OOPNIGHTLY-340
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
Please use [ c o d e ] [ / c o d e ] tags
Hi Costin, I checked out the latest build and I am using spring batch to launch my jobs and now I am trying to figure how I can get the job id of a launched job from spring container. For example if I have multiple instances of the same job how can I get jobId of each job.
You need to get a hold of the proper instance (typically by using the proper scope). You can either do injection - which will happen at instantiation time which work or not depending on the scope of the beans - or you can use the JobUtils class (in o.s.d.hadoop.mapreduce package) to do the conversion yourself between the Job and its Id.
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
Please use [ c o d e ] [ / c o d e ] tags