Skip to content

HDFS-11039. Document 42 configuration properties missing from hdfs-default.xml. - #8637

Open
joseluisll wants to merge 1 commit into
apache:trunkfrom
joseluisll:HDFS-11039-hdfs-default-xml
Open

HDFS-11039. Document 42 configuration properties missing from hdfs-default.xml.#8637
joseluisll wants to merge 1 commit into
apache:trunkfrom
joseluisll:HDFS-11039-hdfs-default-xml

Conversation

@joseluisll

Copy link
Copy Markdown

Description of PR

Documents 42 configuration properties in hdfs-default.xml that are read
by production code but were previously discoverable only by reading the
source. Every property listed below is live and non-deprecated: each read
site was verified, none appears in any DeprecationDelta table, and none
carries a deprecated constant. This answers the question asked on HDFS-11039
in 2018 — which properties should be added.

No production code is changed. The diff touches exactly two files:
hdfs-default.xml (+42 <property> entries, 1 rename of a deprecated
property name to its current one) and TestHdfsConfigFields.java (skip-list
bookkeeping only, explained below).

The 42 properties

Property Default Rationale
dfs.datanode.synconclose false Controls fsync of block files on close; read by BlockReceiver. Was skip-listed under // Fully deprecated properties? — disproved.
dfs.datanode.non.local.lazy.persist false Permits LAZY_PERSIST writes from non-local clients; read by DNConf. Was skip-listed under the same stale comment — disproved.
dfs.namenode.tolerate.heartbeat.multiplier 4 Heartbeat-staleness tolerance when deleting excess replicas; read by BlockPlacementPolicyDefault. Same stale skip entry — disproved.
dfs.namenode.replqueue.threshold-pct (empty; falls back to dfs.namenode.safemode.threshold-pct) Threshold for initializing replication queues; read by BlockManagerSafeMode. Same stale skip entry — disproved.
dfs.ha.log-roll.rpc.timeout 20000 RPC timeout for the Standby's edit-log-roll requests; read by EditLogTailer. Was skip-listed as // Removed by HDFS-6440 — the property is still read; the claim is incorrect.
dfs.ha.tail-edits.max-txns-per-lock 9223372036854775807 Bounds transactions applied per namesystem write-lock hold on the Standby; declared in EditLogTailer, outside any *ConfigKeys class.
dfs.client.read.shortcircuit.metrics.sampling.percentage 0 Sampling percentage for short-circuit read latency metrics; 0 disables. Declared in HdfsClientConfigKeys.Read.ShortCircuit, which the comparison test does not reflect over.
dfs.webhdfs.oauth2.credential (empty) OAuth2 credential for CredentialBasedAccessTokenProvider. Siblings were documented; this constant lives outside HdfsClientConfigKeys.
dfs.webhdfs.oauth2.refresh.token (empty) OAuth2 refresh token for ConfRefreshTokenBasedAccessTokenProvider. Same situation.
dfs.webhdfs.oauth2.refresh.token.expires.ms.since.epoch (empty) Expiry of the OAuth2 refresh token. Same situation.
nfs.http.port 50079 Fallback HTTP port for the NFS gateway web UI; effective port comes from nfs.http.address.
nfs.http.address 0.0.0.0:50079 HTTP bind address of the NFS gateway web UI.
nfs.https.port 50579 Fallback HTTPS port; effective port comes from nfs.https.address.
nfs.https.address 0.0.0.0:50579 HTTPS bind address of the NFS gateway web UI.
nfs.file.dump true Enables dumping out-of-order NFS writes to the local dump directory.
nfs.dtmax 65536 Maximum readdir transfer size of the gateway.
nfs.export.point / The HDFS path exported by the gateway.
nfs.max.open.files 256 Maximum concurrently open file streams in the gateway.
nfs.stream.timeout 600000 Inactivity timeout for NFS write streams (ms).
nfs.large.file.upload true Enables the gateway's large-file upload handling.
nfs.aix.compatibility.mode.enabled false Enables workarounds for AIX NFS clients.
nfs.metrics.percentiles.intervals (empty) Rollover intervals for gateway latency percentile metrics.
nfs.superuser (empty) NFS client user granted HDFS superuser access through the gateway.
nfs.registration.port 40 Privileged port used when registering with the portmapper.
nfs.udp.client.portmap.timeout.millis 500 Timeout for portmap RPC connections.
nfs.port.monitoring.disabled true Whether clients may connect from unprivileged ports. Renamed from the deprecated nfs.allow.insecure.ports per NfsConfiguration's DeprecationDelta.
dfs.datatransfer.server.fixedBlackList.file /etc/hadoop/fixedBlackList Fixed server-side deny list for BlackListBasedTrustedChannelResolver.
dfs.datatransfer.server.variableBlackList.enable false Enables the reloadable server-side deny list.
dfs.datatransfer.server.variableBlackList.file /etc/hadoop/blackList Reloadable server-side deny-list file.
dfs.datatransfer.server.variableBlackList.cache.secs 3600 Reload interval of the server-side deny list.
dfs.datatransfer.client.fixedBlackList.file (empty; falls back to the server value) Fixed client-side deny list.
dfs.datatransfer.client.variableBlackList.enable false Enables the reloadable client-side deny list.
dfs.datatransfer.client.variableBlackList.file (empty; falls back to the server value) Reloadable client-side deny-list file.
dfs.datatransfer.client.variableBlackList.cache.secs 3600 Reload interval of the client-side deny list.
dfs.datatransfer.server.fixedwhitelist.file /etc/hadoop/fixedwhitelist Fixed server-side allow list for WhitelistBasedTrustedChannelResolver.
dfs.datatransfer.server.variablewhitelist.enable false Enables the reloadable server-side allow list.
dfs.datatransfer.server.variablewhitelist.file /etc/hadoop/whitelist Reloadable server-side allow-list file.
dfs.datatransfer.server.variablewhitelist.cache.secs 3600 Reload interval of the server-side allow list.
dfs.datatransfer.client.fixedwhitelist.file (empty; falls back to the server value) Fixed client-side allow list.
dfs.datatransfer.client.variablewhitelist.enable false Enables the reloadable client-side allow list.
dfs.datatransfer.client.variablewhitelist.file (empty; falls back to the server value) Reloadable client-side allow-list file.
dfs.datatransfer.client.variablewhitelist.cache.secs 3600 Reload interval of the client-side allow list.

Why TestHdfsConfigFields is in the diff

TestHdfsConfigFields enforces, in both directions, that hdfs-default.xml
and the reflected *ConfigKeys classes agree, modulo its skip lists.
Documenting these properties therefore requires skip-list bookkeeping — the
same idiom as the existing nfs prefix entry, routinely updated by past
patches (HDFS-15870, HDFS-15514, HDFS-15559):

  • Removed the five stale skip entries (dfs.datanode.synconclose,
    dfs.datanode.non.local.lazy.persist,
    dfs.namenode.tolerate.heartbeat.multiplier,
    dfs.namenode.replqueue.threshold-pct, dfs.ha.log-roll.rpc.timeout), so
    those constants are again enforced against the xml and the gap cannot
    silently reopen for them.
  • Added skip entries for dfs.datatransfer.{server,client}.*,
    dfs.ha.tail-edits.max-txns-per-lock, dfs.webhdfs.oauth2.* and
    dfs.client.read.shortcircuit.metrics.sampling.percentage, whose constants
    live in classes the test does not reflect over. The nfs.* entries are
    covered by the existing nfs prefix entry; NfsConfigKeys itself cannot be
    reflected, as hadoop-hdfs-nfs depends on hadoop-hdfs and can never be on
    this test's classpath.
  • Corrected the comments on the two entries that legitimately remain
    skip-listed (dfs.corruptfilesreturned.max, dfs.metrics.session-id).

A follow-up can strengthen enforcement by promoting the declaring classes
into configurationClasses where module dependencies allow.

Method — how the list was produced and verified

The list was produced by static analysis of the entire hadoop-hdfs-project
source tree, cross-validated by two independently implemented scanners (one
Java, one Python), and verified against Hadoop's own machinery:

  1. Forward extraction — every String config-key constant in every class
    (not just *ConfigKeys registries), resolving multi-line declarations and
    PREFIX + "suffix" concatenation, including cross-class references.
  2. Inverse sweep — every Configuration accessor call site
    (get*, getTimeDuration, getPropsWithPrefix, …) resolved back to a
    key, catching literal-only keys that have no constant at all.
  3. Deprecation cross-checkDeprecationDelta tables
    (HdfsConfiguration, NfsConfiguration), HdfsClientConfigKeys.DeprecatedKeys,
    and @Deprecated annotations. A @Deprecated constant was not treated
    as a deprecated property (most such constants merely moved classes).
  4. Skip-list audit — every Test*ConfigFields skip entry re-checked
    against the code. Reasons stating intent ("not intended for users",
    "purposely hidden") were respected; reasons stating checkable facts
    ("deprecated", "removed") were verified.
  5. Oracle validation — before trusting any finding, the extraction was
    required to reproduce the green TestHdfsConfigFields/TestRBFConfigFields
    results with a zero diff; any discrepancy was treated as a scanner bug.
  6. Live verificationHdfsConfiguration was instantiated and its merged
    property set diffed against the xml through the real
    Configuration.loadResource pipeline, including ${...} resolution.

Descriptions policy. Descriptions are derived from the declaring
constant's Javadoc, surrounding code comments, or direct inspection of the
read site — never invented. Secrets and unset-by-default properties use an
empty <value>, matching file convention.

Properties deliberately not documented — exclusions and their justification

The audit identified further undocumented keys that are deliberately excluded
from this patch. Each exclusion is justified by explicit source-level intent,
by deprecation status, or by demonstrated absence of effect:

Excluded Justification
dfs.namenode.snapshot.deletion.ordered, dfs.namenode.snapshot.deletion.ordered.gc.period.ms, dfs.namenode.snapshot.trashroot.enabled The declaring sources (SnapshotManager, FSNamesystem) designate these keys as private configuration. Documenting them would contradict recorded upstream intent.
dfs.ha.tail-edits.qjm.rpc.max-txns Annotated in QuorumJournalManager as not publicly exposed.
dfs.datanode.xceiver.stop.timeout.millis Annotated in DFSConfigKeys as hidden and intentionally undocumented.
dfs.datanode.startup, dfs.namenode.startup Recorded in the skip list as not intended for users; they carry the startup option internally and are not operator-settable configuration.
ignore.secure.ports.for.testing, dfs.datanode.enable.fileio.fault.injection, dfs.datanode.duplicate.replica.deletion Test-only instrumentation hooks with no operational function.
dfs.datanode.min.supported.namenode.version, dfs.namenode.min.supported.datanode.version Internal version-compatibility floors; not operator-tunable in any supported scenario.
dfs.corruptfilesreturned.max The value is read but never consulted by any code path. Documenting an ineffective key would misinform operators. The skip-list comment has been corrected to record this.
dfs.metrics.session-id Deprecated alias, registered in HdfsClientConfigKeys.DeprecatedKeys. The skip-list comment has been corrected to record this.
dfs.namenode.audit.log.async Obsolete. The sole read site exists to warn that the key is no longer in use.
dfs.federation.router.* (4 keys) Owned by hdfs-rbf-default.xml; a separate JIRA will be filed.

Contains content generated by Anthropic Claude Code.

How was this patch tested?

  • mvn test -Dtest=TestHdfsConfigFields on the rebased branch against
    current trunk (JDK 17): 4/4 pass, BUILD SUCCESS.
  • XML well-formedness and duplicate-name check: clean. (Three pre-existing
    duplicate dfs.journalnode.kerberos.* entries were noticed upstream;
    untouched here as out of scope.)
  • Live round-trip: instantiated HdfsConfiguration and diffed its merged
    property set against the xml through the real resource-loading pipeline;
    every non-empty documented value matches the code default, including
    ${...} resolution.

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation? (N/A — no object-storage changes)
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0? (N/A — no new dependencies)
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files? (N/A)

AI Tooling

This contribution was prepared with the assistance of Anthropic Claude Code:
property discovery, classification and description drafting were performed
with its assistance and were reviewed, verified against the source, and
approved by the contributor.

@joseluisll
joseluisll force-pushed the HDFS-11039-hdfs-default-xml branch from c82f036 to fca950f Compare July 28, 2026 15:39
…fault.xml.

Adds documentation for 42 live, non-deprecated configuration properties
that are read by production code but were absent from hdfs-default.xml:
16 NFS gateway properties, 16 encrypted-transfer allow/deny-list
properties, 3 WebHDFS OAuth2 properties, 1 standby edit-tailing
property, 1 short-circuit read metrics property, and 5 properties that
were excluded from TestHdfsConfigFields under stale skip-list reasons
("Fully deprecated properties?", "Removed by HDFS-6440") that code
inspection disproves.

The only Java change is skip-list bookkeeping in TestHdfsConfigFields,
following the file's existing idiom (cf. the "nfs" prefix entry):
stale skip entries removed so the reflected constants are enforced
against the xml again, and skip entries added for properties whose
constants live outside the classes the test reflects over.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@joseluisll
joseluisll force-pushed the HDFS-11039-hdfs-default-xml branch from fca950f to 7337373 Compare July 28, 2026 15:41
@hadoop-yetus

Copy link
Copy Markdown

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 12m 29s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 xmllint 0m 0s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 42m 12s trunk passed
+1 💚 compile 1m 48s trunk passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 compile 1m 48s trunk passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 checkstyle 1m 51s trunk passed
+1 💚 mvnsite 1m 56s trunk passed
+1 💚 javadoc 1m 29s trunk passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 javadoc 1m 29s trunk passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 spotbugs 4m 13s trunk passed
+1 💚 shadedclient 32m 24s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 1m 23s the patch passed
+1 💚 compile 1m 16s the patch passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 javac 1m 16s the patch passed
+1 💚 compile 1m 20s the patch passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 javac 1m 20s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 1m 15s the patch passed
+1 💚 mvnsite 1m 27s the patch passed
+1 💚 javadoc 1m 1s the patch passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 javadoc 1m 1s the patch passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 spotbugs 3m 52s the patch passed
+1 💚 shadedclient 30m 43s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 220m 19s hadoop-hdfs in the patch passed.
+1 💚 asflicense 0m 43s The patch does not generate ASF License warnings.
364m 4s
Subsystem Report/Notes
Docker ClientAPI=1.55 ServerAPI=1.55 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8637/1/artifact/out/Dockerfile
GITHUB PR #8637
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint spotbugs checkstyle
uname Linux 6b097aa7eca5 5.15.0-181-generic #191-Ubuntu SMP Fri May 22 19:09:02 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / c82f036
Default Java Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
Multi-JDK versions /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.11+10-1-24.04.2-Ubuntu /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8637/1/testReport/
Max. process+thread count 3824 (vs. ulimit of 10000)
modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8637/1/console
versions git=2.43.0 maven=3.9.15 spotbugs=4.9.7
Powered by Apache Yetus 0.14.1 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus

Copy link
Copy Markdown

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 37s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 1s codespell was not available.
+0 🆗 detsecrets 0m 1s detect-secrets was not available.
+0 🆗 xmllint 0m 1s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 49m 23s trunk passed
+1 💚 compile 2m 0s trunk passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 compile 2m 10s trunk passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 checkstyle 1m 46s trunk passed
+1 💚 mvnsite 2m 3s trunk passed
+1 💚 javadoc 1m 35s trunk passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 javadoc 1m 26s trunk passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 spotbugs 4m 16s trunk passed
+1 💚 shadedclient 36m 1s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 1m 28s the patch passed
+1 💚 compile 1m 20s the patch passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 javac 1m 20s the patch passed
+1 💚 compile 1m 30s the patch passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 javac 1m 30s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 1m 21s the patch passed
+1 💚 mvnsite 1m 37s the patch passed
+1 💚 javadoc 1m 2s the patch passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 javadoc 1m 5s the patch passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 spotbugs 4m 12s the patch passed
+1 💚 shadedclient 35m 40s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ unit 223m 0s /patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt hadoop-hdfs in the patch passed.
+1 💚 asflicense 0m 46s The patch does not generate ASF License warnings.
372m 12s
Reason Tests
Failed junit tests hadoop.hdfs.server.datanode.fsdataset.impl.TestFsVolumeList
Subsystem Report/Notes
Docker ClientAPI=1.55 ServerAPI=1.55 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8637/2/artifact/out/Dockerfile
GITHUB PR #8637
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint spotbugs checkstyle
uname Linux 19b86e7852d8 5.15.0-181-generic #191-Ubuntu SMP Fri May 22 19:09:02 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 7337373
Default Java Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
Multi-JDK versions /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.11+10-1-24.04.2-Ubuntu /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8637/2/testReport/
Max. process+thread count 3329 (vs. ulimit of 10000)
modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8637/2/console
versions git=2.43.0 maven=3.9.15 spotbugs=4.9.7
Powered by Apache Yetus 0.14.1 https://yetus.apache.org

This message was automatically generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants