slfan1989 commented on code in PR #5631:
URL: https://github.com/apache/hadoop/pull/5631#discussion_r1188134599


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/store/impl/ZookeeperFederationStateStore.java:
##########
@@ -325,47 +328,53 @@ public AddApplicationHomeSubClusterResponse 
addApplicationHomeSubCluster(
     FederationApplicationHomeSubClusterStoreInputValidator.validate(request);
     ApplicationHomeSubCluster app = request.getApplicationHomeSubCluster();
     ApplicationId appId = app.getApplicationId();
+    ApplicationSubmissionContext appSubmissionContext = 
app.getApplicationSubmissionContext();
+
+    LOG.info("appId = {}, homeSubClusterId = {}, appSubmissionContext = {}.", 
appId, app,
+        appSubmissionContext);
 
     // Try to write the subcluster
     SubClusterId homeSubCluster = app.getHomeSubCluster();
     try {
-      putApp(appId, homeSubCluster, false);
+      putApp(appId, app, false);
     } catch (Exception e) {
       String errMsg = "Cannot add application home subcluster for " + appId;
       FederationStateStoreUtils.logAndThrowStoreException(LOG, errMsg);
     }
 
     // Check for the actual subcluster
     try {
-      homeSubCluster = getApp(appId);
+      ApplicationHomeSubCluster appHomeSubCluster = getApp(appId);

Review Comment:
   I will refactor this part of the code for better code readability.
   
   1. The `add` or `updat` method name is 
`storeOrUpdateApplicationHomeSubCluster`.
   2. The `get` method is `getApplicationHomeSubCluster`.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to