ApiRole Data Model

A role represents a specific entity that participate in a service. Examples are JobTrackers, DataNodes, HBase Masters. Each role is assigned a host where it runs on.

Properties
name data type description
name string The name of the role. Optional when creating a role since API v6. If not specified, a name will be automatically generated for the role.
type string The type of the role, e.g. NAMENODE, DATANODE, TASKTRACKER.
hostRef ApiHostRef A reference to the host where this role runs.
serviceRef ApiServiceRef Readonly. A reference to the parent service.
roleState ApiRoleState Readonly. The configured run state of this role. Whether it's running, etc.
commissionState ApiCommissionState Readonly. The commission state of this role. Available since API v2.
healthSummary ApiHealthSummary Readonly. The high-level health status of this role.
configStale boolean Readonly. Expresses whether the role configuration is stale.
configStalenessStatus ApiConfigStalenessStatus Readonly. Expresses the role's configuration staleness status. Available since API v6.
healthChecks array of ApiHealthCheck Readonly. The list of health checks of this service.
haStatus HaStatus Readonly. The HA status of this role.
roleUrl string Readonly. Link into the Cloudera Manager web UI for this specific role.
maintenanceMode boolean Readonly. Whether the role is in maintenance mode. Available since API v2.
maintenanceOwners array of ApiEntityType Readonly. The list of objects that trigger this role to be in maintenance mode. Available since API v2.
config ApiConfigList The role configuration. Optional.
roleConfigGroupRef ApiRoleConfigGroupRef Readonly. The reference to the role configuration group of this role. Available since API v3.
zooKeeperServerMode ZooKeeperServerMode Readonly. The ZooKeeper server mode for this role. Note that for non-ZooKeeper Server roles this will be null. Available since API v6.
entityStatus ApiEntityStatus Readonly. The entity status for this role. Available since API v11.

Example

{
  "name" : "...",
  "type" : "...",
  "hostRef" : {
    "hostId" : "...",
    "hostname" : "..."
  },
  "serviceRef" : {
    "peerName" : "...",
    "clusterName" : "...",
    "serviceName" : "...",
    "serviceDisplayName" : "...",
    "serviceType" : "..."
  },
  "roleState" : "NA",
  "commissionState" : "DECOMMISSIONING",
  "healthSummary" : "BAD",
  "configStalenessStatus" : "STALE",
  "healthChecks" : [ {
    "name" : "...",
    "summary" : "GOOD",
    "explanation" : "...",
    "suppressed" : true
  }, {
    "name" : "...",
    "summary" : "BAD",
    "explanation" : "...",
    "suppressed" : true
  } ],
  "haStatus" : "STANDBY",
  "roleUrl" : "...",
  "maintenanceMode" : true,
  "maintenanceOwners" : [ "SERVICE", "ROLE" ],
  "config" : {
    "items" : [ {
      "name" : "...",
      "value" : "...",
      "required" : true,
      "default" : "...",
      "displayName" : "...",
      "description" : "...",
      "relatedName" : "...",
      "sensitive" : true,
      "validationState" : "OK",
      "validationMessage" : "...",
      "validationWarningsSuppressed" : true
    }, {
      "name" : "...",
      "value" : "...",
      "required" : true,
      "default" : "...",
      "displayName" : "...",
      "description" : "...",
      "relatedName" : "...",
      "sensitive" : true,
      "validationState" : "OK",
      "validationMessage" : "...",
      "validationWarningsSuppressed" : true
    } ]
  },
  "roleConfigGroupRef" : {
    "roleConfigGroupName" : "..."
  },
  "zooKeeperServerMode" : "STANDALONE",
  "entityStatus" : "CONCERNING_HEALTH"
}