{"record":{"id":"ca7f5718ee3360e6","repo":"apache/hadoop","slug":"dfs-namenode-lazypersist-file-scrub-interval-sec-m","errorCode":null,"errorMessage":"dfs.namenode.lazypersist.file.scrub.interval.sec must be zero (for disable) or greater than zero.","messagePattern":"dfs\\.namenode\\.lazypersist\\.file\\.scrub\\.interval\\.sec must be zero \\(for disable\\) or greater than zero\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java","lineNumber":1027,"sourceCode":"          (conf.getFloat(\n              DFS_NAMENODE_EDIT_LOG_AUTOROLL_MULTIPLIER_THRESHOLD,\n              DFS_NAMENODE_EDIT_LOG_AUTOROLL_MULTIPLIER_THRESHOLD_DEFAULT) *\n          conf.getLong(\n              DFS_NAMENODE_CHECKPOINT_TXNS_KEY,\n              DFS_NAMENODE_CHECKPOINT_TXNS_DEFAULT));\n      this.editLogRollerInterval = conf.getInt(\n          DFS_NAMENODE_EDIT_LOG_AUTOROLL_CHECK_INTERVAL_MS,\n          DFS_NAMENODE_EDIT_LOG_AUTOROLL_CHECK_INTERVAL_MS_DEFAULT);\n      this.editLogRollerMaxIntervalMs = conf.getLong(\n          DFS_NAMENODE_EDIT_LOG_AUTOROLL_MAX_INTERVAL_MS,\n          DFS_NAMENODE_EDIT_LOG_AUTOROLL_MAX_INTERVAL_MS_DEFAULT);\n\n      this.lazyPersistFileScrubIntervalSec = conf.getInt(\n          DFS_NAMENODE_LAZY_PERSIST_FILE_SCRUB_INTERVAL_SEC,\n          DFS_NAMENODE_LAZY_PERSIST_FILE_SCRUB_INTERVAL_SEC_DEFAULT);\n\n      if (this.lazyPersistFileScrubIntervalSec < 0) {\n        throw new IllegalArgumentException(\n            DFS_NAMENODE_LAZY_PERSIST_FILE_SCRUB_INTERVAL_SEC\n                + \" must be zero (for disable) or greater than zero.\");\n      }\n\n      this.edekCacheLoaderDelay = conf.getInt(\n          DFSConfigKeys.DFS_NAMENODE_EDEKCACHELOADER_INITIAL_DELAY_MS_KEY,\n          DFSConfigKeys.DFS_NAMENODE_EDEKCACHELOADER_INITIAL_DELAY_MS_DEFAULT);\n      this.edekCacheLoaderInterval = conf.getInt(\n          DFSConfigKeys.DFS_NAMENODE_EDEKCACHELOADER_INTERVAL_MS_KEY,\n          DFSConfigKeys.DFS_NAMENODE_EDEKCACHELOADER_INTERVAL_MS_DEFAULT);\n      this.edekCacheLoaderMaxRetries = conf.getInt(\n          DFSConfigKeys.DFS_NAMENODE_EDEKCACHELOADER_MAX_RETRIES_KEY,\n          DFSConfigKeys.DFS_NAMENODE_EDEKCACHELOADER_MAX_RETRIES_DEFAULT);\n\n      this.leaseRecheckIntervalMs = conf.getLong(\n          DFS_NAMENODE_LEASE_RECHECK_INTERVAL_MS_KEY,\n          DFS_NAMENODE_LEASE_RECHECK_INTERVAL_MS_DEFAULT);\n      Preconditions.checkArgument(","sourceCodeStart":1009,"sourceCodeEnd":1045,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java#L1009-L1045","documentation":"The lazy-persist file scrubber interval (dfs.namenode.lazypersist.file.scrub.interval.sec) must be zero (disabled) or positive. FSNamesystem reads it with conf.getInt and throws IllegalArgumentException for any negative value during construction, so the NameNode refuses to start until the property is corrected.","triggerScenarios":"Setting dfs.namenode.lazypersist.file.scrub.interval.sec to a negative number in hdfs-site.xml (commonly -1 chosen as an 'off' convention, which this property does not accept — it wants 0).","commonSituations":"Operators using -1-as-disabled habits from other Hadoop properties; templated configs with a sign typo; values pasted with a stray dash.","solutions":["Set the property to 0 to disable scrubbing","Or set a positive interval in seconds (e.g. 300)","Restart the NameNode and confirm startup completes"],"exampleFix":"<!-- before -->\n<property><name>dfs.namenode.lazypersist.file.scrub.interval.sec</name><value>-1</value></property>\n<!-- after: 0 disables the scrubber -->\n<property><name>dfs.namenode.lazypersist.file.scrub.interval.sec</name><value>0</value></property>","handlingStrategy":"validation","validationCode":"int v = conf.getInt(\n    DFSConfigKeys.DFS_NAMENODE_LAZY_PERSIST_FILE_SCRUB_INTERVAL_SEC,\n    DFSConfigKeys.DFS_NAMENODE_LAZY_PERSIST_FILE_SCRUB_INTERVAL_SEC_DEFAULT);\nif (v < 0) {\n  throw new IllegalArgumentException(\n      \"scrub interval must be 0 (disabled) or positive, got \" + v);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Range-check numeric Hadoop config keys in your config management before deploy","Remember this property uses 0 for disabled, not -1","Document the accepted range next to the property in your site templates"],"tags":["hadoop","hdfs","namenode","configuration","lazy-persist","numeric-range"],"backgroundTag":"config-validation-failed","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}