Skip to content

HDFS-17452 : DfsRouterAdmin RefreshCallQueue fails when authorization is enabled #6982

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

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1364,7 +1364,12 @@ public int genericRefresh(String[] argv, int i) throws IOException {
* @throws IOException if the operation was not successful.
*/
private int refreshCallQueue() throws IOException {
// for security authorization
// server principal for this call
// should be Routers's one.
Configuration conf = getConf();
conf.set(CommonConfigurationKeys.HADOOP_SECURITY_SERVICE_USER_NAME_KEY,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why i did not found HADOOP_SECURITY_SERVICE_USER_NAME_KEY in CommonConfigurationKeys?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is set when the refreshcallqueue is executed. For reference in DFSAdmin we handle it this way

conf.set(CommonConfigurationKeys.HADOOP_SECURITY_SERVICE_USER_NAME_KEY,

Also the key is defined in

public static final String HADOOP_SECURITY_SERVICE_USER_NAME_KEY =

conf.get(RBFConfigKeys.DFS_ROUTER_KERBEROS_PRINCIPAL_KEY, ""));
String hostport = getConf().getTrimmed(
RBFConfigKeys.DFS_ROUTER_ADMIN_ADDRESS_KEY,
RBFConfigKeys.DFS_ROUTER_ADMIN_ADDRESS_DEFAULT);
Expand Down
Loading