HBASE-16132 Scan does not return all the result when regionserver is busy (binlijin)

This commit is contained in:
Yu Li 2016-07-04 21:43:29 +08:00
parent 6944a17ad4
commit 7f44dfd85f
2 changed files with 6 additions and 3 deletions

View File

@ -202,6 +202,9 @@ class ScannerCallableWithReplicas implements RetryingCallable<Result[]> {
updateCurrentlyServingReplica(r.getSecond(), r.getFirst(), done, pool);
}
return r == null ? null : r.getFirst(); // great we got an answer
} else {
throw new IOException("Failed to get result within timeout, timeout="
+ timeout + "ms");
}
} catch (ExecutionException e) {
RpcRetryingCallerWithReadReplicas.throwEnrichedException(e, retries);
@ -216,7 +219,8 @@ class ScannerCallableWithReplicas implements RetryingCallable<Result[]> {
// calls succeeded or failed. In all case, we stop all our tasks.
cs.cancelAll();
}
return null; // unreachable
LOG.error("Imposible? Arrive at an unreachable line..."); // unreachable
throw new IOException("Imposible? Arrive at an unreachable line...");
}
private void updateCurrentlyServingReplica(ScannerCallable scanner, Result[] result,

View File

@ -103,8 +103,7 @@ public class HMasterCommandLine extends ServerCommandLine {
// minRegionServers used to be minServers. Support it too.
if (cmd.hasOption("minServers")) {
String val = cmd.getOptionValue("minServers");
getConf().setInt("hbase.regions.server.count.min",
Integer.parseInt(val));
getConf().setInt("hbase.regions.server.count.min", Integer.parseInt(val));
LOG.debug("minServers set to " + val);
}