Return-Path: X-Original-To: apmail-accumulo-commits-archive@www.apache.org Delivered-To: apmail-accumulo-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 414FF182D8 for ; Thu, 27 Aug 2015 16:06:11 +0000 (UTC) Received: (qmail 201 invoked by uid 500); 27 Aug 2015 16:06:11 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 99989 invoked by uid 500); 27 Aug 2015 16:06:11 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 99575 invoked by uid 99); 27 Aug 2015 16:06:11 -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; Thu, 27 Aug 2015 16:06:11 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id CD5FAE7E4B; Thu, 27 Aug 2015 16:06:10 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: elserj@apache.org To: commits@accumulo.apache.org Date: Thu, 27 Aug 2015 16:06:19 -0000 Message-Id: <93147af47b18451daffbd28817c2404b@git.apache.org> In-Reply-To: <920078a9dc0e4ba49fde8971b7aabcbf@git.apache.org> References: <920078a9dc0e4ba49fde8971b7aabcbf@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [10/12] accumulo git commit: Merge branch '1.6' into 1.7 Merge branch '1.6' into 1.7 Conflicts: core/src/main/java/org/apache/accumulo/core/client/BatchScanner.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/162acf2f Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/162acf2f Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/162acf2f Branch: refs/heads/master Commit: 162acf2f2223e25fa84921eb1fb15749599f7242 Parents: 388e48c 2906895 Author: Josh Elser Authored: Thu Aug 27 11:54:25 2015 -0400 Committer: Josh Elser Committed: Thu Aug 27 12:06:14 2015 -0400 ---------------------------------------------------------------------- .../accumulo/core/client/BatchScanner.java | 24 ++++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/162acf2f/core/src/main/java/org/apache/accumulo/core/client/BatchScanner.java ---------------------------------------------------------------------- diff --cc core/src/main/java/org/apache/accumulo/core/client/BatchScanner.java index 494bf56,af0fd85..0048c42 --- a/core/src/main/java/org/apache/accumulo/core/client/BatchScanner.java +++ b/core/src/main/java/org/apache/accumulo/core/client/BatchScanner.java @@@ -19,20 -21,34 +21,28 @@@ import org.apache.accumulo.core.data.Ra import java.util.Collection; import java.util.concurrent.TimeUnit; - import org.apache.accumulo.core.data.Range; - /** - * Implementations of BatchScanner support efficient lookups of many ranges in accumulo. - * In exchange for possibly returning scanned entries out of order, - * BatchScanner implementations may scan an Accumulo table more efficiently by ++ * In exchange for possibly returning scanned entries out of order, BatchScanner implementations may scan an Accumulo table more efficiently by + *
    - *
  • Looking up multiple ranges in parallel. - * Parallelism is constrained by the number of threads available to the BatchScanner, set in its constructor.
  • - *
  • Breaking up large ranges into subranges. - * Often the number and boundaries of subranges are determined by a table's split points.
  • - *
  • Combining multiple ranges into a single RPC call to a tablet server.
  • ++ *
  • Looking up multiple ranges in parallel. Parallelism is constrained by the number of threads available to the BatchScanner, set in its constructor.
  • ++ *
  • Breaking up large ranges into subranges. Often the number and boundaries of subranges are determined by a table's split points.
  • ++ *
  • Combining multiple ranges into a single RPC call to a tablet server.
  • + *
* - * Use this when looking up lots of ranges and you expect each range to contain a small amount of data. Also only use this when you do not care about the - * returned data being in sorted order. + * The above techniques lead to better performance than a {@link Scanner} in use cases such as + *
    - *
  • Retrieving many small ranges
  • - *
  • Scanning a large range that returns many entries
  • - *
  • Running server-side iterators that perform computation, - * even if few entries are returned from the scan itself
  • ++ *
  • Retrieving many small ranges
  • ++ *
  • Scanning a large range that returns many entries
  • ++ *
  • Running server-side iterators that perform computation, even if few entries are returned from the scan itself
  • + *
* - * If you want to lookup a few ranges and expect those ranges to contain a lot of data, then use the Scanner instead. Also, the Scanner will return data in - * sorted order, this will not. - * To re-emphasize, only use a BatchScanner when you do not care whether returned data is in sorted order. - * Use a {@link Scanner} instead when sorted order is important. ++ * To re-emphasize, only use a BatchScanner when you do not care whether returned data is in sorted order. Use a {@link Scanner} instead when sorted order is ++ * important. * + *

- * A BatchScanner instance will use no more threads than provided in the construction of the BatchScanner - * implementation. Multiple invocations of iterator() will all share the same resources of the instance. - * A new BatchScanner instance should be created to use allocate additional threads. + * A BatchScanner instance will use no more threads than provided in the construction of the BatchScanner implementation. Multiple invocations of + * iterator() will all share the same resources of the instance. A new BatchScanner instance should be created to use allocate additional threads. */ - public interface BatchScanner extends ScannerBase { /**