public class ContainerLogsUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
LOG |
| Constructor and Description |
|---|
ContainerLogsUtils() |
| Modifier and Type | Method and Description |
|---|---|
static List<org.apache.hadoop.fs.Path> |
getContainerLogDirs(org.apache.hadoop.yarn.api.records.ContainerId containerId,
String remoteUser,
Context context)
Finds the directories that logs for the given container are stored
on.
|
static org.apache.hadoop.fs.Path |
getContainerLogFile(org.apache.hadoop.yarn.api.records.ContainerId containerId,
String fileName,
String remoteUser,
Context context)
Finds the log file with the given filename for the given container.
|
static long |
getFileLength(org.apache.hadoop.fs.Path logFile,
org.apache.hadoop.yarn.api.records.ContainerId containerId,
Context context) |
static org.apache.hadoop.fs.Path[] |
getFilesInDir(org.apache.hadoop.fs.Path dir,
org.apache.hadoop.yarn.api.records.ContainerId containerId,
Context context) |
static InputStream |
openLogFileForRead(String containerIdStr,
org.apache.hadoop.fs.Path logFile,
String remoteUser,
Context context) |
public static List<org.apache.hadoop.fs.Path> getContainerLogDirs(org.apache.hadoop.yarn.api.records.ContainerId containerId, String remoteUser, Context context) throws org.apache.hadoop.yarn.exceptions.YarnException
org.apache.hadoop.yarn.exceptions.YarnExceptionpublic static org.apache.hadoop.fs.Path getContainerLogFile(org.apache.hadoop.yarn.api.records.ContainerId containerId,
String fileName,
String remoteUser,
Context context)
throws org.apache.hadoop.yarn.exceptions.YarnException
org.apache.hadoop.yarn.exceptions.YarnExceptionpublic static InputStream openLogFileForRead(String containerIdStr, org.apache.hadoop.fs.Path logFile, String remoteUser, Context context) throws IOException
IOExceptionpublic static long getFileLength(org.apache.hadoop.fs.Path logFile,
org.apache.hadoop.yarn.api.records.ContainerId containerId,
Context context)
throws IOException
IOExceptionpublic static org.apache.hadoop.fs.Path[] getFilesInDir(org.apache.hadoop.fs.Path dir,
org.apache.hadoop.yarn.api.records.ContainerId containerId,
Context context)
throws IOException
IOExceptionCopyright © 2015 Apache Software Foundation. All Rights Reserved.