Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
3.3.4
Description
getFileControllerForRead::getFileControllerForRead internally opens up a new FS object everytime and is not closed.
When cloud connectors (e.g s3a) is used along with Knox, it ends up leaking KnoxTokenMonitor for every unclosed FS object causing thread leaks in NM.
Lines of interest:
try { Path remoteAppLogDir = fileController.getOlderRemoteAppLogDir(appId, appOwner); if (LogAggregationUtils.getNodeFiles(conf, remoteAppLogDir, appId, appOwner).hasNext()) { return fileController; } } catch (Exception ex) { diagnosticsMsg.append(ex.getMessage() + "\n"); continue; }
public static RemoteIterator<FileStatus> getNodeFiles(Configuration conf, Path remoteAppLogDir, ApplicationId appId, String appOwner) throws IOException { Path qualifiedLogDir = FileContext.getFileContext(conf).makeQualified(remoteAppLogDir); return FileContext.getFileContext( qualifiedLogDir.toUri(), conf).listStatus(remoteAppLogDir); }
Attachments
Issue Links
- is fixed by
-
HADOOP-18476 Abfs and S3A FileContext bindings to close wrapped filesystems in finalizer
- Resolved
- is related to
-
YARN-11397 Memory leak when reading aggregated logs from s3 (LogAggregationTFileController::readAggregatedLogs)
- Open