org.springframework.yarn.boot.test.junit
Class AbstractBootYarnClusterTests
java.lang.Object
org.springframework.yarn.test.junit.AbstractYarnClusterTests
org.springframework.yarn.boot.test.junit.AbstractBootYarnClusterTests
- All Implemented Interfaces:
- Aware, ApplicationContextAware
public abstract class AbstractBootYarnClusterTests
- extends org.springframework.yarn.test.junit.AbstractYarnClusterTests
Abstract base class providing default functionality for running tests for
Spring Yarn Boot based apps using Yarn mini cluster.
- Author:
- Janne Valkealahti
| Fields inherited from class org.springframework.yarn.test.junit.AbstractYarnClusterTests |
applicationContext, configuration, yarnClient, yarnCluster |
| Methods inherited from class org.springframework.yarn.test.junit.AbstractYarnClusterTests |
getApplicationContext, getConfiguration, getState, getYarnClient, getYarnCluster, killApplication, setApplicationContext, setConfiguration, setYarnCluster, submitApplication, submitApplicationAndWait, submitApplicationAndWait, submitApplicationAndWaitState, waitState |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractBootYarnClusterTests
public AbstractBootYarnClusterTests()
setYarnClient
public void setYarnClient(org.springframework.yarn.client.YarnClient yarnClient)
- Overrides:
setYarnClient in class org.springframework.yarn.test.junit.AbstractYarnClusterTests
submitApplicationAndWait
protected org.springframework.yarn.test.junit.ApplicationInfo submitApplicationAndWait(Object source,
String[] args)
throws Exception
- Submits application and wait state. On default
waits 60 seconds.
- Parameters:
source - the boot application config sourceargs - the boot application args
- Returns:
- Application info for submit
- Throws:
Exception - if exception occurred- See Also:
ApplicationInfo,
submitApplicationAndWaitState(Object, String[], long, TimeUnit, YarnApplicationState...)
submitApplicationAndWait
protected org.springframework.yarn.test.junit.ApplicationInfo submitApplicationAndWait(Object source,
String[] args,
long timeout,
TimeUnit unit)
throws Exception
- Submits application and wait state.
- Parameters:
source - the boot application config sourceargs - the boot application argstimeout - the timeout for waitunit - the unit for timeout
- Returns:
- Application info for submit
- Throws:
Exception - if exception occurred- See Also:
ApplicationInfo,
submitApplicationAndWaitState(Object, String[], long, TimeUnit, YarnApplicationState...)
submitApplicationAndWaitState
protected org.springframework.yarn.test.junit.ApplicationInfo submitApplicationAndWaitState(Object source,
String[] args,
long timeout,
TimeUnit unit,
YarnApplicationState... applicationStates)
throws Exception
- Submits application and wait state. Returned state is
NULL
if something failed or final known state after the wait/poll operations.
Array of application states can be used to return immediately from wait
loop if state is matched.
- Parameters:
source - the boot application config sourceargs - the boot application argstimeout - the timeout for waitunit - the unit for timeoutapplicationStates - the application states to wait
- Returns:
- Application info for submit
- Throws:
Exception - if exception occurred- See Also:
ApplicationInfo