浏览代码

HADOOP-4896. HDFS Fsck does not load HDFS configuration. (Raghu Angadi)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@729987 13f79535-47bb-0310-9956-ffa450edef68
Raghu Angadi 16 年之前
父节点
当前提交
5ed83bc641
共有 2 个文件被更改,包括 7 次插入0 次删除
  1. 2 0
      CHANGES.txt
  2. 5 0
      src/hdfs/org/apache/hadoop/hdfs/tools/DFSck.java

+ 2 - 0
CHANGES.txt

@@ -515,6 +515,8 @@ Release 0.20.0 - Unreleased
     HADOOP-4854. Read reclaim capacity interval from capacity scheduler 
     configuration. (Sreekanth Ramakrishnan via yhemanth)
 
+    HADOOP-4896. HDFS Fsck does not load HDFS configuration. (Raghu Angadi)
+
 Release 0.19.1 - Unreleased
 
   IMPROVEMENTS

+ 5 - 0
src/hdfs/org/apache/hadoop/hdfs/tools/DFSck.java

@@ -144,6 +144,11 @@ public class DFSck extends Configured implements Tool {
     return errCode;
   }
 
+  static{
+    Configuration.addDefaultResource("hdfs-default.xml");
+    Configuration.addDefaultResource("hdfs-site.xml");
+  }
+  
   public static void main(String[] args) throws Exception {
     // -files option is also used by GenericOptionsParser
     // Make sure that is not the first argument for fsck