public final class LogToolUtils
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
CONTAINER_ON_NODE_PATTERN |
| Modifier and Type | Method | Description |
|---|---|---|
static java.io.PrintStream |
createPrintStream(java.lang.String localDir,
java.lang.String nodeId,
java.lang.String containerId) |
Create the container log file under given (local directory/nodeId) and
return the PrintStream object.
|
static com.sun.jersey.api.client.ClientResponse |
getResponseFromNMWebService(org.apache.hadoop.conf.Configuration conf,
com.sun.jersey.api.client.Client webServiceClient,
ContainerLogsRequest request,
java.lang.String logFile) |
Redirect the
ContainerLogsRequest to the NodeManager's
NMWebServices. |
static void |
outputContainerLog(java.lang.String containerId,
java.lang.String nodeId,
java.lang.String fileName,
long fileLength,
long outputSize,
java.lang.String lastModifiedTime,
java.io.InputStream fis,
java.io.OutputStream os,
byte[] buf,
ContainerLogAggregationType logType) |
Output container log.
|
static void |
outputContainerLogThroughZeroCopy(java.lang.String containerId,
java.lang.String nodeId,
java.lang.String fileName,
long fileLength,
long outputSize,
java.lang.String lastModifiedTime,
java.io.InputStream is,
java.io.OutputStream os,
ContainerLogAggregationType logType) |
public static final java.lang.String CONTAINER_ON_NODE_PATTERN
public static void outputContainerLog(java.lang.String containerId,
java.lang.String nodeId,
java.lang.String fileName,
long fileLength,
long outputSize,
java.lang.String lastModifiedTime,
java.io.InputStream fis,
java.io.OutputStream os,
byte[] buf,
ContainerLogAggregationType logType)
throws java.io.IOException
containerId - the containerIdnodeId - the nodeIdfileName - the log file namefileLength - the log file lengthoutputSize - the output sizelastModifiedTime - the log file last modified timefis - the log file input streamos - the output streambuf - the bufferlogType - the log type.java.io.IOException - if we can not access the log file.public static void outputContainerLogThroughZeroCopy(java.lang.String containerId,
java.lang.String nodeId,
java.lang.String fileName,
long fileLength,
long outputSize,
java.lang.String lastModifiedTime,
java.io.InputStream is,
java.io.OutputStream os,
ContainerLogAggregationType logType)
throws java.io.IOException
java.io.IOExceptionpublic static java.io.PrintStream createPrintStream(java.lang.String localDir,
java.lang.String nodeId,
java.lang.String containerId)
throws java.io.IOException
localDir - the Local DirnodeId - the NodeIdcontainerId - the ContainerIdjava.io.IOException - if an I/O error occurspublic static com.sun.jersey.api.client.ClientResponse getResponseFromNMWebService(org.apache.hadoop.conf.Configuration conf,
com.sun.jersey.api.client.Client webServiceClient,
ContainerLogsRequest request,
java.lang.String logFile)
ContainerLogsRequest to the NodeManager's
NMWebServices.conf - Configuration objectwebServiceClient - clientrequest - the request for container logslogFile - name of the log fileCopyright © 2008–2025 Apache Software Foundation. All rights reserved.