|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.yarn.test.support.ContainerLogUtils
public abstract class ContainerLogUtils
Utilities for checking container logs.
Constructor Summary | |
---|---|
ContainerLogUtils()
|
Method Summary | |
---|---|
static java.lang.String |
getFileContent(java.io.File file)
Reads a file content and return it as String. |
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 |
Constructor Detail |
---|
public ContainerLogUtils()
Method Detail |
---|
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
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*
yarnCluster
- the yarn clusterapplicationId
- the application idfileName
- the part of a file name
Resource
s
java.io.IOException
- Signals that an I/O exception has occurred.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
fileName
will be *
.
yarnCluster
- the yarn clusterapplicationId
- the application id
Resource
s
java.io.IOException
- Signals that an I/O exception has occurred.queryContainerLogs(YarnCluster, ApplicationId, String)
public static java.lang.String getFileContent(java.io.File file) throws java.lang.Exception
NULL
if file doesn't exist and empty String if file exists but is empty.
file
- the file
java.lang.Exception
- the exception if error occurred
|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |