You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Siyao Meng (Jira)" <ji...@apache.org> on 2026/10/19 01:23:00 UTC
[jira] [Created] (HDFS-17998) MiniDFSCluster: allow binding to an IPv6 loopback address
Siyao Meng created HDFS-17998:
---------------------------------
Summary: MiniDFSCluster: allow binding to an IPv6 loopback address
Key: HDFS-17998
URL: https://issues.apache.org/jira/browse/HDFS-17998
Project: Hadoop HDFS
Issue Type: Improvement
Components: test
Reporter: Siyao Meng
Assignee: Siyao Meng
{{MiniDFSCluster}} hardcodes {{127.0.0.1}} for the NameNode and DataNode addresses, for example:
{code:java}
conf.set(FS_DEFAULT_NAME_KEY, "hdfs://127.0.0.1:" + onlyNN.getIpcPort());
...
conf.setIfUnset(DFS_DATANODE_ADDRESS_KEY, "127.0.0.1:0");
conf.setIfUnset(DFS_DATANODE_HTTP_ADDRESS_KEY, "127.0.0.1:" + httpPort);
{code}
[MiniDFSCluster.java:1199|https://github.com/apache/hadoop/blob/1097744bc490b65cad5ab2fbeafff35687971357/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java#L1199], [1369|https://github.com/apache/hadoop/blob/1097744bc490b65cad5ab2fbeafff35687971357/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java#L1369], [1374|https://github.com/apache/hadoop/blob/1097744bc490b65cad5ab2fbeafff35687971357/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java#L1374], [1698|https://github.com/apache/hadoop/blob/1097744bc490b65cad5ab2fbeafff35687971357/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java#L1698], [3475-3491|https://github.com/apache/hadoop/blob/1097744bc490b65cad5ab2fbeafff35687971357/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java#L3475-L3491]
So an HDFS test cannot start a cluster on the IPv6 loopback ({{::1}}), and IPv6 bugs in the HDFS read and write paths (for example HADOOP-20027 and HADOOP-20024) cannot get end-to-end tests.
*Proposal:* add a {{Builder}} option for the bind host, defaulting to {{127.0.0.1}} so existing tests are unchanged. Build each address with {{NetUtils.getHostPortString(host, port)}}, which brackets IPv6. Add a test that starts a one-DataNode cluster on {{::1}} and writes and reads a file. That test needs a JVM that is not pinned to IPv4 (see HADOOP-20030).
POC: https://github.com/smengcl/hadoop/commit/6d158b98f0fd350af5b53d5aced06bb394892aeb
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org