YARN-5441. Fixing minor Scheduler test case failures
(cherry picked from commit d2cbfd7de3
)
This commit is contained in:
parent
59eec8248a
commit
4ecfd05095
|
@ -167,6 +167,7 @@ import org.apache.hadoop.yarn.api.records.impl.pb.ContainerReportPBImpl;
|
||||||
import org.apache.hadoop.yarn.api.records.impl.pb.ContainerResourceChangeRequestPBImpl;
|
import org.apache.hadoop.yarn.api.records.impl.pb.ContainerResourceChangeRequestPBImpl;
|
||||||
import org.apache.hadoop.yarn.api.records.impl.pb.ContainerRetryContextPBImpl;
|
import org.apache.hadoop.yarn.api.records.impl.pb.ContainerRetryContextPBImpl;
|
||||||
import org.apache.hadoop.yarn.api.records.impl.pb.ContainerStatusPBImpl;
|
import org.apache.hadoop.yarn.api.records.impl.pb.ContainerStatusPBImpl;
|
||||||
|
import org.apache.hadoop.yarn.api.records.impl.pb.ExecutionTypeRequestPBImpl;
|
||||||
import org.apache.hadoop.yarn.api.records.impl.pb.LocalResourcePBImpl;
|
import org.apache.hadoop.yarn.api.records.impl.pb.LocalResourcePBImpl;
|
||||||
import org.apache.hadoop.yarn.api.records.impl.pb.NMTokenPBImpl;
|
import org.apache.hadoop.yarn.api.records.impl.pb.NMTokenPBImpl;
|
||||||
import org.apache.hadoop.yarn.api.records.impl.pb.NodeIdPBImpl;
|
import org.apache.hadoop.yarn.api.records.impl.pb.NodeIdPBImpl;
|
||||||
|
@ -201,6 +202,7 @@ import org.apache.hadoop.yarn.proto.YarnProtos.ContainerReportProto;
|
||||||
import org.apache.hadoop.yarn.proto.YarnProtos.ContainerResourceChangeRequestProto;
|
import org.apache.hadoop.yarn.proto.YarnProtos.ContainerResourceChangeRequestProto;
|
||||||
import org.apache.hadoop.yarn.proto.YarnProtos.ContainerRetryContextProto;
|
import org.apache.hadoop.yarn.proto.YarnProtos.ContainerRetryContextProto;
|
||||||
import org.apache.hadoop.yarn.proto.YarnProtos.ContainerStatusProto;
|
import org.apache.hadoop.yarn.proto.YarnProtos.ContainerStatusProto;
|
||||||
|
import org.apache.hadoop.yarn.proto.YarnProtos.ExecutionTypeRequestProto;
|
||||||
import org.apache.hadoop.yarn.proto.YarnProtos.LocalResourceProto;
|
import org.apache.hadoop.yarn.proto.YarnProtos.LocalResourceProto;
|
||||||
import org.apache.hadoop.yarn.proto.YarnProtos.NodeIdProto;
|
import org.apache.hadoop.yarn.proto.YarnProtos.NodeIdProto;
|
||||||
import org.apache.hadoop.yarn.proto.YarnProtos.NodeLabelProto;
|
import org.apache.hadoop.yarn.proto.YarnProtos.NodeLabelProto;
|
||||||
|
@ -1351,4 +1353,10 @@ public class TestPBImplRecords {
|
||||||
validatePBImplRecord(CheckForDecommissioningNodesResponsePBImpl.class,
|
validatePBImplRecord(CheckForDecommissioningNodesResponsePBImpl.class,
|
||||||
CheckForDecommissioningNodesResponseProto.class);
|
CheckForDecommissioningNodesResponseProto.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testExecutionTypeRequestPBImpl() throws Exception {
|
||||||
|
validatePBImplRecord(ExecutionTypeRequestPBImpl.class,
|
||||||
|
ExecutionTypeRequestProto.class);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,6 +46,7 @@ import org.apache.hadoop.yarn.api.records.ContainerLaunchContext;
|
||||||
import org.apache.hadoop.yarn.api.records.ContainerState;
|
import org.apache.hadoop.yarn.api.records.ContainerState;
|
||||||
import org.apache.hadoop.yarn.api.records.ContainerStatus;
|
import org.apache.hadoop.yarn.api.records.ContainerStatus;
|
||||||
import org.apache.hadoop.yarn.api.records.ExecutionType;
|
import org.apache.hadoop.yarn.api.records.ExecutionType;
|
||||||
|
import org.apache.hadoop.yarn.api.records.ExecutionTypeRequest;
|
||||||
import org.apache.hadoop.yarn.api.records.FinalApplicationStatus;
|
import org.apache.hadoop.yarn.api.records.FinalApplicationStatus;
|
||||||
import org.apache.hadoop.yarn.api.records.LocalResource;
|
import org.apache.hadoop.yarn.api.records.LocalResource;
|
||||||
import org.apache.hadoop.yarn.api.records.LocalResourceType;
|
import org.apache.hadoop.yarn.api.records.LocalResourceType;
|
||||||
|
@ -334,6 +335,7 @@ public class BuilderUtils {
|
||||||
request.setResourceName(hostName);
|
request.setResourceName(hostName);
|
||||||
request.setCapability(capability);
|
request.setCapability(capability);
|
||||||
request.setNumContainers(numContainers);
|
request.setNumContainers(numContainers);
|
||||||
|
request.setExecutionTypeRequest(ExecutionTypeRequest.newInstance());
|
||||||
return request;
|
return request;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -346,6 +348,7 @@ public class BuilderUtils {
|
||||||
request.setCapability(capability);
|
request.setCapability(capability);
|
||||||
request.setNumContainers(numContainers);
|
request.setNumContainers(numContainers);
|
||||||
request.setNodeLabelExpression(label);
|
request.setNodeLabelExpression(label);
|
||||||
|
request.setExecutionTypeRequest(ExecutionTypeRequest.newInstance());
|
||||||
return request;
|
return request;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -357,6 +360,7 @@ public class BuilderUtils {
|
||||||
request.setCapability(r.getCapability());
|
request.setCapability(r.getCapability());
|
||||||
request.setNumContainers(r.getNumContainers());
|
request.setNumContainers(r.getNumContainers());
|
||||||
request.setNodeLabelExpression(r.getNodeLabelExpression());
|
request.setNodeLabelExpression(r.getNodeLabelExpression());
|
||||||
|
request.setExecutionTypeRequest(r.getExecutionTypeRequest());
|
||||||
return request;
|
return request;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue