Skip to content
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

support UserGroupInformation #317

Open
zyy4676 opened this issue May 16, 2023 · 0 comments
Open

support UserGroupInformation #317

zyy4676 opened this issue May 16, 2023 · 0 comments

Comments

@zyy4676
Copy link

zyy4676 commented May 16, 2023

import org.apache.hadoop.security.UserGroupInformation;
private T doAs(String user, final PrivilegedExceptionAction action)
throws Exception {
UserGroupInformation.loginUserFromKeytab(user, keytab.getAbsolutePath());
UserGroupInformation ugi = UserGroupInformation.getLoginUser();
try {
return ugi.doAs(action);
} finally {
ugi.logoutUserFromKeytab();
}
}

like this i can put http resuest in action.

I want get http://namenode:port/jmx , if not ugi, how to do?
client can't sent this request ? (http need login kerberos) .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant