org.apache.oozie
Class FaultInjection

java.lang.Object
  extended by org.apache.oozie.FaultInjection

public abstract class FaultInjection
extends Object

Fault Injection support class.

Concrete classes should be available only during testing, not in production.

To activate fault injection the FAULT_INJECTION system property must be set to true.

When fault injection is activated, the concrete class (specified by name) will be call for activation.

Concrete classes should be activated by presense of a second system property.

This fault injection pattern provides 3 levels of safeguard: a general 'fault injection' system property, the availabity of of the concrete 'fault injection' class in the classpath, a specifi 'fault injection' system property.

Refer to the SkipCommitFaultInjection class in the test classes for an example.


Field Summary
static String FAULT_INJECTION
           
 
Constructor Summary
FaultInjection()
           
 
Method Summary
abstract  boolean activate()
           
static boolean activate(String className)
           
abstract  void deactivate()
           
static void deactivate(String className)
           
abstract  boolean isActive()
           
static boolean isActive(String className)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FAULT_INJECTION

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

FaultInjection

public FaultInjection()
Method Detail

activate

public static boolean activate(String className)

deactivate

public static void deactivate(String className)

isActive

public static boolean isActive(String className)

activate

public abstract boolean activate()

deactivate

public abstract void deactivate()

isActive

public abstract boolean isActive()


Copyright © 2013 Apache Software Foundation. All Rights Reserved.