瀏覽代碼

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

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.20@729989 13f79535-47bb-0310-9956-ffa450edef68
Raghu Angadi 16 年之前
父節點
當前提交
17276826d3
共有 2 個文件被更改,包括 7 次插入0 次删除
  1. 2 0
      CHANGES.txt
  2. 5 0
      src/hdfs/org/apache/hadoop/hdfs/tools/DFSck.java

+ 2 - 0
CHANGES.txt

@@ -495,6 +495,8 @@ Release 0.20.0 - Unreleased
     HADOOP-4854. Read reclaim capacity interval from capacity scheduler 
     HADOOP-4854. Read reclaim capacity interval from capacity scheduler 
     configuration. (Sreekanth Ramakrishnan via yhemanth)
     configuration. (Sreekanth Ramakrishnan via yhemanth)
 
 
+    HADOOP-4896. HDFS Fsck does not load HDFS configuration. (Raghu Angadi)
+
 Release 0.19.1 - Unreleased
 Release 0.19.1 - Unreleased
 
 
   IMPROVEMENTS
   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;
     return errCode;
   }
   }
 
 
+  static{
+    Configuration.addDefaultResource("hdfs-default.xml");
+    Configuration.addDefaultResource("hdfs-site.xml");
+  }
+  
   public static void main(String[] args) throws Exception {
   public static void main(String[] args) throws Exception {
     // -files option is also used by GenericOptionsParser
     // -files option is also used by GenericOptionsParser
     // Make sure that is not the first argument for fsck
     // Make sure that is not the first argument for fsck