diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 2aae75e636e..75dbaf75ec1 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -360,6 +360,9 @@ Release 2.7.0 - UNRELEASED YARN-2933. Capacity Scheduler preemption policy should only consider capacity without labels temporarily. (Mayank Bansal via wangda) + YARN-2731. Fixed RegisterApplicationMasterResponsePBImpl to properly invoke + maybeInitBuilder. (Carlo Curino via wangda) + Release 2.6.0 - 2014-11-18 INCOMPATIBLE CHANGES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/RegisterApplicationMasterResponsePBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/RegisterApplicationMasterResponsePBImpl.java index 32dc85d6f38..a95aadfbef8 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/RegisterApplicationMasterResponsePBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/RegisterApplicationMasterResponsePBImpl.java @@ -229,11 +229,11 @@ public class RegisterApplicationMasterResponsePBImpl extends @Override public void setClientToAMTokenMasterKey(ByteBuffer key) { + maybeInitBuilder(); if (key == null) { builder.clearClientToAmTokenMasterKey(); return; } - maybeInitBuilder(); builder.setClientToAmTokenMasterKey(ByteString.copyFrom(key)); } @@ -316,6 +316,7 @@ public class RegisterApplicationMasterResponsePBImpl extends @Override public void setNMTokensFromPreviousAttempts(final List nmTokens) { + maybeInitBuilder(); if (nmTokens == null || nmTokens.isEmpty()) { if (this.nmTokens != null) { this.nmTokens.clear();