Skip to content

Conversation

@saihemanth-cloudera
Copy link
Contributor

@saihemanth-cloudera saihemanth-cloudera commented Oct 27, 2025

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.

Copy link
Member

@ayushtkn ayushtkn left a 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?

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

@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 3, 2025

@saihemanth-cloudera
Copy link
Contributor Author

@ayushtkn - can you review this patch again?

@saihemanth-cloudera
Copy link
Contributor Author

@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."),
Copy link
Contributor

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.

Copy link
Contributor

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.

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants