public class ProviderAppState extends Object implements StateAccessForProviders
StateAccessForProviders, which means
state access for providers, web UI and IPC/REST views.| Constructor and Description |
|---|
ProviderAppState(String applicationName,
AppState appState) |
| Modifier and Type | Method and Description |
|---|---|
List<RoleInstance> |
cloneLiveContainerInfoList()
Create a clone of the list of live cluster nodes.
|
List<RoleInstance> |
cloneOwnedContainerList()
Clone a list of active containers
|
List<RoleStatus> |
cloneRoleStatusList()
Get a deep clone of the role status list.
|
List<RoleInstance> |
enumLiveInstancesInRole(String role)
Enum all role instances by role.
|
ConfTreeOperations |
getAppConfSnapshot()
Get at the snapshot of the appconf config
Changes here do not affect the application state.
|
ApplicationLivenessInformation |
getApplicationLivenessInformation()
get application liveness information
|
String |
getApplicationName()
Get the name of the application
|
ClusterDescription |
getClusterStatus()
Get the current cluster description
|
ComponentInformation |
getComponentInformation(String component)
Get the JSON serializable information about a component
|
Map<String,ComponentInformation> |
getComponentInfoSnapshot()
Get a snapshot of component information.
|
Map<org.apache.hadoop.yarn.api.records.ContainerId,RoleInstance> |
getFailedContainers()
Get a map of all the failed containers
|
AggregateConf |
getInstanceDefinitionSnapshot()
Get a snapshot of the entire aggregate configuration
|
ConfTreeOperations |
getInternalsSnapshot()
Get at the snapshot of the internals config.
|
Map<org.apache.hadoop.yarn.api.records.ContainerId,RoleInstance> |
getLiveContainers()
Get the live containers.
|
RoleInstance |
getLiveInstanceByContainerID(String containerId)
Get the
RoleInstance details on a container. |
List<RoleInstance> |
getLiveInstancesByContainerIDs(Collection<String> containerIDs)
Get the details on a list of instaces referred to by ID.
|
Map<String,Integer> |
getLiveStatistics()
Get the live statistics map
|
NodeInformation |
getNodeInformation(String hostname)
get information on a node
|
Map<String,NodeInformation> |
getNodeInformationSnapshot()
Get a clone of the nodemap.
|
int |
getNumOwnedContainers()
Get the number of active containers
|
PublishedConfigSet |
getOrCreatePublishedConfigSet(String name)
Get a named published config set, creating it if need be.
|
RoleInstance |
getOwnedContainer(org.apache.hadoop.yarn.api.records.ContainerId id)
Get any active container with the given ID
|
RoleInstance |
getOwnedContainer(String id)
Get any active container with the given ID
|
PublishedConfigSet |
getPublishedConfigSet(String name)
Get a named published config set
|
PublishedExportsSet |
getPublishedExportsSet()
Get the published exports set
|
PublishedConfigSet |
getPublishedSliderConfigurations()
Get the published configurations
|
ConfTreeOperations |
getResourcesSnapshot()
Get at the snapshot of the resource config
Changes here do not affect the application state.
|
Map<String,Map<String,ClusterNode>> |
getRoleClusterNodeMapping()
Find out about the nodes for specific roles
|
RoleStatistics |
getRoleStatistics()
Get the aggregate statistics across all roles
|
Map<Integer,RoleStatus> |
getRoleStatusMap()
Get a map of role status entries by role Id
|
long |
getSnapshotTime() |
AggregateConf |
getUnresolvedInstanceDefinition()
Get the desired/unresolved value
|
boolean |
isApplicationLive()
Flag set to indicate the application is live -this only happens
after the buildInstance operation
|
List<String> |
listConfigSets()
List the config sets -this takes a clone of the current set
|
List<RoleInstance> |
lookupRoleContainers(String component)
Look up all containers of a specific component name
|
RoleStatus |
lookupRoleStatus(org.apache.hadoop.yarn.api.records.Container c)
Look up a role from its key -or fail
|
RoleStatus |
lookupRoleStatus(int key)
Look up a role from its key -or fail
|
RoleStatus |
lookupRoleStatus(String name)
Look up a role from its key -or fail
|
ClusterDescription |
refreshClusterStatus()
Update the cluster description with anything interesting
|
void |
setApplicationName(String applicationName) |
public void setApplicationName(String applicationName)
public String getApplicationName()
StateAccessForProvidersgetApplicationName in interface StateAccessForProviderspublic PublishedConfigSet getPublishedSliderConfigurations()
StateAccessForProvidersgetPublishedSliderConfigurations in interface StateAccessForProviderspublic PublishedExportsSet getPublishedExportsSet()
StateAccessForProvidersgetPublishedExportsSet in interface StateAccessForProviderspublic PublishedConfigSet getPublishedConfigSet(String name)
StateAccessForProvidersgetPublishedConfigSet in interface StateAccessForProvidersname - name to look uppublic PublishedConfigSet getOrCreatePublishedConfigSet(String name)
StateAccessForProvidersgetOrCreatePublishedConfigSet in interface StateAccessForProvidersname - name to look uppublic List<String> listConfigSets()
StateAccessForProviderslistConfigSets in interface StateAccessForProviderspublic Map<Integer,RoleStatus> getRoleStatusMap()
StateAccessForProvidersgetRoleStatusMap in interface StateAccessForProviderspublic Map<org.apache.hadoop.yarn.api.records.ContainerId,RoleInstance> getFailedContainers()
StateAccessForProvidersgetFailedContainers in interface StateAccessForProviderspublic Map<org.apache.hadoop.yarn.api.records.ContainerId,RoleInstance> getLiveContainers()
StateAccessForProvidersgetLiveContainers in interface StateAccessForProviderspublic ClusterDescription getClusterStatus()
StateAccessForProvidersgetClusterStatus in interface StateAccessForProviderspublic ConfTreeOperations getResourcesSnapshot()
StateAccessForProvidersgetResourcesSnapshot in interface StateAccessForProviderspublic ConfTreeOperations getAppConfSnapshot()
StateAccessForProvidersgetAppConfSnapshot in interface StateAccessForProviderspublic ConfTreeOperations getInternalsSnapshot()
StateAccessForProvidersgetInternalsSnapshot in interface StateAccessForProviderspublic boolean isApplicationLive()
StateAccessForProvidersisApplicationLive in interface StateAccessForProviderspublic long getSnapshotTime()
getSnapshotTime in interface StateAccessForProviderspublic AggregateConf getInstanceDefinitionSnapshot()
StateAccessForProvidersgetInstanceDefinitionSnapshot in interface StateAccessForProviderspublic AggregateConf getUnresolvedInstanceDefinition()
StateAccessForProvidersgetUnresolvedInstanceDefinition in interface StateAccessForProviderspublic RoleStatus lookupRoleStatus(int key)
StateAccessForProviderslookupRoleStatus in interface StateAccessForProviderskey - key to resolvepublic RoleStatus lookupRoleStatus(org.apache.hadoop.yarn.api.records.Container c) throws org.apache.hadoop.yarn.exceptions.YarnRuntimeException
StateAccessForProviderslookupRoleStatus in interface StateAccessForProvidersc - container in a roleorg.apache.hadoop.yarn.exceptions.YarnRuntimeException - on no matchpublic RoleStatus lookupRoleStatus(String name) throws org.apache.hadoop.yarn.exceptions.YarnRuntimeException
StateAccessForProviderslookupRoleStatus in interface StateAccessForProvidersname - container in a roleorg.apache.hadoop.yarn.exceptions.YarnRuntimeException - on no matchpublic List<RoleInstance> cloneOwnedContainerList()
StateAccessForProviderscloneOwnedContainerList in interface StateAccessForProviderspublic int getNumOwnedContainers()
StateAccessForProvidersgetNumOwnedContainers in interface StateAccessForProviderspublic RoleInstance getOwnedContainer(org.apache.hadoop.yarn.api.records.ContainerId id)
StateAccessForProvidersgetOwnedContainer in interface StateAccessForProvidersid - container Idpublic RoleInstance getOwnedContainer(String id) throws NoSuchNodeException
StateAccessForProvidersgetOwnedContainer in interface StateAccessForProvidersid - container IdNoSuchNodeExceptionpublic List<RoleInstance> cloneLiveContainerInfoList()
StateAccessForProviderscloneLiveContainerInfoList in interface StateAccessForProviderspublic RoleInstance getLiveInstanceByContainerID(String containerId) throws NoSuchNodeException
StateAccessForProvidersRoleInstance details on a container.
This is an O(n) operationgetLiveInstanceByContainerID in interface StateAccessForProviderscontainerId - the container IDNoSuchNodeException - if the node cannot be foundpublic List<RoleInstance> getLiveInstancesByContainerIDs(Collection<String> containerIDs)
StateAccessForProvidersgetLiveInstancesByContainerIDs in interface StateAccessForProviderscontainerIDs - the containerspublic ClusterDescription refreshClusterStatus()
StateAccessForProvidersrefreshClusterStatus in interface StateAccessForProviderspublic List<RoleStatus> cloneRoleStatusList()
StateAccessForProviderscloneRoleStatusList in interface StateAccessForProviderspublic ApplicationLivenessInformation getApplicationLivenessInformation()
StateAccessForProvidersgetApplicationLivenessInformation in interface StateAccessForProviderspublic Map<String,Integer> getLiveStatistics()
StateAccessForProvidersgetLiveStatistics in interface StateAccessForProvidersStatusKeys
keylist.public Map<String,ComponentInformation> getComponentInfoSnapshot()
StateAccessForProvidersThis does not include any container list, which is more expensive to create.
getComponentInfoSnapshot in interface StateAccessForProviderspublic Map<String,Map<String,ClusterNode>> getRoleClusterNodeMapping()
StateAccessForProvidersgetRoleClusterNodeMapping in interface StateAccessForProviderspublic List<RoleInstance> enumLiveInstancesInRole(String role)
StateAccessForProvidersenumLiveInstancesInRole in interface StateAccessForProvidersrole - role, or "" for all rolespublic List<RoleInstance> lookupRoleContainers(String component)
StateAccessForProviderslookupRoleContainers in interface StateAccessForProviderscomponent - component/role namepublic ComponentInformation getComponentInformation(String component)
StateAccessForProvidersgetComponentInformation in interface StateAccessForProviderscomponent - component to look uppublic Map<String,NodeInformation> getNodeInformationSnapshot()
StateAccessForProvidersgetNodeInformationSnapshot in interface StateAccessForProviderspublic NodeInformation getNodeInformation(String hostname)
StateAccessForProvidersgetNodeInformation in interface StateAccessForProvidershostname - hostname to look uppublic RoleStatistics getRoleStatistics()
StateAccessForProvidersgetRoleStatistics in interface StateAccessForProvidersCopyright © 2014–2015 The Apache Software Foundation. All rights reserved.