cascading.stats

## Class CascadeStats

- java.lang.Object
- - cascading.stats.CascadingStats<FlowStats>
  - - cascading.stats.CascadeStats

All Implemented Interfaces:
  ProvidesCounters, Serializable

    public class CascadeStats
    extends CascadingStats<FlowStats>

Class CascadeStats collects `Cascade` specific statistics.

See Also:
  Serialized Form

### Nested Class Summary

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

`CascadingStats.Status, CascadingStats.Type`

### Field Summary

### 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
Constructor and Description
`CascadeStats(Cascade cascade, ClientState clientState)`

### Method Summary

Methods
`void` `addFlowStats(FlowStats flowStats)` Method addFlowStats add a child `Flow` {2link FlowStats} instance.
`void` `captureDetail(CascadingStats.Type depth)`
`Cascade` `getCascade()`
`Collection<FlowStats>` `getChildren()` Method getChildren returns any relevant child statistics instances.
`FlowStats` `getChildWith(String id)` Method getChildWith returns a child stats instance with the given ID value.
`Collection<String>` `getCounterGroups()` Method getCounterGroups returns all the available counter group names.
`Collection<String>` `getCounterGroupsMatching(String regex)` Method getCounterGroupsMatching returns all the available counter group names that match the given regular expression.
`Collection<String>` `getCountersFor(String group)` Method getCountersFor returns all the counter names for the give group name.
`long` `getCounterValue(Enum counter)` Method getCounter returns the current value for the given counter Enum.
`long` `getCounterValue(String group, String counter)` Method getCounter returns the current value for the given group and counter.
`int` `getFlowCount()` Method getFlowCount returns the number of `Flow`s executed by the Cascade.
`String` `getID()` Method getID returns the ID of this CascadingStats object.
`long` `getLastSuccessfulCounterFetchTime()` Method getLastSuccessfulCounterFetchTime returns the time, in millis, the last moment counters were successfully retrieved.
`protected ProcessLogger` `getProcessLogger()`
`CascadingStats.Type` `getType()`
`void` `recordInfo()`
`String` `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`

### Constructor Detail

#### CascadeStats

    public CascadeStats(Cascade cascade,
                ClientState clientState)

### Method Detail

#### getProcessLogger

    protected ProcessLogger getProcessLogger()

Specified by:
  `getProcessLogger` in class `CascadingStats<FlowStats>`

#### getID

    public String getID()

Description copied from class: `CascadingStats`
Method getID returns the ID of this CascadingStats object.

Specified by:
  `getID` in class `CascadingStats<FlowStats>`
Returns:
  the ID (type Object) of this CascadingStats object.

#### getType

    public CascadingStats.Type getType()

Specified by:
  `getType` in class `CascadingStats<FlowStats>`

#### getCascade

    public Cascade getCascade()

#### recordInfo

    public void recordInfo()

Specified by:
  `recordInfo` in class `CascadingStats<FlowStats>`

#### addFlowStats

    public void addFlowStats(FlowStats flowStats)

Method addFlowStats add a child `Flow` {2link FlowStats} instance.

Parameters:
  `flowStats` - of type FlowStats

#### getFlowCount

    public int getFlowCount()

Method getFlowCount returns the number of `Flow`s executed by the Cascade.

Returns:
  the flowCount (type int) of this CascadeStats object.

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

#### getCounterGroups

    public Collection<String> getCounterGroups()

Description copied from interface: `ProvidesCounters`
Method getCounterGroups returns all the available counter group names.

Returns:
  the counterGroups (type Collection<String>) of this CascadingStats object.

#### getCounterGroupsMatching

    public Collection<String> getCounterGroupsMatching(String regex)

Description copied from class: `CascadingStats`
Method getCounterGroupsMatching returns all the available counter group names that match the given regular expression.

Specified by:
  `getCounterGroupsMatching` in class `CascadingStats<FlowStats>`
Parameters:
  `regex` - of type String
Returns:
  Collection<String>

#### getCountersFor

    public Collection<String> getCountersFor(String group)

Description copied from interface: `ProvidesCounters`
Method getCountersFor returns all the counter names for the give group name.

Returns:
  Collection<String>

#### getCounterValue

    public long getCounterValue(Enum counter)

Description copied from interface: `ProvidesCounters`
Method getCounter returns the current value for the given counter Enum.

Parameters:
  `counter` - of type Enum
Returns:
  the current counter value

#### getCounterValue

    public long getCounterValue(String group,
                       String counter)

Description copied from interface: `ProvidesCounters`
Method getCounter returns the current value for the given group and counter.

Parameters:
  `group` - of type String
  `counter` - of type String
Returns:
  the current counter value

#### captureDetail

    public void captureDetail(CascadingStats.Type depth)

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

#### getChildren

    public Collection<FlowStats> 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<FlowStats>`
Returns:
  a Collection of child statistics

#### getChildWith

    public FlowStats 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<FlowStats>`
Parameters:
  `id` - the id of a child instance
Returns:
  the child stats instance or null if not found

#### toString

    public String toString()

Overrides:
  `toString` in class `CascadingStats<FlowStats>`