co.cask.tigon.twill
Class AbortOnTimeoutEventHandler
java.lang.Object
org.apache.twill.api.EventHandler
co.cask.tigon.twill.AbortOnTimeoutEventHandler
public class AbortOnTimeoutEventHandler
- extends org.apache.twill.api.EventHandler
A Twill EventHandler that abort the application if for some runnable it cannot
provision container for too long.
| Nested classes/interfaces inherited from class org.apache.twill.api.EventHandler |
org.apache.twill.api.EventHandler.TimeoutAction, org.apache.twill.api.EventHandler.TimeoutEvent |
| Fields inherited from class org.apache.twill.api.EventHandler |
context |
| Methods inherited from class org.apache.twill.api.EventHandler |
configure, destroy |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbortOnTimeoutEventHandler
public AbortOnTimeoutEventHandler(long abortTime)
- Constructs an instance of AbortOnTimeoutEventHandler that abort the application if some runnable has no
containers, same as calling
AbortOnTimeoutEventHandler(long, boolean) with second parameter as
false.
- Parameters:
abortTime - Time in milliseconds to pass before aborting the application if no container is given to
a runnable.
AbortOnTimeoutEventHandler
public AbortOnTimeoutEventHandler(long abortTime,
boolean abortIfNotFull)
- Constructs an instance of AbortOnTimeoutEventHandler that abort the application if some runnable has not enough
containers.
- Parameters:
abortTime - Time in milliseconds to pass before aborting the application if no container is given to
a runnable.abortIfNotFull - If true, it will abort the application if any runnable doesn't meet the expected
number of instances.
getConfigs
protected Map<String,String> getConfigs()
- Overrides:
getConfigs in class org.apache.twill.api.EventHandler
initialize
public void initialize(org.apache.twill.api.EventHandlerContext context)
- Overrides:
initialize in class org.apache.twill.api.EventHandler
launchTimeout
public org.apache.twill.api.EventHandler.TimeoutAction launchTimeout(Iterable<org.apache.twill.api.EventHandler.TimeoutEvent> timeoutEvents)
- Specified by:
launchTimeout in class org.apache.twill.api.EventHandler
Copyright © 2014 Cask Data, Inc. Licensed under the Apache License, Version 2.0.