cascading.flow.hadoop

## Class FailOnMissingSuccessFlowListener

- java.lang.Object
- - cascading.flow.hadoop.FailOnMissingSuccessFlowListener

- All Implemented Interfaces:
    FlowListener

      public class FailOnMissingSuccessFlowListener
      extends java.lang.Object
      implements FlowListener

  Class FailOnMissingSuccessFlowListener is a `FlowListener` that tests that all sources to a `Flow` have a `_SUCCESS` file before allowing the Flow to execute.

  If any source Tap is a directory, existence of `_SUCCESS` is made, if the source is a file, the existence test is skipped.

  This listener will unwind any `PartitionTap` or `MultiSourceTap` instances looking for `Hfs` instances to verify. If any Tap is found that is not a PartitionTap, MultiSourceTap, or Hfs type, an error will be thrown.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FailOnMissingSuccessFlowListener()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `accumulate(java.util.Set<Hfs> taps, Tap value)`
    `void` | `iterate(java.util.Set<Hfs> taps, MultiSourceTap value)`
    `void` | `onCompleted(Flow flow)` The onCompleted event is fired when a Flow instance has completed all work whether if was success or failed.
    `void` | `onStarting(Flow flow)` The onStarting event is fired when a Flow instance receives the start() message.
    `void` | `onStopping(Flow flow)` The onStopping event is fired when a Flow instance receives the stop() message.
    `boolean` | `onThrowable(Flow flow, java.lang.Throwable throwable)` The onThrowable event is fired if any child `FlowStep` throws a Throwable type.
    `boolean` | `testExists(Flow flow, Hfs tap)`

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

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

- - ### Constructor Detail

    - #### FailOnMissingSuccessFlowListener

          public FailOnMissingSuccessFlowListener()

  - ### Method Detail

    - #### onStarting

          public void onStarting(Flow flow)

      Description copied from interface: `FlowListener`
      The onStarting event is fired when a Flow instance receives the start() message.
      Specified by:
        `onStarting` in interface `FlowListener`

    - #### testExists

          public boolean testExists(Flow flow,
                           Hfs tap)

    - #### accumulate

          public void accumulate(java.util.Set<Hfs> taps,
                        Tap value)

    - #### iterate

          public void iterate(java.util.Set<Hfs> taps,
                     MultiSourceTap value)

    - #### onStopping

          public void onStopping(Flow flow)

      Description copied from interface: `FlowListener`
      The onStopping event is fired when a Flow instance receives the stop() message.
      Specified by:
        `onStopping` in interface `FlowListener`

    - #### onCompleted

          public void onCompleted(Flow flow)

      Description copied from interface: `FlowListener`
      The onCompleted event is fired when a Flow instance has completed all work whether if was success or failed. If there was a thrown exception, onThrowable will be fired before this event.
      Specified by:
        `onCompleted` in interface `FlowListener`

    - #### onThrowable

          public boolean onThrowable(Flow flow,
                            java.lang.Throwable throwable)

      Description copied from interface: `FlowListener`
      The onThrowable event is fired if any child `FlowStep` throws a Throwable type. This throwable is passed as an argument to the event. This event method should return true if the given throwable was handled and should not be rethrown from the `Flow.complete()` method.
      Specified by:
        `onThrowable` in interface `FlowListener`
      Returns:
        returns true if this listener has handled the given throwable

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