Java Code Examples for org.apache.hadoop.security.UserGroupInformation#isLoginTicketBased()

The following examples show how to use org.apache.hadoop.security.UserGroupInformation#isLoginTicketBased() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: atlas   File: KafkaNotification.java    License: Apache License 2.0 5 votes vote down vote up
@VisibleForTesting
boolean isLoginTicketBased() {
    boolean ret = false;

    try {
        ret = UserGroupInformation.isLoginTicketBased();
    } catch (Exception excp) {
        LOG.warn("Error in determining ticket-cache for KafkaClient-JAAS config", excp);
    }

    return ret;
}
 
Example 2
Source Project: incubator-atlas   File: AtlasHook.java    License: Apache License 2.0 5 votes vote down vote up
private static boolean isLoginTicketBased() {
    boolean ret = false;

    try {
        ret = UserGroupInformation.isLoginTicketBased();
    } catch (Exception excp) {
        LOG.warn("Error in determining ticket-cache for KafkaClient-JAAS config", excp);
    }

    return ret;
}
 
Example 3
Source Project: zeppelin   File: JDBCInterpreter.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected boolean runKerberosLogin() {
  try {
    if (UserGroupInformation.isLoginKeytabBased()) {
      UserGroupInformation.getLoginUser().reloginFromKeytab();
      return true;
    } else if (UserGroupInformation.isLoginTicketBased()) {
      UserGroupInformation.getLoginUser().reloginFromTicketCache();
      return true;
    }
  } catch (Exception e) {
    LOGGER.error("Unable to run kinit for zeppelin", e);
  }
  return false;
}