コード例 #1
0
 /**
  * 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);
 }
コード例 #2
0
 public static boolean isSecurityEnabled(Configuration conf) {
   if (!isInitialized) {
     initialize(conf);
   }
   return useKerberos;
 }
コード例 #3
0
 /**
  * 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());
   }
 }