/** * Set the static configuration for UGI. In particular, set the security authentication mechanism * and the group look up service. * * @param conf the configuration to use */ public static void setConfiguration(Configuration conf) { initialize(conf); }
public static boolean isSecurityEnabled(Configuration conf) { if (!isInitialized) { initialize(conf); } return useKerberos; }
/** * A method to initialize the fields that depend on a configuration. Must be called before * useKerberos or groups is used. */ private static synchronized void ensureInitialized() { if (!isInitialized) { initialize(new Configuration()); } }