henrybear327 commented on code in PR #10456:
URL: https://github.com/apache/ozone/pull/10456#discussion_r3573952366
##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/local/LocalOzoneCluster.java:
##########
@@ -344,11 +621,14 @@ private static void deleteDirectory(Path directory) {
for (Path path : deleteOrder) {
Files.deleteIfExists(path);
}
- } catch (IOException ex) {
- LOG.error("Failed to delete local Ozone directory {}", directory, ex);
}
}
+ @FunctionalInterface
Review Comment:
Done, thanks.
##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/local/LocalOzoneCluster.java:
##########
@@ -151,12 +221,18 @@ public String getDisplayHost() {
@Override
public int getScmPort() {
+ if (scm != null) {
+ return scm.getClientRpcAddress().getPort();
+ }
return preparedConfiguration == null ? config.getScmPort()
: preparedConfiguration.getScmPort();
}
@Override
public int getOmPort() {
+ if (om != null) {
+ return om.getOmRpcServerAddr().getPort();
+ }
Review Comment:
Refactored, thanks.
--
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]