Skip to content

Commit 1e1e4a2

Browse files
liever18S O'Donnell
authored andcommitted
HDFS-16408. Ensure LeaseRecheckIntervalMs is greater than zero (#3856)
(cherry picked from commit e1d0aa9)
1 parent 278fc00 commit 1e1e4a2

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
@@ -907,6 +907,10 @@ static FSNamesystem loadFromDisk(Configuration conf) throws IOException {
907907
this.leaseRecheckIntervalMs = conf.getLong(
908908
DFS_NAMENODE_LEASE_RECHECK_INTERVAL_MS_KEY,
909909
DFS_NAMENODE_LEASE_RECHECK_INTERVAL_MS_DEFAULT);
910+
Preconditions.checkArgument(
911+
leaseRecheckIntervalMs > 0,
912+
DFSConfigKeys.DFS_NAMENODE_LEASE_RECHECK_INTERVAL_MS_KEY +
913+
" must be greater than zero");
910914
this.maxLockHoldToReleaseLeaseMs = conf.getLong(
911915
DFS_NAMENODE_MAX_LOCK_HOLD_TO_RELEASE_LEASE_MS_KEY,
912916
DFS_NAMENODE_MAX_LOCK_HOLD_TO_RELEASE_LEASE_MS_DEFAULT);

0 commit comments

Comments
 (0)