-
Notifications
You must be signed in to change notification settings - Fork 484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HDDS-3273. getConf does not return all OM addresses. #727
Conversation
cc: @xiaoyuyao / @bharatviswa504 for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor comment overall LGTM.
for (String nodeId : getOMNodeIds(conf, serviceId)) { | ||
String rpcAddr = getOmRpcAddress(conf, | ||
addKeySuffixes(OZONE_OM_ADDRESS_KEY, serviceId, nodeId)); | ||
if (rpcAddr != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor comment. when for one of nodeId address is undefined, do we want to print "unknown address" instead of silently ignoring?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Bharat for review.
Actually I modeled the method based on getOmAddress() and return InetSocketAddress so cannot put random string in the map, I added a log message instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 LGTM.
Thank You @swagle for the contribution. |
What changes were proposed in this pull request?
Added a new utility method to return a list of addresses keyed by serviceId.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-3273
How was this patch tested?
Added a unit test and verified via docker:
bash-4.2$ /opt/hadoop/bin/ozone getconf -ozonemanagers
{omservice=[om1/172.22.0.6:9862, om2/172.22.0.4:9862, om3/172.22.0.2:9862]}
bash-4.2$ /opt/hadoop/bin/ozone getconf -ozonemanagers
om