YARN-5118. Tests fails with localizer port bind exception. Contributed by Brahma Reddy Battula.
This commit is contained in:
parent
3a154f75ed
commit
bddea5fe5f
@ -25,6 +25,7 @@
|
||||
|
||||
import org.apache.hadoop.fs.FileContext;
|
||||
import org.apache.hadoop.fs.Path;
|
||||
import org.apache.hadoop.net.ServerSocketUtil;
|
||||
import org.apache.hadoop.yarn.api.protocolrecords.StartContainerRequest;
|
||||
import org.apache.hadoop.yarn.api.protocolrecords.StartContainersRequest;
|
||||
import org.apache.hadoop.yarn.api.protocolrecords.StopContainersRequest;
|
||||
@ -91,6 +92,8 @@ public int getHttpPort() {
|
||||
conf.set(YarnConfiguration.NM_LOG_DIRS, localLogDir.getAbsolutePath());
|
||||
conf.set(YarnConfiguration.NM_REMOTE_APP_LOG_DIR,
|
||||
remoteLogDir.getAbsolutePath());
|
||||
conf.set(YarnConfiguration.NM_LOCALIZER_ADDRESS, "0.0.0.0:"
|
||||
+ ServerSocketUtil.getPort(8040, 10));
|
||||
|
||||
ContainerExecutor exec = new DefaultContainerExecutor();
|
||||
exec.setConf(conf);
|
||||
|
@ -28,6 +28,7 @@
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
import org.apache.hadoop.net.ServerSocketUtil;
|
||||
import org.apache.hadoop.service.ServiceOperations;
|
||||
import org.apache.hadoop.yarn.api.records.NodeLabel;
|
||||
import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
||||
@ -233,6 +234,9 @@ protected void stopRMProxy() {
|
||||
|
||||
YarnConfiguration conf = createNMConfigForDistributeNodeLabels();
|
||||
conf.setLong(YarnConfiguration.NM_NODE_LABELS_RESYNC_INTERVAL, 2000);
|
||||
conf.set(YarnConfiguration.NM_LOCALIZER_ADDRESS, "0.0.0.0:"
|
||||
+ ServerSocketUtil.getPort(8040, 10));
|
||||
|
||||
nm.init(conf);
|
||||
resourceTracker.resetNMHeartbeatReceiveFlag();
|
||||
nm.start();
|
||||
@ -329,6 +333,9 @@ protected void stopRMProxy() {
|
||||
};
|
||||
dummyLabelsProviderRef.setNodeLabels(toNodeLabelSet("P"));
|
||||
YarnConfiguration conf = createNMConfigForDistributeNodeLabels();
|
||||
conf.set(YarnConfiguration.NM_LOCALIZER_ADDRESS, "0.0.0.0:"
|
||||
+ ServerSocketUtil.getPort(8040, 10));
|
||||
|
||||
nm.init(conf);
|
||||
resourceTracker.resetNMHeartbeatReceiveFlag();
|
||||
nm.start();
|
||||
|
@ -172,6 +172,9 @@ public void setup() throws IOException {
|
||||
conf.set(YarnConfiguration.NM_LOCAL_DIRS, localDir.getAbsolutePath());
|
||||
conf.set(YarnConfiguration.NM_LOG_DIRS, localLogDir.getAbsolutePath());
|
||||
conf.set(YarnConfiguration.NM_REMOTE_APP_LOG_DIR, remoteLogDir.getAbsolutePath());
|
||||
conf.set(YarnConfiguration.NM_LOCALIZER_ADDRESS, "0.0.0.0:"
|
||||
+ ServerSocketUtil.getPort(8040, 10));
|
||||
|
||||
|
||||
conf.setLong(YarnConfiguration.NM_LOG_RETAIN_SECONDS, 1);
|
||||
// Default delSrvc
|
||||
|
Loading…
Reference in New Issue
Block a user