瀏覽代碼

HDFS-14676. Wrong default value for fs.df.interval. Contributed by xiangguang zheng.

Arpit Agarwal 7 年之前
父節點
當前提交
72eba25e09
共有 1 個文件被更改,包括 4 次插入5 次删除
  1. 4 5
      hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/DF.java

+ 4 - 5
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/DF.java

@@ -39,9 +39,6 @@ import com.google.common.annotations.VisibleForTesting;
 @InterfaceStability.Evolving
 @InterfaceStability.Evolving
 public class DF extends Shell {
 public class DF extends Shell {
 
 
-  /** Default DF refresh interval. */
-  public static final long DF_INTERVAL_DEFAULT = 3 * 1000;
-
   private final String dirPath;
   private final String dirPath;
   private final File dirFile;
   private final File dirFile;
   private String filesystem;
   private String filesystem;
@@ -50,7 +47,8 @@ public class DF extends Shell {
   private ArrayList<String> output;
   private ArrayList<String> output;
 
 
   public DF(File path, Configuration conf) throws IOException {
   public DF(File path, Configuration conf) throws IOException {
-    this(path, conf.getLong(CommonConfigurationKeys.FS_DF_INTERVAL_KEY, DF.DF_INTERVAL_DEFAULT));
+    this(path, conf.getLong(CommonConfigurationKeys.FS_DF_INTERVAL_KEY,
+        CommonConfigurationKeysPublic.FS_DF_INTERVAL_DEFAULT));
   }
   }
 
 
   public DF(File path, long dfInterval) throws IOException {
   public DF(File path, long dfInterval) throws IOException {
@@ -214,6 +212,7 @@ public class DF extends Shell {
     if (args.length > 0)
     if (args.length > 0)
       path = args[0];
       path = args[0];
 
 
-    System.out.println(new DF(new File(path), DF_INTERVAL_DEFAULT).toString());
+    System.out.println(new DF(new File(path),
+        CommonConfigurationKeysPublic.FS_DF_INTERVAL_DEFAULT).toString());
   }
   }
 }
 }