HBASE-16101 addendum. Fixes runtime ClassCastException of Future<Integer> in ProcedureWALPerformanceEvaluation.

Change-Id: Ibe4f3a001b4f50e8598e367cc8648aeae129eee8
This commit is contained in:
Apekshit Sharma 2016-09-01 17:23:54 -07:00
parent 77a6c6ce34
commit 4147dcb81a

View File

@ -145,7 +145,7 @@ public class ProcedureWALPerformanceEvaluation extends AbstractHBaseTool {
try {
setupProcedureStore();
ExecutorService executor = Executors.newFixedThreadPool(numThreads);
Future<Integer>[] futures = (Future<Integer>[]) new Object[numThreads];
Future<?>[] futures = new Future<?>[numThreads];
// Start worker threads.
long start = System.currentTimeMillis();
for (int i = 0; i < numThreads; i++) {
@ -153,7 +153,7 @@ public class ProcedureWALPerformanceEvaluation extends AbstractHBaseTool {
}
boolean failure = false;
try {
for (Future<Integer> future : futures) {
for (Future<?> future : futures) {
long timeout = start + WORKER_THREADS_TIMEOUT_SEC * 1000 - System.currentTimeMillis();
failure |= (future.get(timeout, TimeUnit.MILLISECONDS).equals(EXIT_FAILURE));
}