HDFS-12017. Ozone: Container: Move IPC port to 98xx range. Contributed by Nandakumar.
This commit is contained in:
parent
b2447f8dd9
commit
2804435386
@ -33,7 +33,7 @@
|
||||
public final class OzoneConfigKeys {
|
||||
public static final String DFS_CONTAINER_IPC_PORT =
|
||||
"dfs.container.ipc";
|
||||
public static final int DFS_CONTAINER_IPC_PORT_DEFAULT = 50011;
|
||||
public static final int DFS_CONTAINER_IPC_PORT_DEFAULT = 9859;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -53,7 +53,7 @@ public final class OzoneConfigKeys {
|
||||
*/
|
||||
public static final String DFS_CONTAINER_RATIS_IPC_PORT =
|
||||
"dfs.container.ratis.ipc";
|
||||
public static final int DFS_CONTAINER_RATIS_IPC_PORT_DEFAULT = 50012;
|
||||
public static final int DFS_CONTAINER_RATIS_IPC_PORT_DEFAULT = 9858;
|
||||
|
||||
/**
|
||||
* When set to true, allocate a random free port for ozone container, so that
|
||||
|
@ -642,8 +642,8 @@ public static int getLogWarnInterval(Configuration conf) {
|
||||
* @return port number.
|
||||
*/
|
||||
public static int getContainerPort(Configuration conf) {
|
||||
return conf.getInt(ScmConfigKeys.DFS_CONTAINER_IPC_PORT, ScmConfigKeys
|
||||
.DFS_CONTAINER_IPC_PORT_DEFAULT);
|
||||
return conf.getInt(OzoneConfigKeys.DFS_CONTAINER_IPC_PORT,
|
||||
OzoneConfigKeys.DFS_CONTAINER_IPC_PORT_DEFAULT);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -264,7 +264,7 @@ public void createBucket(
|
||||
Preconditions.checkNotNull(bucketArgs);
|
||||
|
||||
Boolean isVersionEnabled = bucketArgs.isVersionEnabled() == null ?
|
||||
false : bucketArgs.isVersionEnabled();
|
||||
Boolean.FALSE : bucketArgs.isVersionEnabled();
|
||||
StorageType storageType = bucketArgs.getStorageType() == null ?
|
||||
StorageType.DEFAULT : bucketArgs.getStorageType();
|
||||
List<OzoneAcl> listOfAcls = new ArrayList<>();
|
||||
|
@ -26,9 +26,6 @@
|
||||
@InterfaceAudience.Public
|
||||
@InterfaceStability.Unstable
|
||||
public final class ScmConfigKeys {
|
||||
public static final String DFS_CONTAINER_IPC_PORT =
|
||||
"dfs.container.ipc";
|
||||
public static final int DFS_CONTAINER_IPC_PORT_DEFAULT = 50011;
|
||||
|
||||
public static final String SCM_CONTAINER_CLIENT_STALE_THRESHOLD_KEY =
|
||||
"scm.container.client.idle.threshold";
|
||||
|
@ -30,6 +30,7 @@
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
import org.apache.hadoop.hdfs.ozone.protocol.proto.ContainerProtos;
|
||||
import org.apache.hadoop.hdfs.protocol.DatanodeID;
|
||||
import org.apache.hadoop.ozone.OzoneConfigKeys;
|
||||
import org.apache.hadoop.scm.container.common.helpers.Pipeline;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@ -85,8 +86,8 @@ public void connect() throws Exception {
|
||||
// port.
|
||||
int port = leader.getContainerPort();
|
||||
if (port == 0) {
|
||||
port = config.getInt(ScmConfigKeys.DFS_CONTAINER_IPC_PORT,
|
||||
ScmConfigKeys.DFS_CONTAINER_IPC_PORT_DEFAULT);
|
||||
port = config.getInt(OzoneConfigKeys.DFS_CONTAINER_IPC_PORT,
|
||||
OzoneConfigKeys.DFS_CONTAINER_IPC_PORT_DEFAULT);
|
||||
}
|
||||
LOG.debug("Connecting to server Port : " + port);
|
||||
channelFuture = b.connect(leader.getHostName(), port).sync();
|
||||
|
@ -460,7 +460,7 @@
|
||||
|
||||
<property>
|
||||
<name>dfs.container.ipc</name>
|
||||
<value>50011</value>
|
||||
<value>9859</value>
|
||||
<description>
|
||||
The ipc port number of container.
|
||||
</description>
|
||||
@ -939,7 +939,7 @@
|
||||
|
||||
<property>
|
||||
<name>dfs.container.ratis.ipc</name>
|
||||
<value>50012</value>
|
||||
<value>9858</value>
|
||||
<description>
|
||||
The ipc port number of container.
|
||||
</description>
|
||||
|
@ -200,7 +200,7 @@ public void testDatanodeStateContext() throws IOException,
|
||||
conf.get(ScmConfigKeys.OZONE_SCM_DATANODE_ID));
|
||||
idPath.delete();
|
||||
DatanodeID dnID = DFSTestUtil.getLocalDatanodeID();
|
||||
dnID.setContainerPort(ScmConfigKeys.DFS_CONTAINER_IPC_PORT_DEFAULT);
|
||||
dnID.setContainerPort(OzoneConfigKeys.DFS_CONTAINER_IPC_PORT_DEFAULT);
|
||||
ContainerUtils.writeDatanodeIDTo(dnID, idPath);
|
||||
|
||||
try (DatanodeStateMachine stateMachine = new DatanodeStateMachine(
|
||||
|
Loading…
x
Reference in New Issue
Block a user