Class AggregatedLogFormat.LogWriter
java.lang.Object
org.apache.hadoop.yarn.logaggregation.AggregatedLogFormat.LogWriter
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
- AggregatedLogFormat
The writer that writes out the aggregated logs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(AggregatedLogFormat.LogKey logKey, AggregatedLogFormat.LogValue logValue) voidclose()org.apache.hadoop.io.file.tfile.TFile.Writervoidinitialize(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path remoteAppLogFile, org.apache.hadoop.security.UserGroupInformation userUgi) Initialize the LogWriter.voidwriteApplicationACLs(Map<org.apache.hadoop.yarn.api.records.ApplicationAccessType, String> appAcls) voidwriteApplicationOwner(String user)
-
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- ConfigurationremoteAppLogFile- remote log file pathuserUgi- Ugi of the user- Throws:
IOException- Failed to initialize
-
getWriter
@VisibleForTesting public org.apache.hadoop.io.file.tfile.TFile.Writer getWriter() -
writeApplicationOwner
- 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:
closein interfaceAutoCloseable- Throws:
org.apache.hadoop.hdfs.protocol.DSQuotaExceededException
-