AggregatedLogFormat.LogWriter (Apache Hadoop YARN Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.yarn.logaggregation, class: AggregatedLogFormat, class: LogWriter

Package 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

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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LogWriter()`

- ## Method Summary

  Modifier and Type
  Method
  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 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`