You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by bi...@apache.org on 2019/06/11 18:13:14 UTC

[hadoop] branch branch-3.2 updated: YARN-9547. ContainerStatusPBImpl default execution type is not returned. Contributed by Bilwa S T.

This is an automated email from the ASF dual-hosted git repository.

bibinchundatt pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/branch-3.2 by this push:
     new 3303723  YARN-9547. ContainerStatusPBImpl default execution type is not returned. Contributed by Bilwa S T.
3303723 is described below

commit 3303723f55edc6ef55a07707c4453395e82ff060
Author: bibinchundatt <bi...@apache.org>
AuthorDate: Tue Jun 11 23:42:29 2019 +0530

    YARN-9547. ContainerStatusPBImpl default execution type is not returned. Contributed by Bilwa S T.
---
 .../apache/hadoop/yarn/api/records/impl/pb/ContainerStatusPBImpl.java  | 2 +-
 .../hadoop/yarn/server/api/protocolrecords/TestProtocolRecords.java    | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ContainerStatusPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ContainerStatusPBImpl.java
index a6668da..e81a3ee 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ContainerStatusPBImpl.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ContainerStatusPBImpl.java
@@ -182,7 +182,7 @@ public class ContainerStatusPBImpl extends ContainerStatus {
   public synchronized ExecutionType getExecutionType() {
     ContainerStatusProtoOrBuilder p = viaProto ? proto : builder;
     if (!p.hasExecutionType()) {
-      return null;
+      return ExecutionType.GUARANTEED;
     }
     return convertFromProtoFormat(p.getExecutionType());
   }
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/yarn/server/api/protocolrecords/TestProtocolRecords.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/yarn/server/api/protocolrecords/TestProtocolRecords.java
index e6e79d3..3687e18 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/yarn/server/api/protocolrecords/TestProtocolRecords.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/yarn/server/api/protocolrecords/TestProtocolRecords.java
@@ -38,6 +38,7 @@ import org.apache.hadoop.yarn.api.records.ContainerExitStatus;
 import org.apache.hadoop.yarn.api.records.ContainerId;
 import org.apache.hadoop.yarn.api.records.ContainerState;
 import org.apache.hadoop.yarn.api.records.ContainerStatus;
+import org.apache.hadoop.yarn.api.records.ExecutionType;
 import org.apache.hadoop.yarn.api.records.NodeId;
 import org.apache.hadoop.yarn.api.records.Priority;
 import org.apache.hadoop.yarn.api.records.Resource;
@@ -207,7 +208,7 @@ public class TestProtocolRecords {
         new ContainerStatusPBImpl(((ContainerStatusPBImpl) status).getProto());
     Assert.assertEquals(ips, pb.getIPs());
     Assert.assertEquals("locahost123", pb.getHost());
-
+    Assert.assertEquals(ExecutionType.GUARANTEED, pb.getExecutionType());
     status.setIPs(null);
     Assert.assertNull(status.getIPs());
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org