Announcement Announcement Module
Collapse
No announcement yet.
Status of submitted Job Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Status 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.

  • #2
    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.

    Comment


    • #3
      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

      Comment


      • #4
        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.

        Comment


        • #5
          Hi costin is the code committed can I checkout the latest build to test this ?

          Comment


          • #6
            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

            Comment


            • #7
              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.

              Comment


              • #8
                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.

                Comment

                Working...
                X