com.cloudera.api.model
Class ApiRole

java.lang.Object
  extended by com.cloudera.api.model.ApiRole

public class ApiRole
extends Object

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.


Nested Class Summary
static class ApiRole.HaStatus
           
static class ApiRole.ZooKeeperServerMode
          The state of the Zookeeper server.
 
Constructor Summary
ApiRole()
           
 
Method Summary
 boolean equals(Object o)
           
 ApiCommissionState getCommissionState()
          Readonly.
 ApiConfigList getConfig()
          The role configuration.
 Boolean getConfigStale()
          Deprecated. Use configStalenessStatus instead which exposes more staleness state. Deprecated since V6.
 ApiConfigStalenessStatus getConfigStalenessStatus()
          Readonly.
 ApiEntityStatus getEntityStatus()
          Readonly.
 ApiRole.HaStatus getHaStatus()
          Readonly.
 List<ApiHealthCheck> getHealthChecks()
          Readonly.
 ApiHealthSummary getHealthSummary()
          Readonly.
 ApiHostRef getHostRef()
          A reference to the host where this role runs.
 Boolean getMaintenanceMode()
          Readonly.
 List<ApiEntityType> getMaintenanceOwners()
          Readonly.
 String getName()
          The name of the role.
 ApiRoleConfigGroupRef getRoleConfigGroupRef()
          Readonly.
 ApiRoleState getRoleState()
          Readonly.
 String getRoleUrl()
          Readonly.
 ApiServiceRef getServiceRef()
          Readonly.
 String getType()
          The type of the role, e.g.
 ApiRole.ZooKeeperServerMode getZooKeeperServerMode()
          Readonly.
 int hashCode()
           
 void setCommissionState(ApiCommissionState commissionState)
           
 void setConfig(ApiConfigList config)
           
 void setConfigStale(Boolean configStale)
           
 void setConfigStalenessStatus(ApiConfigStalenessStatus configStalenessStatus)
           
 void setEntityStatus(ApiEntityStatus entityStatus)
           
 void setHaStatus(ApiRole.HaStatus haStatus)
           
 void setHealthChecks(List<ApiHealthCheck> healthChecks)
           
 void setHealthSummary(ApiHealthSummary healthSummary)
           
 void setHostRef(ApiHostRef hostRef)
           
 void setMaintenanceMode(Boolean maintenanceMode)
           
 void setMaintenanceOwners(List<ApiEntityType> maintenanceOwners)
           
 void setName(String name)
           
 void setRoleConfigGroupRef(ApiRoleConfigGroupRef roleConfigGroupRef)
           
 void setRoleState(ApiRoleState roleState)
           
 void setRoleUrl(String roleUrl)
           
 void setServiceRef(ApiServiceRef serviceRef)
           
 void setType(String type)
           
 void setZooKeeperServerMode(ApiRole.ZooKeeperServerMode zooKeeperServerMode)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApiRole

public ApiRole()
Method Detail

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getName

public String getName()
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.


setName

public void setName(String name)

getType

public String getType()
The type of the role, e.g. NAMENODE, DATANODE, TASKTRACKER.


setType

public void setType(String type)

getHostRef

public ApiHostRef getHostRef()
A reference to the host where this role runs.


setHostRef

public void setHostRef(ApiHostRef hostRef)

getServiceRef

public ApiServiceRef getServiceRef()
Readonly. A reference to the parent service.


setServiceRef

public void setServiceRef(ApiServiceRef serviceRef)

getRoleState

public ApiRoleState getRoleState()
Readonly. The configured run state of this role. Whether it's running, etc.


setRoleState

public void setRoleState(ApiRoleState roleState)

getCommissionState

public ApiCommissionState getCommissionState()
Readonly. The commission state of this role. Available since API v2.


setCommissionState

public void setCommissionState(ApiCommissionState commissionState)

getHealthSummary

public ApiHealthSummary getHealthSummary()
Readonly. The high-level health status of this role.


setHealthSummary

public void setHealthSummary(ApiHealthSummary healthSummary)

getConfigStale

@Deprecated
public Boolean getConfigStale()
Deprecated. Use configStalenessStatus instead which exposes more staleness state. Deprecated since V6.

Readonly. Expresses whether the role configuration is stale.


setConfigStale

public void setConfigStale(Boolean configStale)

getConfigStalenessStatus

public ApiConfigStalenessStatus getConfigStalenessStatus()
Readonly. Expresses the role's configuration staleness status. Available since API v6.


setConfigStalenessStatus

public void setConfigStalenessStatus(ApiConfigStalenessStatus configStalenessStatus)

getHealthChecks

public List<ApiHealthCheck> getHealthChecks()
Readonly. The list of health checks of this service.


setHealthChecks

public void setHealthChecks(List<ApiHealthCheck> healthChecks)

getHaStatus

public ApiRole.HaStatus getHaStatus()
Readonly. The HA status of this role.


setHaStatus

public void setHaStatus(ApiRole.HaStatus haStatus)

getRoleUrl

public String getRoleUrl()
Readonly. Link into the Cloudera Manager web UI for this specific role.


setRoleUrl

public void setRoleUrl(String roleUrl)

getMaintenanceMode

public Boolean getMaintenanceMode()
Readonly. Whether the role is in maintenance mode. Available since API v2.


setMaintenanceMode

public void setMaintenanceMode(Boolean maintenanceMode)

getMaintenanceOwners

public List<ApiEntityType> getMaintenanceOwners()
Readonly. The list of objects that trigger this role to be in maintenance mode. Available since API v2.


setMaintenanceOwners

public void setMaintenanceOwners(List<ApiEntityType> maintenanceOwners)

getConfig

public ApiConfigList getConfig()
The role configuration. Optional.


setConfig

public void setConfig(ApiConfigList config)

getRoleConfigGroupRef

public ApiRoleConfigGroupRef getRoleConfigGroupRef()
Readonly. The reference to the role configuration group of this role. Available since API v3.


setRoleConfigGroupRef

public void setRoleConfigGroupRef(ApiRoleConfigGroupRef roleConfigGroupRef)

getZooKeeperServerMode

public ApiRole.ZooKeeperServerMode getZooKeeperServerMode()
Readonly. The ZooKeeper server mode for this role. Note that for non-ZooKeeper Server roles this will be null. Available since API v6.


setZooKeeperServerMode

public void setZooKeeperServerMode(ApiRole.ZooKeeperServerMode zooKeeperServerMode)

getEntityStatus

public ApiEntityStatus getEntityStatus()
Readonly. The entity status for this role. Available since API v11.


setEntityStatus

public void setEntityStatus(ApiEntityStatus entityStatus)


Copyright © Cloudera, Inc. Released under Apache License, Version 2.0.