slfan1989 commented on code in PR #4976:
URL: https://github.com/apache/hadoop/pull/4976#discussion_r998759489
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/store/impl/SQLFederationStateStore.java:
##########
@@ -258,30 +256,26 @@ public SubClusterRegisterResponse registerSubCluster(
// Check the ROWCOUNT value, if it is equal to 0 it means the call
// did not add a new subcluster into FederationStateStore
- if (cstmt.getInt(9) == 0) {
- String errMsg = "SubCluster " + subClusterId
- + " was not registered into the StateStore";
+ int rowCount = cstmt.getInt("rowCount_OUT");
+ if (rowCount == 0) {
+ String errMsg = "SubCluster " + subClusterId + " was not registered
into the StateStore";
FederationStateStoreUtils.logAndThrowStoreException(LOG, errMsg);
Review Comment:
Thank you for your help in reviewing the code, I will refactor this part of
the code and use the format method.
--
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]