bharatviswa504 commented on a change in pull request #1398: HDDS-2064.
OzoneManagerRatisServer#newOMRatisServer throws NPE when OM HA is configured
incorrectly
URL: https://github.com/apache/hadoop/pull/1398#discussion_r320503175
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
##########
@@ -614,6 +615,12 @@ private void loadOMHAConfigs(Configuration conf) {
" system with " + OZONE_OM_SERVICE_IDS_KEY + " and " +
OZONE_OM_ADDRESS_KEY;
throw new OzoneIllegalArgumentException(msg);
+ } else if (!isOMAddressSet && found == 0) {
Review comment:
We cannot add this condition here, because think of case
OZONE_OM_SERVICE_IDS_KEY = ns1,ns2
Because after one iteration of nameserviceID if we are not able to find, we
should not say illegal configuration. We should try out all name services and
see if it is matching with any nameservice.
And also, we can eliminate iteration of for loop with
OmUtils.emptyAsSingletonNull(omServiceIds)) and similar for nameServiceIds. As
for HA this is a must required configuration which needs to be set.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]