}
}
+ @SuppressWarnings("unchecked")
MainProgram(GraphClientImpl2 client, ClusterManager clusters) {
this.client = client;
if(updates.isEmpty()) {
- long start = System.nanoTime();
-
- operationQueue.waitFor();
+ long duration = operationQueue.waitFor();
if (!alive)
break main;
- long duration = System.nanoTime()-start;
if(duration > 4000000000L) {
checkIdle();
}
+
}
// long sss = System.nanoTime();
try {
swapChunks();
} catch (AcornAccessVerificationException | IllegalAcornStateException e) {
- e.printStackTrace();
+ LOGGER.error("cluster chunk swapping failed", e);
} finally {
clusters.streamLRU.releaseMutex();
}
}
} catch (Throwable t) {
- t.printStackTrace();
+ LOGGER.error("FATAL: MainProgram died unexpectedly", t);
} finally {
deathBarrier.release();
}
executor.awaitTermination(500, TimeUnit.MILLISECONDS);
clusterUpdateThreads[i] = null;
} catch (InterruptedException e) {
- e.printStackTrace();
+ LOGGER.error("clusterUpdateThread[{}] termination interrupted", i, e);
}
}
}