MAPREDUCE-7372 MapReduce set permission too late in copyJar method (#4026). Contributed by Zhang Dongsheng.
Reviewed-by: Steve Loughran <stevel@apache.org>
Signed-off-by: Chris Nauroth <cnauroth@apache.org>
(cherry picked from commit 9fe96238d2
)
This commit is contained in:
parent
fffb0bd6db
commit
1d2a60f623
|
@ -783,9 +783,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)
|
||||
|
|
Loading…
Reference in New Issue