Revert "HBASE-12891 Parallel execution for Hbck checkRegionConsistency"
This reverts commit b14614c948
.
This commit is contained in:
parent
c234b8df96
commit
a7b8112555
|
@ -1696,19 +1696,9 @@ public class HBaseFsck extends Configured implements Closeable {
|
|||
throws IOException, KeeperException, InterruptedException {
|
||||
// Divide the checks in two phases. One for default/primary replicas and another
|
||||
// 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()) {
|
||||
if (e.getValue().getReplicaId() == HRegionInfo.DEFAULT_REPLICA_ID) {
|
||||
workItems.add(new WorkItemRegionConsistency(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());
|
||||
checkRegionConsistency(e.getKey(), e.getValue());
|
||||
}
|
||||
}
|
||||
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.
|
||||
|
|
Loading…
Reference in New Issue