YARN-2617. Fixed ApplicationSubmissionContext to still set resource for backward compatibility. Contributed by Wangda Tan.
(cherry picked from commit e532ed8faa
)
This commit is contained in:
parent
14080ea3d2
commit
647874206c
|
@ -548,6 +548,9 @@ Release 2.6.0 - UNRELEASED
|
||||||
YARN-2598 GHS should show N/A instead of null for the inaccessible information
|
YARN-2598 GHS should show N/A instead of null for the inaccessible information
|
||||||
(Zhijie Shen via mayank)
|
(Zhijie Shen via mayank)
|
||||||
|
|
||||||
|
YARN-2617. Fixed ApplicationSubmissionContext to still set resource for
|
||||||
|
backward compatibility. (Wangda Tan via zjshen)
|
||||||
|
|
||||||
Release 2.5.1 - 2014-09-05
|
Release 2.5.1 - 2014-09-05
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -89,6 +89,7 @@ public abstract class ApplicationSubmissionContext {
|
||||||
context.setApplicationType(applicationType);
|
context.setApplicationType(applicationType);
|
||||||
context.setKeepContainersAcrossApplicationAttempts(keepContainers);
|
context.setKeepContainersAcrossApplicationAttempts(keepContainers);
|
||||||
context.setNodeLabelExpression(appLabelExpression);
|
context.setNodeLabelExpression(appLabelExpression);
|
||||||
|
context.setResource(resource);
|
||||||
|
|
||||||
ResourceRequest amReq = Records.newRecord(ResourceRequest.class);
|
ResourceRequest amReq = Records.newRecord(ResourceRequest.class);
|
||||||
amReq.setResourceName(ResourceRequest.ANY);
|
amReq.setResourceName(ResourceRequest.ANY);
|
||||||
|
|
|
@ -45,6 +45,7 @@ import org.apache.hadoop.yarn.proto.YarnServerResourceManagerServiceProtos.*;
|
||||||
import org.apache.hadoop.yarn.proto.YarnProtos.*;
|
import org.apache.hadoop.yarn.proto.YarnProtos.*;
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.*;
|
import org.apache.hadoop.yarn.proto.YarnServiceProtos.*;
|
||||||
import org.apache.hadoop.yarn.server.api.protocolrecords.impl.pb.*;
|
import org.apache.hadoop.yarn.server.api.protocolrecords.impl.pb.*;
|
||||||
|
import org.apache.hadoop.yarn.util.resource.Resources;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Ignore;
|
import org.junit.Ignore;
|
||||||
|
@ -654,6 +655,12 @@ public class TestPBImplRecords {
|
||||||
public void testApplicationSubmissionContextPBImpl() throws Exception {
|
public void testApplicationSubmissionContextPBImpl() throws Exception {
|
||||||
validatePBImplRecord(ApplicationSubmissionContextPBImpl.class,
|
validatePBImplRecord(ApplicationSubmissionContextPBImpl.class,
|
||||||
ApplicationSubmissionContextProto.class);
|
ApplicationSubmissionContextProto.class);
|
||||||
|
|
||||||
|
ApplicationSubmissionContext ctx =
|
||||||
|
ApplicationSubmissionContext.newInstance(null, null, null, null, null,
|
||||||
|
false, false, 0, Resources.none(), null, false, null, null);
|
||||||
|
|
||||||
|
Assert.assertNotNull(ctx.getResource());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue