@InterfaceAudience.Private @InterfaceStability.Unstable public class LogAggregationTFileController extends LogAggregationFileController
APP_DIR_PERMISSIONS, APP_LOG_FILE_UMASK, conf, fileControllerName, fsSupportsChmod, remoteRootLogDir, remoteRootLogDirSuffix, retentionSize, TLDIR_PERMISSIONS| Constructor and Description |
|---|
LogAggregationTFileController() |
| Modifier and Type | Method and Description |
|---|---|
void |
closeWriter()
Close the writer.
|
Map<org.apache.hadoop.yarn.api.records.ApplicationAccessType,String> |
getApplicationAcls(org.apache.hadoop.fs.Path aggregatedLog,
org.apache.hadoop.yarn.api.records.ApplicationId appId)
Returns ACLs for the application.
|
String |
getApplicationOwner(org.apache.hadoop.fs.Path aggregatedLog,
org.apache.hadoop.yarn.api.records.ApplicationId appId)
Returns the owner of the application.
|
void |
initializeWriter(LogAggregationFileControllerContext context)
Initialize the writer.
|
void |
initInternal(org.apache.hadoop.conf.Configuration conf)
Derived classes initialize themselves using this method.
|
void |
postWrite(LogAggregationFileControllerContext record)
Operations needed after write the log content.
|
boolean |
readAggregatedLogs(ContainerLogsRequest logRequest,
OutputStream os)
Output container log.
|
List<ContainerLogMeta> |
readAggregatedLogsMeta(ContainerLogsRequest logRequest)
Return a list of
ContainerLogMeta for an application
from Remote FileSystem. |
void |
renderAggregatedLogsBlock(HtmlBlock.Block html,
View.ViewContext context)
Render Aggregated Logs block.
|
void |
write(AggregatedLogFormat.LogKey logKey,
AggregatedLogFormat.LogValue logValue)
Write the log content.
|
aggregatedLogSuffix, belongsToAppAttempt, checkExists, cleanOldLogs, closePrintStream, createAppDir, createDir, getFileSystem, getOlderRemoteAppLogDir, getRemoteAppLogDir, getRemoteNodeLogFileForApp, getRemoteRootLogDir, getRemoteRootLogDirSuffix, initialize, isFsSupportsChmod, verifyAndCreateRemoteLogDirpublic void initInternal(org.apache.hadoop.conf.Configuration conf)
LogAggregationFileControllerinitInternal in class LogAggregationFileControllerconf - the Configurationpublic void initializeWriter(LogAggregationFileControllerContext context) throws IOException
LogAggregationFileControllerinitializeWriter in class LogAggregationFileControllercontext - the LogAggregationFileControllerContextIOException - if fails to initialize the writerpublic void closeWriter()
throws LogAggregationDFSException
LogAggregationFileControllercloseWriter in class LogAggregationFileControllerLogAggregationDFSException - if the closing of the writer fails
(for example due to HDFS quota being exceeded)public void write(AggregatedLogFormat.LogKey logKey, AggregatedLogFormat.LogValue logValue) throws IOException
LogAggregationFileControllerwrite in class LogAggregationFileControllerlogKey - the log keylogValue - the log contentIOException - if fails to write the logspublic void postWrite(LogAggregationFileControllerContext record) throws Exception
LogAggregationFileControllerpostWrite in class LogAggregationFileControllerrecord - the LogAggregationFileControllerContextException - if anything failspublic boolean readAggregatedLogs(ContainerLogsRequest logRequest, OutputStream os) throws IOException
LogAggregationFileControllerreadAggregatedLogs in class LogAggregationFileControllerlogRequest - ContainerLogsRequestos - the output streamIOException - if we can not access the log file.public List<ContainerLogMeta> readAggregatedLogsMeta(ContainerLogsRequest logRequest) throws IOException
LogAggregationFileControllerContainerLogMeta for an application
from Remote FileSystem.readAggregatedLogsMeta in class LogAggregationFileControllerlogRequest - ContainerLogsRequestContainerLogMetaIOException - if there is no available log filepublic void renderAggregatedLogsBlock(HtmlBlock.Block html, View.ViewContext context)
LogAggregationFileControllerrenderAggregatedLogsBlock in class LogAggregationFileControllerhtml - the htmlcontext - the ViewContextpublic String getApplicationOwner(org.apache.hadoop.fs.Path aggregatedLog, org.apache.hadoop.yarn.api.records.ApplicationId appId) throws IOException
LogAggregationFileControllergetApplicationOwner in class LogAggregationFileControlleraggregatedLog - the aggregatedLog pathappId - the ApplicationIdIOException - if we can not get the application ownerpublic Map<org.apache.hadoop.yarn.api.records.ApplicationAccessType,String> getApplicationAcls(org.apache.hadoop.fs.Path aggregatedLog, org.apache.hadoop.yarn.api.records.ApplicationId appId) throws IOException
LogAggregationFileControllergetApplicationAcls in class LogAggregationFileControlleraggregatedLog - the aggregatedLog path.appId - the ApplicationIdIOException - if we can not get the application aclsCopyright © 2008–2023 Apache Software Foundation. All rights reserved.