ctubbsii commented on a change in pull request #2303:
URL: https://github.com/apache/accumulo/pull/2303#discussion_r723880591
##########
File path:
core/src/main/java/org/apache/accumulo/core/clientImpl/ClientContext.java
##########
@@ -915,4 +919,12 @@ public void setProperty(ClientProperty property, Integer
value) {
setProperty(property, Integer.toString(value));
}
}
+
+ public ThriftTransportPool getTransportPool() {
Review comment:
We should probably make this synchronized, so a second thread can't come
in, create a new thread pool, overwrite the reference, and leave the previous
thread pool running in the background eating up resources.
##########
File path:
minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterImpl.java
##########
@@ -773,8 +773,9 @@ public int stopProcessWithTimeout(final Process proc, long
timeout, TimeUnit uni
public ManagerMonitorInfo getManagerMonitorInfo()
throws AccumuloException, AccumuloSecurityException {
ManagerClientService.Iface client = null;
+ AccumuloClient c =
Accumulo.newClient().from(getClientProperties()).build();
while (true) {
- try (AccumuloClient c =
Accumulo.newClient().from(getClientProperties()).build()) {
+ try {
Review comment:
Why not just put the try-with-resources outside the loop, so you don't
have to explicitly remember to close() in a finally block?
--
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]