ctubbsii commented on a change in pull request #1803:
URL: https://github.com/apache/accumulo/pull/1803#discussion_r567992140
##########
File path:
server/manager/src/main/java/org/apache/accumulo/master/recovery/RecoveryManager.java
##########
@@ -148,6 +149,18 @@ private boolean exists(final Path path) throws IOException
{
}
}
+ public String getHostPort() {
+
+ String hostPort = "";
+ Set<TServerInstance> tserverInstances = master.onlineTabletServers();
+
+ if (tserverInstances.isEmpty() && tserverInstances.size() < 0) {
+ return hostPort = null;
+
+ } else
+ return hostPort = tserverInstances.stream().findFirst().get().toString();
+ }
+
Review comment:
Size can't be less than 0.
```suggestion
public String getHostPort() {
Set<TServerInstance> tserverInstances = master.onlineTabletServers();
return tserverInstances.isEmpty() ? null :
tserverInstances.stream().findFirst().get().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.
For queries about this service, please contact Infrastructure at:
[email protected]