HDFS-9224. TestFileTruncate fails intermittently with BindException (Contributed by Brahma Reddy Battula)

This commit is contained in:
Vinayakumar B 2015-10-13 11:42:12 +05:30
parent 0f5f9846ed
commit 69b025dbba
2 changed files with 7 additions and 1 deletions

View File

@ -2024,6 +2024,9 @@ Release 2.8.0 - UNRELEASED
HDFS-9222. Add hadoop-hdfs-client as a dependency of
hadoop-hdfs-native-client. (Mingliang Liu via wheat9)
HDFS-9224. TestFileTruncate fails intermittently with BindException
(Brahma Reddy Battula via vinayakumarb)
Release 2.7.2 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -59,6 +59,7 @@ import org.apache.hadoop.hdfs.protocol.LocatedBlocks;
import org.apache.hadoop.hdfs.server.blockmanagement.BlockInfoContiguous;
import org.apache.hadoop.hdfs.server.common.HdfsServerConstants;
import org.apache.hadoop.hdfs.server.common.HdfsServerConstants.StartupOption;
import org.apache.hadoop.net.ServerSocketUtil;
import org.apache.hadoop.security.UserGroupInformation;
import org.apache.hadoop.test.GenericTestUtils;
import org.apache.hadoop.util.Time;
@ -1228,7 +1229,9 @@ public class TestFileTruncate {
NameNode.doRollback(conf, false);
cluster = new MiniDFSCluster.Builder(conf).numDataNodes(DATANODE_NUM)
.format(false)
.nameNodePort(HdfsClientConfigKeys.DFS_NAMENODE_RPC_PORT_DEFAULT)
.nameNodePort(
ServerSocketUtil.getPort(
HdfsClientConfigKeys.DFS_NAMENODE_RPC_PORT_DEFAULT, 10))
.startupOption(o==StartupOption.ROLLBACK ? StartupOption.REGULAR : o)
.dnStartupOption(o!=StartupOption.ROLLBACK ? StartupOption.REGULAR : o)
.build();