Uploaded image for project: 'Hue (READ ONLY)'
  1. Hue (READ ONLY)
  2. HUE-1178

[jb] Smarter logic for getting MR2 job information

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.5.0
    • Component/s: app.jobbrowser
    • Labels:
      None

      Description

      Instead of doing the above logic, we should check for the APP_ID status and route to the MR API or History Server API accordingly.

      This would simply the code and have Oozie direct job log link work (as Oozie use job_XXXXXXXX format and not application_XXXXXXX)

          """
          Try first as if it was a running job, then as a finished job.
          """
          try:
            if jobid.startswith('application'):
              json = self.mapreduce_api.job(self.user, jobid.replace('application', 'job'))
              return YarnJob(self.mapreduce_api, json['job'])
          except Exception, e:
            LOG.info('Job %s not running: %s' % (jobid, e))
          jobid = jobid.replace('application', 'job')
          json = self.history_server_api.job(self.user, jobid)
          return YarnJob(self.history_server_api, json['job'])
      

        Attachments

          Activity

            People

            • Assignee:
              romain Romain Rigaux
              Reporter:
              romain Romain Rigaux
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: