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