org.kitesdk.morphline.base
Class FaultTolerance

java.lang.Object
  extended by org.kitesdk.morphline.base.FaultTolerance
All Implemented Interfaces:
ExceptionHandler

public final class FaultTolerance
extends Object
implements ExceptionHandler

Mission critical, large-scale online production systems need to make progress without downtime despite some issues. Some program exceptions tend to be transient, in which case the corresponding task can be retried. Examples include network connection errors, timeouts, etc. These are called recoverable exceptions. The isIgnoringRecoverableExceptions should only be enabled if an exception misclassification bug has been identified.


Field Summary
static String IS_IGNORING_RECOVERABLE_EXCEPTIONS
           
static String IS_PRODUCTION_MODE
           
static String RECOVERABLE_EXCEPTION_CLASSES
           
 
Constructor Summary
FaultTolerance(boolean isProductionMode, boolean isIgnoringRecoverableExceptions)
           
FaultTolerance(boolean isProductionMode, boolean isIgnoringRecoverableExceptions, String recoverableExceptionClassNames)
           
 
Method Summary
 void handleException(Throwable t, Record record)
          Handle the given exception resulting from the given input record (the record can be null)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IS_PRODUCTION_MODE

public static final String IS_PRODUCTION_MODE
See Also:
Constant Field Values

IS_IGNORING_RECOVERABLE_EXCEPTIONS

public static final String IS_IGNORING_RECOVERABLE_EXCEPTIONS
See Also:
Constant Field Values

RECOVERABLE_EXCEPTION_CLASSES

public static final String RECOVERABLE_EXCEPTION_CLASSES
See Also:
Constant Field Values
Constructor Detail

FaultTolerance

public FaultTolerance(boolean isProductionMode,
                      boolean isIgnoringRecoverableExceptions)

FaultTolerance

public FaultTolerance(boolean isProductionMode,
                      boolean isIgnoringRecoverableExceptions,
                      String recoverableExceptionClassNames)
Method Detail

handleException

public void handleException(Throwable t,
                            Record record)
Description copied from interface: ExceptionHandler
Handle the given exception resulting from the given input record (the record can be null)

Specified by:
handleException in interface ExceptionHandler


Copyright © 2013–2014. All rights reserved.