java.lang.AutoCloseable@Public
@Evolving
public static class AggregatedLogFormat.LogReader
extends java.lang.Object
implements java.lang.AutoCloseable
| Constructor | Description |
|---|---|
LogReader(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path remoteAppLogFile) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
java.util.Map<org.apache.hadoop.yarn.api.records.ApplicationAccessType,java.lang.String> |
getApplicationAcls() |
Returns ACLs for the application.
|
java.lang.String |
getApplicationOwner() |
Returns the owner of the application.
|
AggregatedLogFormat.ContainerLogsReader |
getContainerLogsReader(org.apache.hadoop.yarn.api.records.ContainerId containerId) |
Get a ContainerLogsReader to read the logs for
the specified container.
|
java.io.DataInputStream |
next(AggregatedLogFormat.LogKey key) |
Read the next key and return the value-stream.
|
static void |
readAcontainerLogs(java.io.DataInputStream valueStream,
java.io.Writer writer) |
Writes all logs for a single container to the provided writer.
|
static void |
readAcontainerLogs(java.io.DataInputStream valueStream,
java.io.Writer writer,
long logUploadedTime) |
Writes all logs for a single container to the provided writer.
|
static void |
readAContainerLogsForALogType(java.io.DataInputStream valueStream,
java.io.PrintStream out) |
Keep calling this till you get a
EOFException for getting logs of
all types for a single container. |
static void |
readAContainerLogsForALogType(java.io.DataInputStream valueStream,
java.io.PrintStream out,
long logUploadedTime) |
Keep calling this till you get a
EOFException for getting logs of
all types for a single container. |
static void |
readAContainerLogsForALogType(java.io.DataInputStream valueStream,
java.io.PrintStream out,
long logUploadedTime,
long bytes) |
Keep calling this till you get a
EOFException for getting logs of
all types for a single container for the specific bytes. |
static int |
readContainerLogsForALogType(java.io.DataInputStream valueStream,
java.io.PrintStream out,
long logUploadedTime,
java.util.List<java.lang.String> logType) |
Keep calling this till you get a
EOFException for getting logs of
the specific types for a single container. |
static int |
readContainerLogsForALogType(java.io.DataInputStream valueStream,
java.io.PrintStream out,
long logUploadedTime,
java.util.List<java.lang.String> logType,
long bytes) |
Keep calling this till you get a
EOFException for getting logs of
the specific types for a single container. |
static org.apache.commons.math3.util.Pair<java.lang.String,java.lang.String> |
readContainerMetaDataAndSkipData(java.io.DataInputStream valueStream) |
public LogReader(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path remoteAppLogFile)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getApplicationOwner()
throws java.io.IOException
java.io.IOException - if we can not get the application owner.public java.util.Map<org.apache.hadoop.yarn.api.records.ApplicationAccessType,java.lang.String> getApplicationAcls()
throws java.io.IOException
java.io.IOException - if we can not get the application acls.public java.io.DataInputStream next(AggregatedLogFormat.LogKey key) throws java.io.IOException
key - the log keyjava.io.IOException - if we can not get the dataInputStream
for the next key@Private public AggregatedLogFormat.ContainerLogsReader getContainerLogsReader(org.apache.hadoop.yarn.api.records.ContainerId containerId) throws java.io.IOException
containerId - the containerIdjava.io.IOException - if we can not get the container log reader.public static void readAcontainerLogs(java.io.DataInputStream valueStream,
java.io.Writer writer,
long logUploadedTime)
throws java.io.IOException
valueStream - the valueStreamwriter - the log writerlogUploadedTime - the time stampjava.io.IOException - if we can not read the container logs.public static void readAcontainerLogs(java.io.DataInputStream valueStream,
java.io.Writer writer)
throws java.io.IOException
valueStream - the value streamwriter - the log writerjava.io.IOException - if we can not read the container logs.public static void readAContainerLogsForALogType(java.io.DataInputStream valueStream,
java.io.PrintStream out,
long logUploadedTime)
throws java.io.IOException
EOFException for getting logs of
all types for a single container.valueStream - the value streamout - the print streamlogUploadedTime - the time stampjava.io.IOException - if we can not read the container log by specifying
the container log type.public static void readAContainerLogsForALogType(java.io.DataInputStream valueStream,
java.io.PrintStream out,
long logUploadedTime,
long bytes)
throws java.io.IOException
EOFException for getting logs of
all types for a single container for the specific bytes.valueStream - the value streamout - the output print streamlogUploadedTime - the log upload time stampbytes - the output size of the logjava.io.IOException - if we can not read the container logpublic static void readAContainerLogsForALogType(java.io.DataInputStream valueStream,
java.io.PrintStream out)
throws java.io.IOException
EOFException for getting logs of
all types for a single container.valueStream - the value streamout - the output print streamjava.io.IOException - if we can not read the container logpublic static int readContainerLogsForALogType(java.io.DataInputStream valueStream,
java.io.PrintStream out,
long logUploadedTime,
java.util.List<java.lang.String> logType)
throws java.io.IOException
EOFException for getting logs of
the specific types for a single container.valueStream - the value streamout - the output print streamlogUploadedTime - the log uploaded time stamplogType - the given log typejava.io.IOException - if we can not read the container logspublic static int readContainerLogsForALogType(java.io.DataInputStream valueStream,
java.io.PrintStream out,
long logUploadedTime,
java.util.List<java.lang.String> logType,
long bytes)
throws java.io.IOException
EOFException for getting logs of
the specific types for a single container.valueStream - the value streamout - the output print streamlogUploadedTime - the log uploaded time stamplogType - the given log typebytes - log bytes.java.io.IOException - if we can not read the container logs@Private
public static org.apache.commons.math3.util.Pair<java.lang.String,java.lang.String> readContainerMetaDataAndSkipData(java.io.DataInputStream valueStream)
throws java.io.IOException
java.io.IOExceptionpublic void close()
close in interface java.lang.AutoCloseableCopyright © 2008–2025 Apache Software Foundation. All rights reserved.