hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wangwenli <wangwe...@huawei.com>
Subject regarding dfs.web.ugi
Date Fri, 27 Jul 2012 11:29:52 GMT
HI all,

I am using hadoop2.0 alpha release,

org.apache.hadoop.http.lib.StaticUserWebFilter.getUsernameFromConf(Configuration)

  static String getUsernameFromConf(Configuration conf) {
    String oldStyleUgi = conf.get(DEPRECATED_UGI_KEY);
    if (oldStyleUgi != null) {
      // We can't use the normal configuration deprecation mechanism here
      // since we need to split out the username from the configured UGI.
      LOG.warn(DEPRECATED_UGI_KEY + " should not be used. Instead, use " +
               USERNAME_KEY + ".");
      String[] parts = oldStyleUgi.split(",");
      return parts[0];
    } else {
      return conf.get(USERNAME_KEY, USERNAME_DEFAULT);        // this part will never be executed,
because in hdfs-default.xml,the DEPRECATED_UGI_KEY will always there, so here the logic should
check the new property first, then the deprecated key.  Any idea?
    }
  }

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message