cascading.stats

## Class BaseCachedNodeStats<Config,JobStatus,Counters>

- java.lang.Object
- - cascading.stats.CascadingStats<FlowSliceStats>
  - - cascading.stats.FlowNodeStats
    - - cascading.stats.BaseCachedNodeStats<Config,JobStatus,Counters>

- All Implemented Interfaces:
    ProvidesCounters, Serializable

      public abstract class BaseCachedNodeStats<Config,JobStatus,Counters>
      extends FlowNodeStats

  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class cascading.stats.CascadingStats

      `CascadingStats.Status, CascadingStats.Type`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected boolean` | `allChildrenFinished`
    `protected CounterCache<Config,JobStatus,Counters>` | `counterCache`
    `protected Map<String,FlowSliceStats>` | `sliceStatsMap`

    - ### Fields inherited from class cascading.stats.FlowNodeStats

      `hasCapturedFinalDetail`

    - ### Fields inherited from class cascading.stats.CascadingStats

      `clientState, finishedTime, lastCaptureDetail, listeners, name, pendingTime, runTime, startTime, STATS_COMPLETE_CHILD_DETAILS_BLOCK_DURATION, STATS_STORE_INTERVAL, status, submitTime, throwable, throwableTrace`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `BaseCachedNodeStats(FlowNode flowNode, ClientState clientState)` Constructor BaseHadoopNodeStats creates a new BaseHadoopNodeStats instance.

  - ### Method Summary

    Methods
    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)`
    `Collection<FlowSliceStats>` | `getChildren()` Method getChildren returns any relevant child statistics instances.
    `FlowSliceStats` | `getChildWith(String id)` Method getChildWith returns a child stats instance with the given ID value.
    `Collection<String>` | `getCounterGroups()` Method getCounterGroups returns all of the Hadoop counter groups.
    `Collection<String>` | `getCounterGroupsMatching(String regex)` Method getCounterGroupsMatching returns all the Hadoop counter groups that match the give regex pattern.
    `Collection<String>` | `getCountersFor(String group)` Method getCountersFor returns the Hadoop counters for the given group.
    `long` | `getCounterValue(Enum counter)` Method getCounterValue returns the Hadoop counter value for the given counter enum.
    `long` | `getCounterValue(String group, 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

    - ### Methods inherited from class cascading.stats.FlowNodeStats

      `getFlowNode, getID, getKind, getOrdinal, getProcessLogger, getType, hasCapturedFinalDetail, recordInfo, toString`

    - ### Methods inherited from class cascading.stats.CascadingStats

      `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`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### sliceStatsMap

          protected final Map<String,FlowSliceStats> sliceStatsMap

    - #### counterCache

          protected CounterCache<Config,JobStatus,Counters> counterCache

    - #### allChildrenFinished

          protected boolean allChildrenFinished

  - ### Constructor Detail

    - #### BaseCachedNodeStats

          protected BaseCachedNodeStats(FlowNode flowNode,
                             ClientState clientState)

      Constructor BaseHadoopNodeStats creates a new BaseHadoopNodeStats instance.
      Parameters:
        `flowNode` -
        `clientState` -

  - ### Method Detail

    - #### getLastSuccessfulCounterFetchTime

          public long getLastSuccessfulCounterFetchTime()

      Description copied from interface: `ProvidesCounters`
      Method getLastSuccessfulCounterFetchTime returns the time, in millis, the last moment counters were successfully retrieved.

      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.
      Returns:
        the moment counters were last successfully retrieved

    - #### isAllChildrenFinished

          public boolean isAllChildrenFinished()

    - #### getCounterGroups

          public Collection<String> getCounterGroups()

      Method getCounterGroups returns all of the Hadoop counter groups.
      Returns:
        the counterGroups (type Collection) of this HadoopStepStats object.

    - #### getCounterGroupsMatching

          public Collection<String> getCounterGroupsMatching(String regex)

      Method getCounterGroupsMatching returns all the Hadoop counter groups that match the give regex pattern.
      Specified by:
        `getCounterGroupsMatching` in class `CascadingStats<FlowSliceStats>`
      Parameters:
        `regex` - of String
      Returns:
        Collection

    - #### getCountersFor

          public Collection<String> getCountersFor(String group)

      Method getCountersFor returns the Hadoop counters for the given group.
      Parameters:
        `group` - of String
      Returns:
        Collection

    - #### getCounterValue

          public long getCounterValue(Enum counter)

      Method getCounterValue returns the Hadoop counter value for the given counter enum.
      Parameters:
        `counter` - of Enum
      Returns:
        long

    - #### getCounterValue

          public long getCounterValue(String group,
                             String counter)

      Method getCounterValue returns the Hadoop counter value for the given group and counter name.
      Parameters:
        `group` - of String
        `counter` - of String
      Returns:
        long

    - #### cachedCounters

          protected Counters cachedCounters(boolean force)

    - #### getChildren

          public Collection<FlowSliceStats> getChildren()

      Description copied from class: `CascadingStats`
      Method getChildren returns any relevant child statistics instances. They may not be of type CascadingStats, but instead platform specific.
      Specified by:
        `getChildren` in class `CascadingStats<FlowSliceStats>`
      Returns:
        a Collection of child statistics

    - #### getChildWith

          public FlowSliceStats getChildWith(String id)

      Description copied from class: `CascadingStats`
      Method getChildWith returns a child stats instance with the given ID value.
      Specified by:
        `getChildWith` in class `CascadingStats<FlowSliceStats>`
      Parameters:
        `id` - the id of a child instance
      Returns:
        the child stats instance or null if not found

    - #### captureDetail

          public final void captureDetail(CascadingStats.Type depth)

      Specified by:
        `captureDetail` in class `CascadingStats<FlowSliceStats>`

    - #### captureChildDetailInternal

          protected abstract boolean captureChildDetailInternal()

      Returns true if was able to capture/refresh the internal child stats cache.
      Returns:
        true if successful

    - #### recordChildStats

          public void recordChildStats()

      Synchronized to prevent state changes mid record, #stop may be called out of band
      Specified by:
        `recordChildStats` in class `FlowNodeStats`

Copyright © 2007-2015 Concurrent, Inc. All Rights Reserved.