Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
3.0.0-alpha2
-
None
-
None
-
Reviewed
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.