List of usage examples for org.apache.zookeeper.server.util KerberosUtil getDefaultRealm
public static String getDefaultRealm() throws IllegalArgumentException
From source file:com.streamsets.datacollector.security.HadoopSecurityUtil.java
License:Apache License
public static String getDefaultRealm() throws ReflectiveOperationException { AccessControlContext accessContext = AccessController.getContext(); synchronized (SecurityUtil.getSubjectDomainLock(accessContext)) { return KerberosUtil.getDefaultRealm(); }/*from ww w . java 2 s . com*/ }
From source file:org.apache.hoya.tools.HoyaUtils.java
License:Apache License
public static String getKerberosRealm() { try {/*from w w w .j av a2 s . c o m*/ return KerberosUtil.getDefaultRealm(); } catch (Exception e) { log.debug("introspection into JVM internals failed", e); return "(unknown)"; } }