HBASE-16101 addendum. Fixes runtime ClassCastException of Future<Integer> in ProcedureWALPerformanceEvaluation.
Change-Id: Ibe4f3a001b4f50e8598e367cc8648aeae129eee8
This commit is contained in:
parent
77a6c6ce34
commit
4147dcb81a
@ -145,7 +145,7 @@ public class ProcedureWALPerformanceEvaluation extends AbstractHBaseTool {
|
|||||||
try {
|
try {
|
||||||
setupProcedureStore();
|
setupProcedureStore();
|
||||||
ExecutorService executor = Executors.newFixedThreadPool(numThreads);
|
ExecutorService executor = Executors.newFixedThreadPool(numThreads);
|
||||||
Future<Integer>[] futures = (Future<Integer>[]) new Object[numThreads];
|
Future<?>[] futures = new Future<?>[numThreads];
|
||||||
// Start worker threads.
|
// Start worker threads.
|
||||||
long start = System.currentTimeMillis();
|
long start = System.currentTimeMillis();
|
||||||
for (int i = 0; i < numThreads; i++) {
|
for (int i = 0; i < numThreads; i++) {
|
||||||
@ -153,7 +153,7 @@ public class ProcedureWALPerformanceEvaluation extends AbstractHBaseTool {
|
|||||||
}
|
}
|
||||||
boolean failure = false;
|
boolean failure = false;
|
||||||
try {
|
try {
|
||||||
for (Future<Integer> future : futures) {
|
for (Future<?> future : futures) {
|
||||||
long timeout = start + WORKER_THREADS_TIMEOUT_SEC * 1000 - System.currentTimeMillis();
|
long timeout = start + WORKER_THREADS_TIMEOUT_SEC * 1000 - System.currentTimeMillis();
|
||||||
failure |= (future.get(timeout, TimeUnit.MILLISECONDS).equals(EXIT_FAILURE));
|
failure |= (future.get(timeout, TimeUnit.MILLISECONDS).equals(EXIT_FAILURE));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user