HDDS-2245. Use dynamic ports for SCM in TestSecureOzoneCluster
Contributed by kevin su.
This commit is contained in:
parent
012d897e5b
commit
4fdf016358
@ -53,6 +53,7 @@ import org.apache.hadoop.ipc.Server;
|
|||||||
import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem;
|
import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem;
|
||||||
import org.apache.hadoop.minikdc.MiniKdc;
|
import org.apache.hadoop.minikdc.MiniKdc;
|
||||||
import org.apache.hadoop.net.NetUtils;
|
import org.apache.hadoop.net.NetUtils;
|
||||||
|
import org.apache.hadoop.net.ServerSocketUtil;
|
||||||
import org.apache.hadoop.ozone.client.CertificateClientTestImpl;
|
import org.apache.hadoop.ozone.client.CertificateClientTestImpl;
|
||||||
import org.apache.hadoop.ozone.common.Storage;
|
import org.apache.hadoop.ozone.common.Storage;
|
||||||
import org.apache.hadoop.ozone.om.OMConfigKeys;
|
import org.apache.hadoop.ozone.om.OMConfigKeys;
|
||||||
@ -153,6 +154,18 @@ public final class TestSecureOzoneCluster {
|
|||||||
try {
|
try {
|
||||||
conf = new OzoneConfiguration();
|
conf = new OzoneConfiguration();
|
||||||
conf.set(ScmConfigKeys.OZONE_SCM_CLIENT_ADDRESS_KEY, "localhost");
|
conf.set(ScmConfigKeys.OZONE_SCM_CLIENT_ADDRESS_KEY, "localhost");
|
||||||
|
|
||||||
|
conf.setInt(ScmConfigKeys.OZONE_SCM_CLIENT_PORT_KEY, ServerSocketUtil
|
||||||
|
.getPort(ScmConfigKeys.OZONE_SCM_CLIENT_PORT_DEFAULT, 100));
|
||||||
|
conf.setInt(ScmConfigKeys.OZONE_SCM_DATANODE_PORT_KEY, ServerSocketUtil
|
||||||
|
.getPort(ScmConfigKeys.OZONE_SCM_DATANODE_PORT_DEFAULT, 100));
|
||||||
|
conf.setInt(ScmConfigKeys.OZONE_SCM_BLOCK_CLIENT_PORT_KEY,
|
||||||
|
ServerSocketUtil.getPort(ScmConfigKeys
|
||||||
|
.OZONE_SCM_BLOCK_CLIENT_PORT_DEFAULT, 100));
|
||||||
|
conf.setInt(ScmConfigKeys.OZONE_SCM_SECURITY_SERVICE_PORT_KEY,
|
||||||
|
ServerSocketUtil.getPort(ScmConfigKeys
|
||||||
|
.OZONE_SCM_SECURITY_SERVICE_PORT_DEFAULT, 100));
|
||||||
|
|
||||||
DefaultMetricsSystem.setMiniClusterMode(true);
|
DefaultMetricsSystem.setMiniClusterMode(true);
|
||||||
final String path = folder.newFolder().toString();
|
final String path = folder.newFolder().toString();
|
||||||
metaDirPath = Paths.get(path, "om-meta");
|
metaDirPath = Paths.get(path, "om-meta");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user