public class DefaultContainerMonitor extends AbstractMonitor implements ContainerAware, ContainerMonitor
ContainerMonitor
which simple
tracks number of total and completed containers.Constructor and Description |
---|
DefaultContainerMonitor() |
Modifier and Type | Method and Description |
---|---|
int |
completedCount()
Gets a count of completed containers.
|
int |
failedCount()
Gets a count of failed containers.
|
int |
freeCount()
Gets a count of free containers.
|
void |
onContainer(java.util.List<org.apache.hadoop.yarn.api.records.Container> containers)
Called when we potentially have new information
about a
Container s. |
void |
onContainerStatus(java.util.List<org.apache.hadoop.yarn.api.records.ContainerStatus> containerStatuses)
Called when we potentially have new information
about a
ContainerStatus s. |
int |
runningCount()
Gets a count of running containers.
|
java.lang.String |
toDebugString()
Gets this class description as a debug string.
|
addContainerMonitorStateListener, notifyState
afterPropertiesSet, doStart, doStop, getBeanFactory, getPhase, getTaskExecutor, getTaskScheduler, getYarnEventPublisher, isAutoStartup, isRunning, onInit, setAutoStartup, setBeanFactory, setPhase, setTaskExecutor, setTaskScheduler, setYarnEventPublisher, start, stop, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addContainerMonitorStateListener
public void onContainer(java.util.List<org.apache.hadoop.yarn.api.records.Container> containers)
ContainerAware
Container
s.onContainer
in interface ContainerAware
containers
- the containerspublic void onContainerStatus(java.util.List<org.apache.hadoop.yarn.api.records.ContainerStatus> containerStatuses)
ContainerAware
ContainerStatus
s.onContainerStatus
in interface ContainerAware
containerStatuses
- the container statusespublic int freeCount()
ContainerMonitor
freeCount
in interface ContainerMonitor
public int runningCount()
ContainerMonitor
runningCount
in interface ContainerMonitor
public int failedCount()
ContainerMonitor
failedCount
in interface ContainerMonitor
public int completedCount()
ContainerMonitor
completedCount
in interface ContainerMonitor
public java.lang.String toDebugString()