[
https://issues.apache.org/jira/browse/MAPREDUCE-7375?focusedWorklogId=796510&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-796510
]
ASF GitHub Bot logged work on MAPREDUCE-7375:
---------------------------------------------
Author: ASF GitHub Bot
Created on: 29/Jul/22 21:07
Start Date: 29/Jul/22 21:07
Worklog Time Spent: 10m
Work Description: cnauroth commented on code in PR #4237:
URL: https://github.com/apache/hadoop/pull/4237#discussion_r933617839
##########
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/test/java/org/apache/hadoop/mapreduce/TestJobSubmissionFiles.java:
##########
@@ -139,4 +142,26 @@ public void
testGetStagingDirWhenShortFileOwnerNameAndShortUserName()
assertEquals(stagingPath,
JobSubmissionFiles.getStagingDir(cluster, conf, user));
}
+
+ @Test
+ public void testDirPermission() throws Exception {
+ Cluster cluster = mock(Cluster.class);
+ HdfsConfiguration conf = new HdfsConfiguration();
+ conf.set(CommonConfigurationKeys.FS_PERMISSIONS_UMASK_KEY, "700");
+ MiniDFSCluster dfsCluster = null;
+ try {
+ dfsCluster = new MiniDFSCluster.Builder(conf).numDataNodes(2).build();
Review Comment:
Please indent by 2 spaces instead of 4 to match Hadoop coding standards.
Once that's done, I think this will be ready to commit. Thanks!
Issue Time Tracking
-------------------
Worklog Id: (was: 796510)
Time Spent: 2h 40m (was: 2.5h)
> JobSubmissionFiles don't set right permission after mkdirs
> ----------------------------------------------------------
>
> Key: MAPREDUCE-7375
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-7375
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Components: mrv2
> Affects Versions: 3.3.2
> Reporter: Zhang Dongsheng
> Priority: Major
> Labels: pull-request-available
> Attachments: MAPREDUCE-7375.patch
>
> Time Spent: 2h 40m
> Remaining Estimate: 0h
>
> JobSubmissionFiles provide getStagingDir to get Staging Directory.If
> stagingArea missing, method will create new directory with this.
> {quote}fs.mkdirs(stagingArea, new FsPermission(JOB_DIR_PERMISSION));{quote}
> It seems create new directory with JOB_DIR_PERMISSION,but this permission
> will be apply by umask.If umask too strict , this permission may be 000(if
> umask is 700).So we should change permission after create.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]