public abstract class BaseCachedNodeStats<Config,JobStatus,Counters> extends FlowNodeStats
CascadingStats.Status, CascadingStats.Type
Modifier and Type | Field and Description |
---|---|
protected boolean |
allChildrenFinished |
protected CounterCache<Config,JobStatus,Counters> |
counterCache |
protected java.util.Map<java.lang.String,FlowSliceStats> |
sliceStatsMap |
hasCapturedFinalDetail
clientState, finishedTime, lastCaptureDetail, listeners, name, pendingTime, runTime, startTime, STATS_COMPLETE_CHILD_DETAILS_BLOCK_DURATION, STATS_STORE_INTERVAL, status, submitTime, throwable, throwableTrace
Modifier | Constructor and Description |
---|---|
protected |
BaseCachedNodeStats(FlowNode flowNode,
ClientState clientState)
Constructor BaseHadoopNodeStats creates a new BaseHadoopNodeStats instance.
|
Modifier and Type | Method and Description |
---|---|
protected Counters |
cachedCounters(boolean force) |
protected abstract boolean |
captureChildDetailInternal()
Returns true if was able to capture/refresh the internal child stats cache.
|
void |
captureDetail(CascadingStats.Type depth) |
java.util.Collection<FlowSliceStats> |
getChildren()
Method getChildren returns any relevant child statistics instances.
|
FlowSliceStats |
getChildWith(java.lang.String id)
Method getChildWith returns a child stats instance with the given ID value.
|
java.util.Collection<java.lang.String> |
getCounterGroups()
Method getCounterGroups returns all of the Hadoop counter groups.
|
java.util.Collection<java.lang.String> |
getCounterGroupsMatching(java.lang.String regex)
Method getCounterGroupsMatching returns all the Hadoop counter groups that match the give regex pattern.
|
java.util.Collection<java.lang.String> |
getCountersFor(java.lang.String group)
Method getCountersFor returns the Hadoop counters for the given group.
|
long |
getCounterValue(java.lang.Enum counter)
Method getCounterValue returns the Hadoop counter value for the given counter enum.
|
long |
getCounterValue(java.lang.String group,
java.lang.String counter)
Method getCounterValue returns the Hadoop counter value for the given group and counter name.
|
long |
getLastSuccessfulCounterFetchTime()
Method getLastSuccessfulCounterFetchTime returns the time, in millis, the last moment counters
were successfully retrieved.
|
boolean |
isAllChildrenFinished() |
void |
recordChildStats()
Synchronized to prevent state changes mid record, #stop may be called out of band
|
getFlowNode, getID, getKind, getOrdinal, getProcessLogger, getType, hasCapturedFinalDetail, recordInfo, toString
addListener, captureDetail, cleanup, fireListeners, getCountersFor, getCurrentDuration, getDuration, getFinishedTime, getName, getPendingTime, getPrefix, getRunTime, getStartTime, getStatsString, getStatus, getSubmitTime, getThrowable, getThrowableTrace, isDetailStale, isEngaged, isFailed, isFinished, isPending, isRunning, isSkipped, isStarted, isStopped, isSubmitted, isSuccessful, logDebug, logError, logError, logInfo, logWarn, markDetailCaptured, markFailed, markFailed, markFailed, markFailed, markFinishedTime, markPending, markPendingTime, markRunning, markRunTime, markSkipped, markStarted, markStartedThenRunning, markStartTime, markStartToRunTime, markStopped, markSubmitted, markSubmitTime, markSuccessful, prepare, recordStats, removeListener, setStatsStoreInterval
protected final java.util.Map<java.lang.String,FlowSliceStats> sliceStatsMap
protected CounterCache<Config,JobStatus,Counters> counterCache
protected boolean allChildrenFinished
protected BaseCachedNodeStats(FlowNode flowNode, ClientState clientState)
flowNode
- clientState
- public long getLastSuccessfulCounterFetchTime()
ProvidesCounters
If -1, counter values were never successfully retrieved.
If this return value is less than the CascadingStats.getFinishedTime()
it is likely the
counter service became unavailable.
public boolean isAllChildrenFinished()
public java.util.Collection<java.lang.String> getCounterGroups()
public java.util.Collection<java.lang.String> getCounterGroupsMatching(java.lang.String regex)
getCounterGroupsMatching
in class CascadingStats<FlowSliceStats>
regex
- of Stringpublic java.util.Collection<java.lang.String> getCountersFor(java.lang.String group)
group
- of Stringpublic long getCounterValue(java.lang.Enum counter)
counter
- of Enumpublic long getCounterValue(java.lang.String group, java.lang.String counter)
group
- of Stringcounter
- of Stringprotected Counters cachedCounters(boolean force)
public java.util.Collection<FlowSliceStats> getChildren()
CascadingStats
getChildren
in class CascadingStats<FlowSliceStats>
public FlowSliceStats getChildWith(java.lang.String id)
CascadingStats
getChildWith
in class CascadingStats<FlowSliceStats>
id
- the id of a child instancepublic final void captureDetail(CascadingStats.Type depth)
captureDetail
in class CascadingStats<FlowSliceStats>
protected abstract boolean captureChildDetailInternal()
public void recordChildStats()
recordChildStats
in class FlowNodeStats
Copyright © 2007-2017 Cascading Maintainers. All Rights Reserved.