MAPREDUCE-7372 MapReduce set permission too late in copyJar method#4026
MAPREDUCE-7372 MapReduce set permission too late in copyJar method#4026cnauroth merged 6 commits intoapache:trunkfrom
Conversation
MAPREDUCE-7372.setReplication needs write permission , if umask too restrict , the project will fail, so we need to adjust the order.
|
💔 -1 overall
This message was automatically generated. |
|
yetus isn't happy because there's no test. could you see an easy way to add one here? |
|
💔 -1 overall
This message was automatically generated. |
Hi @steveloughran ,Thanks for your review. This issue seem not to test because it seem's a logic problem here.Could you have any suggestion here to write UT? |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
steveloughran
left a comment
There was a problem hiding this comment.
LGTM
just sent an email to mapred dev list to see if anyone from the team could review their code
cnauroth
left a comment
There was a problem hiding this comment.
LGTM
In theory, it ought to be possible to write a test that submits a job to a mini-cluster including a jar with the job configuration of fs.permissions.umask-mode set to 600. In practice, test runs are already quite long, so that might be overkill. I'd recommend adding a comment explaining why setPermission must be called before setReplication, so that future maintainers don't accidentally reorder the statements and cause a regression.
@skysiders , thank you for the bug report and the patch.
|
Hi @cnauroth ,thanks for your review. I add some comment to explain this. Could you please take a look this?Thanks! |
|
💔 -1 overall
This message was automatically generated. |
cnauroth
left a comment
There was a problem hiding this comment.
+1 (binding)
Thank you for incorporating the feedback, @skysiders .
I'll hold off committing for a while in case @steveloughran or others want one more chance to comment. I think we can target trunk, branch-3.3 and branch-3.2 with this patch.
|
+1 from me |
|
💔 -1 overall
This message was automatically generated. |
|
ok, lets merge. how do you want to be credited, with your github username or as Zhang Dongsheng ? |
Zhang Dongsheng is ok. |
|
I can commit this today. |
…pache#4026). Contributed by Zhang Dongsheng. Reviewed-by: Steve Loughran <stevel@apache.org> Signed-off-by: Chris Nauroth <cnauroth@apache.org>
MAPREDUCE-7372.MapReduce set permission too late in copyJar method
Description of PR
setReplication needs write permission , if umask too restrict , the project will fail, so we need to adjust the order.
How was this patch tested?
Any MapReduce task with a strict umask (such as user set umask with 0600) can trigger it.
For code changes:
LICENSE,LICENSE-binary,NOTICE-binaryfiles?