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

Slider View: View UI should load data from Ambari API

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 1.7.0
    • 1.7.0
    • ambari-client
    • None

    Description

      Slider View UI currently calls /api/v1/views/SLIDER/versions/1.0.0/instances/SLIDER_1/resources/status API to determine if view is enabled, and if not, why it is not enabled.

      UI when loaded, should not use this GET call anymore. Rather it should determine this information by directly calling Ambari REST api, and then PUT this and other information to /api/v1/views/SLIDER/versions/1.0.0/instances/SLIDER_1.

      UI should determine whether to enable view, and reasons why if not.
      The view could be disabled for multiple reasons. One or all of the below could be reasons why the view is disabled

      • HDFS, YARN, ZK not installed
      • HDFS, YARN, ZK not started

      If any of the above are true, the reason(s) should be shown in appropriate message(s) (as we do currently).

      Additionally, the following information should also be loaded from Ambari on load

      • Cluster name
      • HDFS location (fs.defaultFS config from core-site)
      • YARN RM location (yarn.resourcemanager.address from yarn-site)
      • YARN RM Scheduler location (yarn.resourcemanager.scheduler.address from yarn-site)
      • ZK Quorum path - comma separated path of all ZK_SERVER_HOST:clientPort values. clientPort is from zookeeper-env. Example: c6401:2181,c6402:2181,c6403:2181.

      All the above information (cluster name, HDFS location, YARN RM location, YARN RM Scheduler location, ZK Quorum path) should then be PUT to properties key of /api/v1/views/SLIDER/versions/1.0.0/instances/SLIDER_1, from where GET can be called later during app running.

      {
        "href": "http://slider-1:8080/api/v1/views/SLIDER/versions/1.0.0/instances/SLIDER_1",
        "ViewInstanceInfo": {
          "context_path": "/views/SLIDER/1.0.0/SLIDER_1",
          "description": null,
          "icon64_path": null,
          "icon_path": null,
          "instance_name": "SLIDER_1",
          "label": "Slider Apps View",
          "static": true,
          "version": "1.0.0",
          "view_name": "SLIDER",
          "visible": true,
          "instance_data": {},
          "properties": {
            "ambariAddress": "http://c6401:8080",
            "clusterName": "c1",
            "hdfsAddress": "hdfs://c6401:8020",
            "yarnRMAddress": "c6402:8050",
            "yarnRMSchedulerAddress": "c6402:8030",
            "zookeeperQuorum": "c6401:2181,c6402:2181,c6403:2181"
          }
        }
      }

      This effort is crucial for Slider view to work in a standalone environment.

      Attachments

        1. AMBARI-7231.patch
          15 kB
          Antonenko Alexander

        Activity

          People

            aantonenko Antonenko Alexander
            aantonenko Antonenko Alexander
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: