org.springframework.yarn.test.support
Class ContainerLogUtils
java.lang.Object
org.springframework.yarn.test.support.ContainerLogUtils
public abstract class ContainerLogUtils
- extends Object
Utilities for checking container logs.
- Author:
- Janne Valkealahti
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ContainerLogUtils
public ContainerLogUtils()
queryContainerLogs
public static List<Resource> queryContainerLogs(YarnCluster yarnCluster,
ApplicationId applicationId,
String fileName)
throws 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
Resources
- Throws:
IOException - Signals that an I/O exception has occurred.
queryContainerLogs
public static List<Resource> queryContainerLogs(YarnCluster yarnCluster,
ApplicationId applicationId)
throws 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
Resources
- Throws:
IOException - Signals that an I/O exception has occurred.- See Also:
#queryContainerLogs(YarnCluster, ApplicationId, String)}