[
https://issues.apache.org/jira/browse/HBASE-7814?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13577258#comment-13577258
]
Enis Soztutar commented on HBASE-7814:
--------------------------------------
bq. This will fail if getShortUserName does not exist
>From my understanding, we will only call getShortName() when we are using
>SecureHadoopUser, instead of HadoopUser. See getCurrent():
{code}
/**
* Returns the {@code User} instance within current execution context.
*/
public static User getCurrent() throws IOException {
User user;
if (IS_SECURE_HADOOP) {
user = new SecureHadoopUser();
} else {
user = new HadoopUser();
}
if (user.getUGI() == null) {
return null;
}
return user;
}
{code}
SecureHadoopUser is a misnomer. IS_SECURE_HADOOP is set only when we can call
the isSecurityEnabled() method (it is not security enabled, but rather whether
we are using a Hadoop version which has security API). My understanding is that
if underlying hadoop does not support security, we will default to using
HadoopUser.
{code}
/**
* Flag to differentiate between API-incompatible changes to
* {@link org.apache.hadoop.security.UserGroupInformation} between vanilla
* Hadoop 0.20.x and secure Hadoop 0.20+.
*/
private static boolean IS_SECURE_HADOOP = true;
static {
try {
UserGroupInformation.class.getMethod("isSecurityEnabled");
} catch (NoSuchMethodException nsme) {
IS_SECURE_HADOOP = false;
}
}
{code}
> Port HBASE-6963 'unable to run hbck on a secure cluster' to 0.94
> ----------------------------------------------------------------
>
> Key: HBASE-7814
> URL: https://issues.apache.org/jira/browse/HBASE-7814
> Project: HBase
> Issue Type: Bug
> Reporter: Ted Yu
> Assignee: Ted Yu
> Fix For: 0.94.6
>
> Attachments: 7814-v2.txt, 7814-v3.txt, 7814-v4.txt,
> HBASE-7814-v0.patch
>
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira