Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-10219

Change the default value for dfs.namenode.reconstruction.pending.timeout-sec from -1 to 300

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.0.0-alpha2
    • 3.0.0-alpha4
    • None
    • None

    Description

      The default value for "dfs.namenode.replication.pending.timeout-sec" (DFS_NAMENODE_REPLICATION_PENDING_TIMEOUT_SEC_DEFAULT) is -1, but the timeout is 5 minutes by default.

      BlockManager.java
          pendingReplications = new PendingReplicationBlocks(conf.getInt(
            DFSConfigKeys.DFS_NAMENODE_REPLICATION_PENDING_TIMEOUT_SEC_KEY,
            DFSConfigKeys.DFS_NAMENODE_REPLICATION_PENDING_TIMEOUT_SEC_DEFAULT) * 1000L);
      
      PendingReplicationBlocks.java
        private long timeout = 5 * 60 * 1000;
        private final static long DEFAULT_RECHECK_INTERVAL = 5 * 60 * 1000;
      
        PendingReplicationBlocks(long timeoutPeriod) {
          if ( timeoutPeriod > 0 ) {
            this.timeout = timeoutPeriod;
          }
          pendingReplications = new HashMap<>();
          timedOutItems = new ArrayList<>();
        }
      

      I'm thinking we can change DFS_NAMENODE_REPLICATION_PENDING_TIMEOUT_SEC_DEFAULT from -1 to 300 for improving readability.

      Attachments

        1. HDFS-10219.001.patch
          2 kB
          Yiqun Lin
        2. HDFS-10219.002.patch
          1 kB
          Yiqun Lin
        3. HDFS-10219.003.patch
          3 kB
          Yiqun Lin

        Activity

          People

            linyiqun Yiqun Lin
            aajisaka Akira Ajisaka
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: