jojochuang commented on code in PR #3520:
URL: https://github.com/apache/ozone/pull/3520#discussion_r907507957
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -2966,6 +2966,19 @@ public String getRpcPort() {
}
@Override
+
+ public String getOmRatisRoles() {
+ List<ServiceInfo> serviceList = null;
+ int port = omNodeDetails.getRatisPort();
+ try {
+ serviceList = getServiceList();
+ } catch (IOException e) {
+ LOG.error("IO-Exception Occurred");
Review Comment:
better to log the exception
```suggestion
LOG.error("IO-Exception Occurred", e);
```
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -2966,6 +2966,19 @@ public String getRpcPort() {
}
@Override
+
+ public String getOmRatisRoles() {
+ List<ServiceInfo> serviceList = null;
+ int port = omNodeDetails.getRatisPort();
+ try {
+ serviceList = getServiceList();
+ } catch (IOException e) {
+ LOG.error("IO-Exception Occurred");
+ return "Null values found";
Review Comment:
This is fine but won't be easy to understand. Imagine the web UI would
display "OM Roles (HA) Null values found".
How about displaying the exception message instead?
```suggestion
return "Exception: " + e.toString();
```
--
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]