Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Here's how to find which host components have stale configs (need to be restarted or have config refreshed).

Request:

Code Block
curl -uadmin:admin http://localhost:8080/api/v1/clusters/c1/host_components?HostRoles/stale_configs=true&fields=HostRoles/service_name,HostRoles/state,HostRoles/host_name,HostRoles/stale_configs,&minimal_response=true

Response:

Code Block
{
  "items" : [
    {
      "HostRoles" : {
        "component_name" : "DATANODE",
        "host_name" : "c6401.ambari.apache.org",
        "service_name" : "HDFS",
        "stale_configs" : true,
        "state" : "STARTED"
      },
      "host" : {
        "href" : "http://127.0.0.1:8080/api/v1/clusters/c1/hosts/c6401.ambari.apache.org"
      }
    },
    {
      "HostRoles" : {
        "component_name" : "HDFS_CLIENT",
        "host_name" : "c6401.ambari.apache.org",
        "service_name" : "HDFS",
        "stale_configs" : true,
        "state" : "INSTALLED"
      },
      "host" : {
        "href" : "http://127.0.0.1:8080/api/v1/clusters/c1/hosts/c6401.ambari.apache.org"
      }
    },
    {
      "HostRoles" : {
        "component_name" : "NAMENODE",
        "host_name" : "c6401.ambari.apache.org",
        "service_name" : "HDFS",
        "stale_configs" : true,
        "state" : "STARTED"
      },
      "host" : {
        "href" : "http://127.0.0.1:8080/api/v1/clusters/c1/hosts/c6401.ambari.apache.org"
      }
    },
    {
      "HostRoles" : {
        "component_name" : "SECONDARY_NAMENODE",
        "host_name" : "c6401.ambari.apache.org",
        "service_name" : "HDFS",
        "stale_configs" : true,
        "state" : "INSTALLED"
      },
      "host" : {
        "href" : "http://127.0.0.1:8080/api/v1/clusters/c1/hosts/c6401.ambari.apache.org"
      }
    }
  ]
}