Class MonitoredTaskImpl
java.lang.Object
org.apache.hadoop.hbase.monitoring.MonitoredTaskImpl
- All Implemented Interfaces:
Cloneable,MonitoredTask
- Direct Known Subclasses:
MonitoredRPCHandlerImpl,TaskGroup
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classNested classes/interfaces inherited from interface org.apache.hadoop.hbase.monitoring.MonitoredTask
MonitoredTask.State, MonitoredTask.StatusJournalEntry -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate static final org.apache.hbase.thirdparty.com.google.gson.Gsonprivate final ConcurrentLinkedQueue<MonitoredTask.StatusJournalEntry>private longprotected MonitoredTask.Stateprivate longprivate Stringprivate longprivate long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcleanup()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.voidForce the completion timestamp backwards so that it expires now.longlonggetState()longReturns the status journal.longlongvoidmarkComplete(String status) voidvoidvoidsetDescription(String description) protected voidsetState(MonitoredTask.State state) voidvoidsetWarnTime(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:MonitoredTaskPublic exposure of Object.clone() in order to allow clients to easily capture current state.- Specified by:
clonein interfaceMonitoredTask- Overrides:
clonein classObject- Returns:
- a copy of the object whose references will not change
-
getStartTime
- Specified by:
getStartTimein interfaceMonitoredTask
-
getDescription
- Specified by:
getDescriptionin interfaceMonitoredTask
-
getStatus
- Specified by:
getStatusin interfaceMonitoredTask
-
getStatusTime
- Specified by:
getStatusTimein interfaceMonitoredTask
-
getState
- Specified by:
getStatein interfaceMonitoredTask
-
getStateTime
- Specified by:
getStateTimein interfaceMonitoredTask
-
getWarnTime
- Specified by:
getWarnTimein interfaceMonitoredTask
-
getCompletionTimestamp
- Specified by:
getCompletionTimestampin interfaceMonitoredTask
-
markComplete
- Specified by:
markCompletein interfaceMonitoredTask
-
pause
- Specified by:
pausein interfaceMonitoredTask
-
resume
- Specified by:
resumein interfaceMonitoredTask
-
abort
- Specified by:
abortin interfaceMonitoredTask
-
setStatus
- Specified by:
setStatusin interfaceMonitoredTask
-
setState
-
setDescription
- Specified by:
setDescriptionin interfaceMonitoredTask
-
setWarnTime
- Specified by:
setWarnTimein interfaceMonitoredTask
-
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
-
expireNow
Force the completion timestamp backwards so that it expires now.- Specified by:
expireNowin interfaceMonitoredTask
-
toMap
Description copied from interface:MonitoredTaskCreates a string map of internal details for extensible exposure of monitored tasks.- Specified by:
toMapin interfaceMonitoredTask- Returns:
- A Map containing information for this task.
-
toJSON
Description copied from interface:MonitoredTaskCreates a JSON object for parseable exposure of monitored tasks.- Specified by:
toJSONin 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:
getStatusJournalin interfaceMonitoredTask
-
prettyPrintJournal
- Specified by:
prettyPrintJournalin interfaceMonitoredTask
-