slfan1989 commented on code in PR #6352:
URL: https://github.com/apache/hadoop/pull/6352#discussion_r1425282821
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/AdminService.java:
##########
@@ -339,8 +360,29 @@ public synchronized void transitionToActive(
}
@Override
- public synchronized void transitionToStandby(
+ public void transitionToStandby(
HAServiceProtocol.StateChangeRequestInfo reqInfo) throws IOException {
+ if(rm.rmContext.isHAEnabled()){
Review Comment:
We need to pay attention to the indentation of the code
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/AdminService.java:
##########
@@ -1105,4 +1147,44 @@ private boolean validateForInvalidNode(String node,
}
return isKnown;
}
+
+ private class AdminServiceToActiveRunner extends
TransitionToActiveStandbyRunner{
+ HAServiceProtocol.StateChangeRequestInfo reqInfo;
+
+ public AdminServiceToActiveRunner(long clusterTimeStamp
,StateChangeRequestInfo reqInfo) {
+ super(clusterTimeStamp);
+ this.reqInfo = reqInfo;
+ }
+
+ @Override
+ public void doTransaction() throws Exception{
+ innerTransitionToActive(reqInfo);
+ }
+
Review Comment:
avoid
--
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]