Revert "HBASE-12891 Parallel execution for Hbck checkRegionConsistency"

This reverts commit b14614c948.
This commit is contained in:
Andrew Purtell 2015-02-06 16:52:21 -08:00
parent c234b8df96
commit a7b8112555
1 changed files with 3 additions and 29 deletions

View File

@ -1696,19 +1696,9 @@ public class HBaseFsck extends Configured implements Closeable {
throws IOException, KeeperException, InterruptedException { throws IOException, KeeperException, InterruptedException {
// Divide the checks in two phases. One for default/primary replicas and another // Divide the checks in two phases. One for default/primary replicas and another
// for the non-primary ones. Keeps code cleaner this way. // for the non-primary ones. Keeps code cleaner this way.
List<WorkItemRegionConsistency> workItems =
new ArrayList<WorkItemRegionConsistency>(regionInfoMap.size());
for (java.util.Map.Entry<String, HbckInfo> e: regionInfoMap.entrySet()) { for (java.util.Map.Entry<String, HbckInfo> e: regionInfoMap.entrySet()) {
if (e.getValue().getReplicaId() == HRegionInfo.DEFAULT_REPLICA_ID) { if (e.getValue().getReplicaId() == HRegionInfo.DEFAULT_REPLICA_ID) {
workItems.add(new WorkItemRegionConsistency(e.getKey(), e.getValue())); checkRegionConsistency(e.getKey(), e.getValue());
}
}
List<Future<Void>> workFutures = executor.invokeAll(workItems);
for(Future<Void> f: workFutures) {
try {
f.get();
} catch(ExecutionException e1) {
LOG.warn("Could not check region consistency " , e1.getCause());
} }
} }
boolean prevHdfsCheck = shouldCheckHdfs(); boolean prevHdfsCheck = shouldCheckHdfs();
@ -2359,22 +2349,6 @@ public class HBaseFsck extends Configured implements Closeable {
} }
}; };
class WorkItemRegionConsistency implements Callable<Void> {
private final String key;
private final HbckInfo hbi;
WorkItemRegionConsistency(String key, HbckInfo hbi) {
this.key = key;
this.hbi = hbi;
}
@Override
public synchronized Void call() throws Exception {
checkRegionConsistency(key, hbi);
return null;
}
}
/** /**
* Maintain information about a particular table. * Maintain information about a particular table.