public class FailOnMissingSuccessFlowListener extends java.lang.Object implements FlowListener
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 and Description |
---|
FailOnMissingSuccessFlowListener() |
Modifier and Type | Method and Description |
---|---|
void |
accumulate(java.util.Set<cascading.tap.hadoop.Hfs> taps,
Tap value) |
void |
iterate(java.util.Set<cascading.tap.hadoop.Hfs> taps,
MultiSourceTap value) |
void |
onCompleted(Flow flow) |
void |
onStarting(Flow flow) |
void |
onStopping(Flow flow) |
boolean |
onThrowable(Flow flow,
java.lang.Throwable throwable) |
boolean |
testExists(Flow flow,
cascading.tap.hadoop.Hfs tap) |
public FailOnMissingSuccessFlowListener()
public void onStarting(Flow flow)
onStarting
in interface FlowListener
public boolean testExists(Flow flow, cascading.tap.hadoop.Hfs tap)
public void accumulate(java.util.Set<cascading.tap.hadoop.Hfs> taps, Tap value)
public void iterate(java.util.Set<cascading.tap.hadoop.Hfs> taps, MultiSourceTap value)
public void onStopping(Flow flow)
onStopping
in interface FlowListener
public void onCompleted(Flow flow)
onCompleted
in interface FlowListener
public boolean onThrowable(Flow flow, java.lang.Throwable throwable)
onThrowable
in interface FlowListener
Copyright © 2007-2015 Xplenty, Inc. All Rights Reserved.