HDFS-16140. TestBootstrapAliasmap fails by BindException. (#3229)

Reviewed-by: Hui Fei <ferhui@apache.org>
This commit is contained in:
Akira Ajisaka 2021-07-26 16:46:07 +09:00 committed by GitHub
parent 5d765497c5
commit d710ec8d85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -51,6 +51,9 @@ public class TestBootstrapAliasmap {
public void setup() throws Exception {
Configuration conf = new Configuration();
MiniDFSCluster.setupNamenodeProvidedConfiguration(conf);
// use free port instead of default 50200 port
conf.set(DFSConfigKeys.DFS_PROVIDED_ALIASMAP_INMEMORY_RPC_ADDRESS,
"127.0.0.1:" + NetUtils.getFreeSocketPort());
cluster = new MiniDFSCluster.Builder(conf)
.numDataNodes(1)
.build();