-
Notifications
You must be signed in to change notification settings - Fork 4.8k
HIVE-29293: Restrict config 'mapreduce.job.queuename' at tez session #6155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
ayushtkn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this an intentional behaviour?
hive/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java
Lines 559 to 560 in 4669cd5
| String queueName = conf.get(JobContext.QUEUE_NAME, YarnConfiguration.DEFAULT_QUEUE_NAME); | |
| conf.setIfUnset(TezConfiguration.TEZ_QUEUE_NAME, queueName); |
The Javadoc of this method even states:
/**
* This takes settings from MR and applies them to the appropriate Tez configuration. This is
* similar to what Pig on Tez does (refer MRToTezHelper.java).
*
* @param conf configuration with MR settings
|
|
@ayushtkn - can you review this patch again? |
|
@ayushtkn @abstractdog - Can you please review this patch? Thanks |
| "exception will be thrown."), | ||
| "The configuration settings that cannot be set when submitting jobs to HiveServer2. If\n" + | ||
| "any of these are set to values different from those in the server configuration, an\n" + | ||
| "exception will be thrown."), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes seem unrelated to the issue, and may lead to merge conflict later. Please consider reverting these.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the indentation has changed for these in the new commits. Although minor, it would be nice to revert these changes completely as it's unrelated to the issue. Otherwise, everything LGTM.
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionPoolManager.java
Outdated
Show resolved
Hide resolved
63ef9ce to
35dbbd1
Compare
|



What changes were proposed in this pull request?
Verify config 'mapreduce.job.queuename' value, if tez.queue.name is null.
Why are the changes needed?
When tez.queue.name is null, setting 'mapreduce.job.queuename' creates security issue because any user can submit job to this queue. TezSessionPoolManager is currently not verifying the queue since null is being passed. This patch addresses this concern by verifying that if tez.queue.name is null, then we verify 'mapreduce.job.queuename'.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Remote cluster.