org.apache.hadoop.yarn.logaggregation
Class AggregatedLogFormat.LogReader

java.lang.Object
  extended by org.apache.hadoop.yarn.logaggregation.AggregatedLogFormat.LogReader
Enclosing class:
AggregatedLogFormat

@InterfaceAudience.Public
@InterfaceStability.Evolving
public static class AggregatedLogFormat.LogReader
extends Object


Constructor Summary
AggregatedLogFormat.LogReader(Configuration conf, Path remoteAppLogFile)
           
 
Method Summary
 void close()
           
 Map<ApplicationAccessType,String> getApplicationAcls()
          Returns ACLs for the application.
 String getApplicationOwner()
          Returns the owner of the application.
 DataInputStream next(AggregatedLogFormat.LogKey key)
          Read the next key and return the value-stream.
static void readAcontainerLogs(DataInputStream valueStream, Writer writer)
          Writes all logs for a single container to the provided writer.
static void readAContainerLogsForALogType(DataInputStream valueStream, PrintStream out)
          Keep calling this till you get a EOFException for getting logs of all types for a single container.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AggregatedLogFormat.LogReader

public AggregatedLogFormat.LogReader(Configuration conf,
                                     Path remoteAppLogFile)
                              throws IOException
Throws:
IOException
Method Detail

getApplicationOwner

public String getApplicationOwner()
                           throws IOException
Returns the owner of the application.

Returns:
the application owner.
Throws:
IOException

getApplicationAcls

public Map<ApplicationAccessType,String> getApplicationAcls()
                                                     throws IOException
Returns ACLs for the application. An empty map is returned if no ACLs are found.

Returns:
a map of the Application ACLs.
Throws:
IOException

next

public DataInputStream next(AggregatedLogFormat.LogKey key)
                     throws IOException
Read the next key and return the value-stream.

Parameters:
key -
Returns:
the valueStream if there are more keys or null otherwise.
Throws:
IOException

readAcontainerLogs

public static void readAcontainerLogs(DataInputStream valueStream,
                                      Writer writer)
                               throws IOException
Writes all logs for a single container to the provided writer.

Parameters:
valueStream -
writer -
Throws:
IOException

readAContainerLogsForALogType

public static void readAContainerLogsForALogType(DataInputStream valueStream,
                                                 PrintStream out)
                                          throws IOException
Keep calling this till you get a EOFException for getting logs of all types for a single container.

Parameters:
valueStream -
out -
Throws:
IOException

close

public void close()


Copyright © 2014 Apache Software Foundation. All Rights Reserved.