You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "lujie (Jira)" <ji...@apache.org> on 2022/05/14 07:42:00 UTC
[jira] [Updated] (MAPREDUCE-7381) sensitive informa may leak due to crash
[ https://issues.apache.org/jira/browse/MAPREDUCE-7381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
lujie updated MAPREDUCE-7381:
-----------------------------
Priority: Critical (was: Major)
> sensitive informa may leak due to crash
> ---------------------------------------
>
> Key: MAPREDUCE-7381
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-7381
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Reporter: lujie
> Priority: Critical
>
> now we implement mkdir in JobHistoryEventHandler like:
>
> {code:java}
> // private void mkdir(FileSystem fs, Path path, FsPermission fsp)
> throws IOException {
> if (!fs.exists(path)) {
> try {
> fs.mkdirs(path, fsp);
> FileStatus fsStatus = fs.getFileStatus(path);
> LOG.info("Perms after creating " + fsStatus.getPermission().toShort()
> + ", Expected: " + fsp.toShort());
> if (fsStatus.getPermission().toShort() != fsp.toShort()) {
> LOG.info("Explicitly setting permissions to : " + fsp.toShort()
> + ", " + fsp);
> fs.setPermission(path, fsp);
> }
> } catch (FileAlreadyExistsException e) {
> LOG.info("Directory: [" + path + "] already exists.");
> }
> }
> } {code}
>
> if node crash before setPermission, permission will not be set forever
>
> code shuld be like
>
> {code:java}
> // private void mkdir(FileSystem fs, Path path, FsPermission fsp)
> throws IOException {
> if (!fs.exists(path)) {
> try {
> fs.mkdirs(path, fsp);
> FileStatus fsStatus = fs.getFileStatus(path);
> LOG.info("Perms after creating " + fsStatus.getPermission().toShort()
> + ", Expected: " + fsp.toShort());
>
> } catch (FileAlreadyExistsException e) {
> LOG.info("Directory: [" + path + "] already exists.");
> }
> }
> FileStatus fsStatus = fs.getFileStatus(path);
> if (fsStatus.getPermission().toShort() != fsp.toShort()) { LOG.info("Explicitly setting permissions to : " + fsp.toShort() + ", " + fsp); fs.setPermission(path, fsp); } } {code}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: mapreduce-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: mapreduce-issues-help@hadoop.apache.org