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:
- org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware
public abstract class AbstractBootYarnClusterTests
- extends AbstractYarnClusterTests
Abstract base class providing default functionality for running tests for
Spring Yarn Boot based apps using Yarn mini cluster.
- Author:
- Janne Valkealahti
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(YarnClient yarnClient)
- Description copied from class:
AbstractYarnClusterTests
- Sets the
YarnClient
.
- Overrides:
setYarnClient
in class AbstractYarnClusterTests
- Parameters:
yarnClient
- the Yarn client
submitApplicationAndWait
protected ApplicationInfo submitApplicationAndWait(java.lang.Object source,
java.lang.String[] args)
throws java.lang.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:
java.lang.Exception
- if exception occurred- See Also:
ApplicationInfo
,
submitApplicationAndWaitState(Object, String[], long, TimeUnit, YarnApplicationState...)
submitApplicationAndWait
protected ApplicationInfo submitApplicationAndWait(java.lang.Object source,
java.lang.String[] args,
long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.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:
java.lang.Exception
- if exception occurred- See Also:
ApplicationInfo
,
submitApplicationAndWaitState(Object, String[], long, TimeUnit, YarnApplicationState...)
submitApplicationAndWaitState
protected ApplicationInfo submitApplicationAndWaitState(java.lang.Object source,
java.lang.String[] args,
long timeout,
java.util.concurrent.TimeUnit unit,
org.apache.hadoop.yarn.api.records.YarnApplicationState... applicationStates)
throws java.lang.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:
java.lang.Exception
- if exception occurred- See Also:
ApplicationInfo