adoroszlai commented on a change in pull request #137: HDDS-2455. Implement
MiniOzoneHAClusterImpl#getOMLeader
URL: https://github.com/apache/hadoop-ozone/pull/137#discussion_r347153072
##########
File path:
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneHAClusterImpl.java
##########
@@ -118,6 +118,19 @@ public OzoneManager getOzoneManager(String omNodeId) {
return this.ozoneManagerMap.get(omNodeId);
}
+ /**
+ * Get OzoneManager leader object.
+ * @return OzoneManager object, could return null if there isn't a leader.
+ */
+ public OzoneManager getOMLeader() {
+ for (OzoneManager ozoneManager : this.ozoneManagers) {
+ if (ozoneManager.isLeader()) {
+ return ozoneManager;
+ }
Review comment:
Would it make sense to find all leaders and assert that there is only one?
----------------------------------------------------------------
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]