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
Modifier and TypeFieldDescriptionprivate final MonitoredTask
Used to track this task group inTaskMonitor
private boolean
Whether to ignore to track(e.g.private static final org.slf4j.Logger
private final ConcurrentLinkedDeque<MonitoredTask>
Sub-tasks in the groupFields inherited from class org.apache.hadoop.hbase.monitoring.MonitoredTaskImpl
state
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a new task to the group, and before that might complete the last task in the groupvoid
cleanup()
Explicitly mark this status as able to be cleaned up, even though it might not be complete.getTasks()
void
markComplete
(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:
abort
in interfaceMonitoredTask
- Overrides:
abort
in classMonitoredTaskImpl
-
markComplete
- Specified by:
markComplete
in interfaceMonitoredTask
- Overrides:
markComplete
in classMonitoredTaskImpl
-
cleanup
Description copied from interface:MonitoredTask
Explicitly mark this status as able to be cleaned up, even though it might not be complete.- Specified by:
cleanup
in interfaceMonitoredTask
- Overrides:
cleanup
in classMonitoredTaskImpl
-