You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

This capability is currently under development.

 

Ambari Views offer a systematic way to plug-in UI capabilities to surface custom visualization, management and monitoring features in Ambari Web. A "view" is a way of extending Ambari that allows 3rd parties to plug in new resource types along with the APIs, providers and UI to support them. In other words, a view is an application that is deployed into the Ambari container.

Notable Resources

Get List of Views

  1. Gets the list of all available Views

    GET /api/v1/views
    
    200 - OK
  2. Once you have a list of views, you can drill-into a view and see the available versions.

    GET /api/v1/views/FILES
    
    200 - OK
  3. You can go a level deeper and see more information about that specific version for the view, such as the parameters and the archive name, and a list of all instances of the view.

    GET /api/v1/views/FILES/versions/0.1.0
    
    200 - OK

Creating a View Instance

The following example shows creating an instance of the FILES view, version 1.0.0 view called "MyFiles".

  1. Create the view instance.

    POST /api/v1/views/FILES/versions/1.0.0/instances/MyFiles
    
    201 - CREATED
  2. Set view properties.

    PUT /api/v1/views/FILES/versions/1.0.0/instances/MyFiles
    
    [ {
    "ViewInstanceInfo" : {
        "properties" : {
          "dataworker.defaultFs" : "webhdfs://your.namenode.host:50070"
        }
      }
    } ]
    
    200 - OK
  3. Restart Ambari Server to pick-up the view instance and UI resources.

    ambari-server restart
  4. Confirm the newly created view instance is available.

    GET /api/v1/views/FILES/
    
    {
      "href" : "http://127.0.0.1:8080/api/v1/views/FILES/versions/1.0.0",
      "ViewInfo" : {
        "archive" : "/var/lib/ambari-server/resources/views/files-0.0.1-SNAPSHOT-jar-with-dependencies.jar",
        "label" : "Files",
        "parameters" : [
          {
            "name" : "dataworker.defaultFs",
            "description" : "FileSystem URI",
            "required" : true
          }
        ],
        "version" : "1.0.0",
        "view_name" : "FILES"
      },
      "instances" : [
        {
          "href" : "http://127.0.0.1:8080/api/v1/views/FILES/versions/1.0.0/instances/MyFiles",
          "ViewInstanceInfo" : {
            "instance_name" : "MyFiles",
            "view_name" : "FILES"
          }
        }
      ]
    }
  5. Browse to the view instance.

    http://127.0.0.1:8080/views/FILES/1.0.0/MyFiles

 

  • No labels