You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "slfan1989 (via GitHub)" <gi...@apache.org> on 2023/06/02 14:58:26 UTC
[GitHub] [hadoop] slfan1989 commented on a diff in pull request #5705: YARN-11502. Refactor AMRMProxy#FederationInterceptor#registerApplicationMaster.
slfan1989 commented on code in PR #5705:
URL: https://github.com/apache/hadoop/pull/5705#discussion_r1214487424
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/amrmproxy/FederationInterceptor.java:
##########
@@ -590,18 +590,9 @@ private Map<String, Token<AMRMTokenIdentifier>> recoverSubClusterAMRMTokenIdenti
// Save the registration request. This will be used for registering with
// secondary sub-clusters using UAMs, as well as re-register later
this.amRegistrationRequest = request;
- if (getNMStateStore() != null) {
- try {
- RegisterApplicationMasterRequestPBImpl pb =
- (RegisterApplicationMasterRequestPBImpl)
- this.amRegistrationRequest;
- getNMStateStore().storeAMRMProxyAppContextEntry(this.attemptId,
- NMSS_REG_REQUEST_KEY, pb.getProto().toByteArray());
- } catch (Exception e) {
- LOG.error("Error storing AMRMProxy application context entry for "
- + this.attemptId, e);
- }
- }
+ RegisterApplicationMasterRequestPBImpl requestPB = (RegisterApplicationMasterRequestPBImpl)
Review Comment:
Thank you very much for your help reviewing the code, I have fixed this issue.
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/amrmproxy/FederationInterceptor.java:
##########
@@ -590,18 +590,9 @@ private Map<String, Token<AMRMTokenIdentifier>> recoverSubClusterAMRMTokenIdenti
// Save the registration request. This will be used for registering with
// secondary sub-clusters using UAMs, as well as re-register later
this.amRegistrationRequest = request;
- if (getNMStateStore() != null) {
- try {
- RegisterApplicationMasterRequestPBImpl pb =
- (RegisterApplicationMasterRequestPBImpl)
- this.amRegistrationRequest;
- getNMStateStore().storeAMRMProxyAppContextEntry(this.attemptId,
- NMSS_REG_REQUEST_KEY, pb.getProto().toByteArray());
- } catch (Exception e) {
- LOG.error("Error storing AMRMProxy application context entry for "
- + this.attemptId, e);
- }
- }
+ RegisterApplicationMasterRequestPBImpl requestPB = (RegisterApplicationMasterRequestPBImpl)
Review Comment:
Thank you very much for your help reviewing the code! I have fixed this issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org