[
https://issues.apache.org/jira/browse/YARN-9080?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16810890#comment-16810890
]
Peter Bacsko commented on YARN-9080:
------------------------------------
Thanks for updating the patch [~Prabhu Joseph]. This is much better.
Small things:
1. Please fix the newly introduced checkstyle warning
2. I would use {{StringUtils}} from Commons Lang here:
{noformat}
import org.apache.commons.lang3.StringUtils;
boolean isValidClusterTimeStampDir(Path clusterTimeStampPath) throws
IOException {
FileStatus stat = fs.getFileStatus(clusterTimeStampPath);
return stat.isDirectory() &&
StringUtils.isNumeric(clusterTimeStampPath.getName());
}
{noformat}
3. You call {{metrics.incrLogsDirsCleaned();}} regardless of whether the
deletion was successful or not (although this seems to be the problem with the
original code too).
4. New methods {{deleteDir()}}, {{isValidClusterTimeStampDir()}},
{{cleanAppLogDir()}} are package private. If they're not accessed from test
methods, then let's make them private.
> Bucket Directories as part of ATS done accumulates
> --------------------------------------------------
>
> Key: YARN-9080
> URL: https://issues.apache.org/jira/browse/YARN-9080
> Project: Hadoop YARN
> Issue Type: Bug
> Reporter: Prabhu Joseph
> Assignee: Prabhu Joseph
> Priority: Major
> Attachments: 0001-YARN-9080.patch, 0002-YARN-9080.patch,
> 0003-YARN-9080.patch, YARN-9080-004.patch, YARN-9080-005.patch,
> YARN-9080-006.patch, YARN-9080-007.patch
>
>
> Have observed older bucket directories cluster_timestamp, bucket1 and bucket2
> as part of ATS done accumulates. The cleanLogs part of EntityLogCleaner
> removes only the app directories and not the bucket directories.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]