Class MonitoredTaskImpl
java.lang.Object
org.apache.hadoop.hbase.monitoring.MonitoredTaskImpl
- All Implemented Interfaces:
Cloneable
,MonitoredTask
- Direct Known Subclasses:
MonitoredRPCHandlerImpl
,TaskGroup
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static final class
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.monitoring.MonitoredTask
MonitoredTask.State, MonitoredTask.StatusJournalEntry
-
Field Summary
Modifier and TypeFieldDescriptionprivate String
private static final org.apache.hbase.thirdparty.com.google.gson.Gson
private final ConcurrentLinkedQueue<MonitoredTask.StatusJournalEntry>
private long
protected MonitoredTask.State
private long
private String
private long
private long
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
cleanup()
Explicitly mark this status as able to be cleaned up, even though it might not be complete.clone()
Public exposure of Object.clone() in order to allow clients to easily capture current state.void
Force the completion timestamp backwards so that it expires now.long
long
getState()
long
Returns the status journal.long
long
void
markComplete
(String status) void
void
void
setDescription
(String description) protected void
setState
(MonitoredTask.State state) void
void
setWarnTime
(long t) toJSON()
Creates a JSON object for parseable exposure of monitored tasks.toMap()
Creates a string map of internal details for extensible exposure of monitored tasks.toString()
-
Field Details
-
startTime
-
statusTime
-
stateTime
-
warnTime
-
status
-
description
-
state
-
journal
-
GSON
-
-
Constructor Details
-
MonitoredTaskImpl
-
-
Method Details
-
clone
Description copied from interface:MonitoredTask
Public exposure of Object.clone() in order to allow clients to easily capture current state.- Specified by:
clone
in interfaceMonitoredTask
- Overrides:
clone
in classObject
- Returns:
- a copy of the object whose references will not change
-
getStartTime
- Specified by:
getStartTime
in interfaceMonitoredTask
-
getDescription
- Specified by:
getDescription
in interfaceMonitoredTask
-
getStatus
- Specified by:
getStatus
in interfaceMonitoredTask
-
getStatusTime
- Specified by:
getStatusTime
in interfaceMonitoredTask
-
getState
- Specified by:
getState
in interfaceMonitoredTask
-
getStateTime
- Specified by:
getStateTime
in interfaceMonitoredTask
-
getWarnTime
- Specified by:
getWarnTime
in interfaceMonitoredTask
-
getCompletionTimestamp
- Specified by:
getCompletionTimestamp
in interfaceMonitoredTask
-
markComplete
- Specified by:
markComplete
in interfaceMonitoredTask
-
pause
- Specified by:
pause
in interfaceMonitoredTask
-
resume
- Specified by:
resume
in interfaceMonitoredTask
-
abort
- Specified by:
abort
in interfaceMonitoredTask
-
setStatus
- Specified by:
setStatus
in interfaceMonitoredTask
-
setState
-
setDescription
- Specified by:
setDescription
in interfaceMonitoredTask
-
setWarnTime
- Specified by:
setWarnTime
in interfaceMonitoredTask
-
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
-
expireNow
Force the completion timestamp backwards so that it expires now.- Specified by:
expireNow
in interfaceMonitoredTask
-
toMap
Description copied from interface:MonitoredTask
Creates a string map of internal details for extensible exposure of monitored tasks.- Specified by:
toMap
in interfaceMonitoredTask
- Returns:
- A Map containing information for this task.
-
toJSON
Description copied from interface:MonitoredTask
Creates a JSON object for parseable exposure of monitored tasks.- Specified by:
toJSON
in interfaceMonitoredTask
- Returns:
- An encoded JSON object containing information for this task.
- Throws:
IOException
-
toString
-
getStatusJournal
Returns the status journal. This implementation of status journal is not thread-safe. Currently we use this to track various stages of flushes and compactions where we can use this/pretty print for post task analysis, by which time we are already done changing states (writing to journal)- Specified by:
getStatusJournal
in interfaceMonitoredTask
-
prettyPrintJournal
- Specified by:
prettyPrintJournal
in interfaceMonitoredTask
-