org.apache.hadoop.yarn.logaggregation

## Class AggregatedLogFormat.LogWriter

- java.lang.Object
- - org.apache.hadoop.yarn.logaggregation.AggregatedLogFormat.LogWriter

- All Implemented Interfaces:
    AutoCloseable
  Enclosing class:
    AggregatedLogFormat

      @InterfaceAudience.Private
      public static class AggregatedLogFormat.LogWriter
      extends Object
      implements AutoCloseable

  The writer that writes out the aggregated logs.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LogWriter()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `append(AggregatedLogFormat.LogKey logKey, AggregatedLogFormat.LogValue logValue)`
    `void` | `close()`
    `org.apache.hadoop.io.file.tfile.TFile.Writer` | `getWriter()`
    `void` | `initialize(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path remoteAppLogFile, org.apache.hadoop.security.UserGroupInformation userUgi)` Initialize the LogWriter.
    `void` | `writeApplicationACLs(Map<org.apache.hadoop.yarn.api.records.ApplicationAccessType,String> appAcls)`
    `void` | `writeApplicationOwner(String user)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LogWriter

          public LogWriter()

  - ### Method Detail

    - #### 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

          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`

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.