You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by cn...@apache.org on 2022/07/25 18:42:24 UTC
[hadoop] branch branch-3.2 updated: MAPREDUCE-7372 MapReduce set permission too late in copyJar method (#4026). Contributed by Zhang Dongsheng.
This is an automated email from the ASF dual-hosted git repository.
cnauroth pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.2 by this push:
new ddb59cd3ccc MAPREDUCE-7372 MapReduce set permission too late in copyJar method (#4026). Contributed by Zhang Dongsheng.
ddb59cd3ccc is described below
commit ddb59cd3ccca98b641526f096d5503401bf8682d
Author: skysiders <64...@users.noreply.github.com>
AuthorDate: Tue Jul 26 02:38:59 2022 +0800
MAPREDUCE-7372 MapReduce set permission too late in copyJar method (#4026). Contributed by Zhang Dongsheng.
Reviewed-by: Steve Loughran <st...@apache.org>
Signed-off-by: Chris Nauroth <cn...@apache.org>
(cherry picked from commit 9fe96238d2cf9f32cd36888098bccc5a4cfe1723)
(cherry picked from commit 1d2a60f6230cce53dc7eb3be4c38335dfd493ca5)
---
.../main/java/org/apache/hadoop/mapreduce/JobResourceUploader.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/JobResourceUploader.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/JobResourceUploader.java
index c8686d7162e..0eaa4673113 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/JobResourceUploader.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/JobResourceUploader.java
@@ -784,9 +784,11 @@ class JobResourceUploader {
void copyJar(Path originalJarPath, Path submitJarFile,
short replication) throws IOException {
jtFs.copyFromLocalFile(originalJarPath, submitJarFile);
- jtFs.setReplication(submitJarFile, replication);
+ // The operation of setReplication requires certain permissions
+ // so we need to make sure it has enough permissions
jtFs.setPermission(submitJarFile, new FsPermission(
JobSubmissionFiles.JOB_FILE_PERMISSION));
+ jtFs.setReplication(submitJarFile, replication);
}
private void addLog4jToDistributedCache(Job job, Path jobSubmitDir)
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org