Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-8163

Provide stage resource information via REST API

    XMLWordPrintableJSON

Details

    Description

      Currently, it is possible to query Ambari (via the REST API) for details about asynchronous requests and their related tasks. This useful when trying to obtain progress information. However, some information necessary for the UI to indicate meaningful progress is not available. This information is related to the stages that are generated.

      NOTE: Each asynchronous request is broken down into 1 or more stages and each stage contains 1 or more tasks.

      If stage information was available via the REST API, it would be possible for the caller (maybe a UI) to track high-level tasks (at the stage level) rather than each lower-level unit of work (at the task level).

      To allow for this, a new API resource (and associated handler) needs to be created. The resource should be read-only (like requests and tasks), and should provide information stored in the stage table from the Ambari database.

      The following properties should be returned for each stage:

      • stage_id
      • request_id
      • cluster_id
      • request_context
        • This should probably be renamed to something more appropriate, like stage_context, stage_name, or etc...
      • start_time
      • end_time
      • progress_percent
      • status

      It is expected that the resources would be queried using:

      GET  /api/v1/clusters/{clusterid}/requests/{requestid}/stages
      

      Also, some subset of the stage data should be provided when querying for details about a specific request, like in:

      GET  /api/v1/clusters/{clusterid}/requests/{requestid}
      

      See request and task resource for examples.

      Attachments

        Issue Links

          Activity

            People

              tbeerbower Tom Beerbower
              rlevas Robert Levas
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: