[ 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-unsubscr...@hadoop.apache.org For additional commands, e-mail: mapreduce-issues-h...@hadoop.apache.org