Class AggregatedLogFormat.LogWriter

java.lang.Object
org.apache.hadoop.yarn.logaggregation.AggregatedLogFormat.LogWriter
All Implemented Interfaces:
AutoCloseable
Enclosing class:
AggregatedLogFormat

@Private public static class AggregatedLogFormat.LogWriter extends Object implements AutoCloseable
The writer that writes out the aggregated logs.
  • Constructor Details

    • LogWriter

      public LogWriter()
  • Method Details

    • initialize

      public void initialize(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path remoteAppLogFile, org.apache.hadoop.security.UserGroupInformation userUgi) throws IOException
      Initialize the LogWriter. Must be called just after the instance is created.
      Parameters:
      conf - Configuration
      remoteAppLogFile - remote log file path
      userUgi - Ugi of the user
      Throws:
      IOException - Failed to initialize
    • getWriter

      @VisibleForTesting public org.apache.hadoop.io.file.tfile.TFile.Writer getWriter()
    • writeApplicationOwner

      public void writeApplicationOwner(String user) throws IOException
      Throws:
      IOException
    • writeApplicationACLs

      public void writeApplicationACLs(Map<org.apache.hadoop.yarn.api.records.ApplicationAccessType,String> appAcls) throws IOException
      Throws:
      IOException
    • append

      public void append(AggregatedLogFormat.LogKey logKey, AggregatedLogFormat.LogValue logValue) throws IOException
      Throws:
      IOException
    • close

      public void close() throws org.apache.hadoop.hdfs.protocol.DSQuotaExceededException
      Specified by:
      close in interface AutoCloseable
      Throws:
      org.apache.hadoop.hdfs.protocol.DSQuotaExceededException