Class TaskGroup
java.lang.Object
org.apache.hadoop.hbase.monitoring.MonitoredTaskImpl
org.apache.hadoop.hbase.monitoring.TaskGroup
- All Implemented Interfaces:
Cloneable,MonitoredTask
The
TaskGroup can be seen as a big MonitoredTask, which contains a list of sub
monitored tasks. The monitored tasks in the group are still be managed by the
TaskMonitor, but whether to clear/expire the monitored tasks in a task group is optional.
Since the monitored task already has journals, which mark the phases in a task, we still also
need a task group to monitor a big task/process because the journals in a task is serial but the
tasks in the task group can be parallel, then we have more flexible ability to monitor the
process. Grouping the tasks is not strictly necessary but it is cleaner for presentation to
operators. We might want to display the tasks in a group in a list view where each task can be
collapsed (probably by default) or expanded.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.monitoring.MonitoredTask
MonitoredTask.State, MonitoredTask.StatusJournalEntry -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MonitoredTaskUsed to track this task group inTaskMonitorprivate booleanWhether to ignore to track(e.g.private static final org.slf4j.Loggerprivate final ConcurrentLinkedDeque<MonitoredTask>Sub-tasks in the groupFields inherited from class org.apache.hadoop.hbase.monitoring.MonitoredTaskImpl
state -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a new task to the group, and before that might complete the last task in the groupvoidcleanup()Explicitly mark this status as able to be cleaned up, even though it might not be complete.getTasks()voidmarkComplete(String msg) Methods inherited from class org.apache.hadoop.hbase.monitoring.MonitoredTaskImpl
clone, expireNow, getCompletionTimestamp, getDescription, getStartTime, getState, getStateTime, getStatus, getStatusJournal, getStatusTime, getWarnTime, pause, prettyPrintJournal, resume, setDescription, setState, setStatus, setWarnTime, toJSON, toMap, toString
-
Field Details
-
LOG
-
tasks
Sub-tasks in the group -
ignoreSubTasksInTaskMonitor
Whether to ignore to track(e.g. show/clear/expire) in the singletonTaskMonitor -
delegate
Used to track this task group inTaskMonitor
-
-
Constructor Details
-
TaskGroup
-
-
Method Details
-
addTask
-
addTask
Add a new task to the group, and before that might complete the last task in the group- Parameters:
description- the description of the new taskwithCompleteLast- whether to complete the last task in the group- Returns:
- the added new task
-
getTasks
-
abort
- Specified by:
abortin interfaceMonitoredTask- Overrides:
abortin classMonitoredTaskImpl
-
markComplete
- Specified by:
markCompletein interfaceMonitoredTask- Overrides:
markCompletein classMonitoredTaskImpl
-
cleanup
Description copied from interface:MonitoredTaskExplicitly mark this status as able to be cleaned up, even though it might not be complete.- Specified by:
cleanupin interfaceMonitoredTask- Overrides:
cleanupin classMonitoredTaskImpl
-