dlmarion commented on code in PR #4210:
URL: https://github.com/apache/accumulo/pull/4210#discussion_r1474447942
##########
minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterControl.java:
##########
@@ -153,17 +154,32 @@ public synchronized void startCoordinator(Class<? extends
CompactionCoordinator>
coordinatorProcess = cluster
._exec(coordinator, ServerType.COMPACTION_COORDINATOR, new
HashMap<>()).getProcess();
// Wait for coordinator to start
- TExternalCompactionList metrics = null;
- while (metrics == null) {
- try {
- metrics = getRunningCompactions(cluster.getServerContext());
- } catch (TException e) {
- log.debug(
- "Error getting running compactions from coordinator, message: "
+ e.getMessage());
- UtilWaitThread.sleep(250);
- }
+ long startNano = System.nanoTime();
+ if (!waitForMetrics()) {
+ log.warn("metrics failed to register after {} sec",
+ NANOSECONDS.toSeconds(System.nanoTime() - startNano));
+ }
+ }
+ }
+
+ private boolean waitForMetrics() {
Review Comment:
Unless I'm missing something, it looks like this always returns `false`.
##########
minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterControl.java:
##########
@@ -153,17 +154,32 @@ public synchronized void startCoordinator(Class<? extends
CompactionCoordinator>
coordinatorProcess = cluster
._exec(coordinator, ServerType.COMPACTION_COORDINATOR, new
HashMap<>()).getProcess();
// Wait for coordinator to start
Review Comment:
So this no longer waits for the coordinator to start, it only waits a
certain amount of time. Is that right?
--
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]