Addendum patch for HDFS-6564.

This commit is contained in:
Haohui Mai 2015-06-23 22:30:18 -07:00
parent 77609e6465
commit 0cd7603bd6
2 changed files with 2 additions and 2 deletions

View File

@ -208,7 +208,7 @@ public class WebHdfsFileSystem extends FileSystem
} }
/** Is WebHDFS enabled in conf? */ /** Is WebHDFS enabled in conf? */
public static boolean isEnabled(final Configuration conf, final Log log) { public static boolean isEnabled(final Configuration conf) {
final boolean b = conf.getBoolean( final boolean b = conf.getBoolean(
HdfsClientConfigKeys.DFS_WEBHDFS_ENABLED_KEY, HdfsClientConfigKeys.DFS_WEBHDFS_ENABLED_KEY,
HdfsClientConfigKeys.DFS_WEBHDFS_ENABLED_DEFAULT); HdfsClientConfigKeys.DFS_WEBHDFS_ENABLED_DEFAULT);

View File

@ -68,7 +68,7 @@ public class NameNodeHttpServer {
} }
private void initWebHdfs(Configuration conf) throws IOException { private void initWebHdfs(Configuration conf) throws IOException {
if (WebHdfsFileSystem.isEnabled(conf, HttpServer2.LOG)) { if (WebHdfsFileSystem.isEnabled(conf)) {
// set user pattern based on configuration file // set user pattern based on configuration file
UserParam.setUserPattern(conf.get( UserParam.setUserPattern(conf.get(
DFSConfigKeys.DFS_WEBHDFS_USER_PATTERN_KEY, DFSConfigKeys.DFS_WEBHDFS_USER_PATTERN_KEY,