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
IOException
public static org.apache.hadoop.fs.Path getContainerLogFile(org.apache.hadoop.yarn.api.records.ContainerId containerId, String fileName, String remoteUser) throws IOException
IOException
public static InputStream openLogFileForRead(String containerIdStr, org.apache.hadoop.fs.Path logFile, String user) throws IOException
IOException
public static long getFileLength(org.apache.hadoop.fs.Path logFile) throws IOException
IOException
public static org.apache.hadoop.fs.Path[] getFilesInDir(org.apache.hadoop.fs.Path dir) throws IOException
IOException
Copyright © 2015 Apache Software Foundation. All Rights Reserved.