|
Spring for Apache Hadoop | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.yarn.test.junit.AbstractYarnClusterTests
public abstract class AbstractYarnClusterTests
Abstract base class providing default functionality for running tests using Yarn mini cluster.
| Field Summary | |
|---|---|
protected org.springframework.context.ApplicationContext |
applicationContext
|
protected org.apache.hadoop.conf.Configuration |
configuration
|
protected YarnClient |
yarnClient
|
protected YarnCluster |
yarnCluster
|
| Constructor Summary | |
|---|---|
AbstractYarnClusterTests()
|
|
| Method Summary | |
|---|---|
org.springframework.context.ApplicationContext |
getApplicationContext()
Gets the ApplicationContext for tests. |
org.apache.hadoop.conf.Configuration |
getConfiguration()
Gets the running cluster runtime Configuration for tests. |
protected org.apache.hadoop.yarn.api.records.YarnApplicationState |
getState(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
Get the current application state. |
YarnClient |
getYarnClient()
Gets the YarnClient. |
YarnCluster |
getYarnCluster()
Gets the running YarnCluster for tests. |
protected void |
killApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
Kill the application. |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
|
void |
setConfiguration(org.apache.hadoop.conf.Configuration configuration)
Sets the Configuration. |
void |
setYarnClient(YarnClient yarnClient)
Sets the YarnClient. |
void |
setYarnCluster(YarnCluster yarnCluster)
Sets the YarnCluster |
protected org.apache.hadoop.yarn.api.records.ApplicationId |
submitApplication()
Submit an application. |
protected ApplicationInfo |
submitApplicationAndWait()
Submits application and wait state. |
protected ApplicationInfo |
submitApplicationAndWait(long timeout,
java.util.concurrent.TimeUnit unit)
Submits application and wait state. |
protected ApplicationInfo |
submitApplicationAndWaitState(long timeout,
java.util.concurrent.TimeUnit unit,
org.apache.hadoop.yarn.api.records.YarnApplicationState... applicationStates)
Submits application and wait state. |
protected org.apache.hadoop.yarn.api.records.YarnApplicationState |
waitState(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
long timeout,
java.util.concurrent.TimeUnit unit,
org.apache.hadoop.yarn.api.records.YarnApplicationState... applicationStates)
Waits state. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.springframework.context.ApplicationContext applicationContext
protected org.apache.hadoop.conf.Configuration configuration
protected YarnCluster yarnCluster
protected YarnClient yarnClient
| Constructor Detail |
|---|
public AbstractYarnClusterTests()
| Method Detail |
|---|
public org.springframework.context.ApplicationContext getApplicationContext()
ApplicationContext for tests.
public final void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
setApplicationContext in interface org.springframework.context.ApplicationContextAwarepublic org.apache.hadoop.conf.Configuration getConfiguration()
Configuration for tests.
@Autowired public void setConfiguration(org.apache.hadoop.conf.Configuration configuration)
Configuration.
configuration - the Configurationpublic YarnCluster getYarnCluster()
YarnCluster for tests.
@Autowired public void setYarnCluster(YarnCluster yarnCluster)
YarnCluster
yarnCluster - the Yarn clusterpublic YarnClient getYarnClient()
YarnClient.
@Autowired public void setYarnClient(YarnClient yarnClient)
YarnClient.
yarnClient - the Yarn client
protected ApplicationInfo submitApplicationAndWait()
throws java.lang.Exception
java.lang.Exception - if exception occurredApplicationInfo,
submitApplicationAndWaitState(long, TimeUnit, YarnApplicationState...)
protected ApplicationInfo submitApplicationAndWait(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.Exception
timeout - the timeout for waitunit - the unit for timeout
java.lang.Exception - if exception occurredApplicationInfo,
submitApplicationAndWaitState(long, TimeUnit, YarnApplicationState...)
protected ApplicationInfo submitApplicationAndWaitState(long timeout,
java.util.concurrent.TimeUnit unit,
org.apache.hadoop.yarn.api.records.YarnApplicationState... applicationStates)
throws java.lang.Exception
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.
timeout - the timeout for waitunit - the unit for timeoutapplicationStates - the application states to wait
java.lang.Exception - if exception occurredApplicationInfoprotected org.apache.hadoop.yarn.api.records.ApplicationId submitApplication()
ApplicationId
protected org.apache.hadoop.yarn.api.records.YarnApplicationState waitState(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
long timeout,
java.util.concurrent.TimeUnit unit,
org.apache.hadoop.yarn.api.records.YarnApplicationState... applicationStates)
throws java.lang.Exception
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.
applicationId - the application idtimeout - the timeout for waitunit - the unit for timeoutapplicationStates - the application states to wait
NULL if timeout
java.lang.Exception - if exception occurredprotected void killApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
applicationId - the application idprotected org.apache.hadoop.yarn.api.records.YarnApplicationState getState(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
applicationId - Yarn app application id
NULL if not found
|
Spring for Apache Hadoop | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||