Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DDE21200B30 for ; Mon, 4 Jul 2016 15:46:54 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DC666160A65; Mon, 4 Jul 2016 13:46:54 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3073B160A34 for ; Mon, 4 Jul 2016 15:46:54 +0200 (CEST) Received: (qmail 33683 invoked by uid 500); 4 Jul 2016 13:46:53 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 33674 invoked by uid 99); 4 Jul 2016 13:46:53 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jul 2016 13:46:53 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C3171E03C0; Mon, 4 Jul 2016 13:46:52 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: liyu@apache.org To: commits@hbase.apache.org Message-Id: <8f7941009d4947fdb6fbaf4cc51f60db@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: hbase git commit: HBASE-16132 Scan does not return all the result when regionserver is busy (binlijin) Date: Mon, 4 Jul 2016 13:46:52 +0000 (UTC) archived-at: Mon, 04 Jul 2016 13:46:55 -0000 Repository: hbase Updated Branches: refs/heads/branch-1 480783630 -> 84dd9cbcb HBASE-16132 Scan does not return all the result when regionserver is busy (binlijin) Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/84dd9cbc Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/84dd9cbc Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/84dd9cbc Branch: refs/heads/branch-1 Commit: 84dd9cbcb64933a9511c34a433c28b423e5cc266 Parents: 4807836 Author: Yu Li Authored: Mon Jul 4 21:43:29 2016 +0800 Committer: Yu Li Committed: Mon Jul 4 21:46:19 2016 +0800 ---------------------------------------------------------------------- .../hadoop/hbase/client/ScannerCallableWithReplicas.java | 6 +++++- .../org/apache/hadoop/hbase/master/HMasterCommandLine.java | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/84dd9cbc/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ScannerCallableWithReplicas.java ---------------------------------------------------------------------- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ScannerCallableWithReplicas.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ScannerCallableWithReplicas.java index f8feca1..4d5bb0f 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ScannerCallableWithReplicas.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ScannerCallableWithReplicas.java @@ -202,6 +202,9 @@ class ScannerCallableWithReplicas implements RetryingCallable { 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 { // 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, http://git-wip-us.apache.org/repos/asf/hbase/blob/84dd9cbc/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMasterCommandLine.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMasterCommandLine.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMasterCommandLine.java index 706dc23..d2957c7 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMasterCommandLine.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMasterCommandLine.java @@ -101,8 +101,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); }