org.apache.hadoop.yarn.server.nodemanager.webapp
Class ContainerLogsUtils
java.lang.Object
org.apache.hadoop.yarn.server.nodemanager.webapp.ContainerLogsUtils
public class ContainerLogsUtils
- extends Object
Contains utilities for fetching a user's log file in a secure fashion.
|
Field Summary |
static org.slf4j.Logger |
LOG
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
public static final org.slf4j.Logger LOG
ContainerLogsUtils
public ContainerLogsUtils()
getContainerLogDirs
public static List<File> getContainerLogDirs(org.apache.hadoop.yarn.api.records.ContainerId containerId,
String remoteUser,
Context context)
throws org.apache.hadoop.yarn.exceptions.YarnException
- Finds the local directories that logs for the given container are stored
on.
- Throws:
org.apache.hadoop.yarn.exceptions.YarnException
getContainerLogFile
public static File getContainerLogFile(org.apache.hadoop.yarn.api.records.ContainerId containerId,
String fileName,
String remoteUser,
Context context)
throws org.apache.hadoop.yarn.exceptions.YarnException
- Finds the log file with the given filename for the given container.
- Throws:
org.apache.hadoop.yarn.exceptions.YarnException
openLogFileForRead
public static FileInputStream openLogFileForRead(String containerIdStr,
File logFile,
Context context)
throws IOException
- Throws:
IOException
Copyright © 2014 Apache Software Foundation. All Rights Reserved.