Skip to content

Commit d9d5538

Browse files
liever18HarshitGupta11
authored andcommitted
HDFS-16408. Ensure LeaseRecheckIntervalMs is greater than zero (apache#3856)
1 parent c5de78a commit d9d5538

File tree

1 file changed

+4
-0
lines changed
  • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode

1 file changed

+4
-0
lines changed

hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,6 +1014,10 @@ static FSNamesystem loadFromDisk(Configuration conf) throws IOException {
10141014
this.leaseRecheckIntervalMs = conf.getLong(
10151015
DFS_NAMENODE_LEASE_RECHECK_INTERVAL_MS_KEY,
10161016
DFS_NAMENODE_LEASE_RECHECK_INTERVAL_MS_DEFAULT);
1017+
Preconditions.checkArgument(
1018+
leaseRecheckIntervalMs > 0,
1019+
DFSConfigKeys.DFS_NAMENODE_LEASE_RECHECK_INTERVAL_MS_KEY +
1020+
" must be greater than zero");
10171021
this.maxLockHoldToReleaseLeaseMs = conf.getLong(
10181022
DFS_NAMENODE_MAX_LOCK_HOLD_TO_RELEASE_LEASE_MS_KEY,
10191023
DFS_NAMENODE_MAX_LOCK_HOLD_TO_RELEASE_LEASE_MS_DEFAULT);

0 commit comments

Comments
 (0)