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