org.springframework.yarn.test.support
Class ContainerLogUtils
java.lang.Object
org.springframework.yarn.test.support.ContainerLogUtils
public abstract class ContainerLogUtils
- extends java.lang.Object
Utilities for checking container logs.
- Author:
- Janne Valkealahti
Method Summary |
static java.util.List<org.springframework.core.io.Resource> |
queryContainerLogs(YarnCluster yarnCluster,
org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
Find container logs for running cluster and application. |
static java.util.List<org.springframework.core.io.Resource> |
queryContainerLogs(YarnCluster yarnCluster,
org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
java.lang.String fileName)
Find container logs for running cluster and application. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ContainerLogUtils
public ContainerLogUtils()
queryContainerLogs
public static java.util.List<org.springframework.core.io.Resource> queryContainerLogs(YarnCluster yarnCluster,
org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
java.lang.String fileName)
throws java.io.IOException
- Find container logs for running cluster and application.
Created pattern which is used with PathMatchingResourcePatternResolver
is resolved from YarnCluster
, ApplicationId
and fileName.
For example if fileName is given as *.std*
, pattern will look like
file:/path/to/project/target/yarn--1502101888/*logDir*/application_1382082435804_0001/**/*.std*
- Parameters:
yarnCluster
- the yarn clusterapplicationId
- the application idfileName
- the part of a file name
- Returns:
- the list of log file
Resource
s
- Throws:
java.io.IOException
- Signals that an I/O exception has occurred.
queryContainerLogs
public static java.util.List<org.springframework.core.io.Resource> queryContainerLogs(YarnCluster yarnCluster,
org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
throws java.io.IOException
- Find container logs for running cluster and application.
fileName
will be *
.
- Parameters:
yarnCluster
- the yarn clusterapplicationId
- the application id
- Returns:
- the list of log file
Resource
s
- Throws:
java.io.IOException
- Signals that an I/O exception has occurred.- See Also:
#queryContainerLogs(YarnCluster, ApplicationId, String)}