You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@accumulo.apache.org by dhutchis <gi...@git.apache.org> on 2015/08/24 04:22:33 UTC

[GitHub] accumulo pull request: ACCUMULO-3959 More accurate BatchScanner ja...

GitHub user dhutchis opened a pull request:

    https://github.com/apache/accumulo/pull/45

    ACCUMULO-3959 More accurate BatchScanner javadoc

    This will help clear possible confusion on when to use BatchScanners vs Scanners.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dhutchis/accumulo ACCUMULO-3959

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/accumulo/pull/45.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #45
    
----
commit 01dd7e32e864c7359f8b289f1434c9d9a5c154d4
Author: Dylan Hutchison <dh...@mit.edu>
Date:   2015-08-24T02:19:47Z

    ACCUMULO-3959 More accurate BatchScanner javadoc

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] accumulo pull request: ACCUMULO-3959 More accurate BatchScanner ja...

Posted by keith-turner <gi...@git.apache.org>.
Github user keith-turner commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/45#discussion_r37789259
  
    --- Diff: core/src/main/java/org/apache/accumulo/core/client/BatchScanner.java ---
    @@ -16,19 +16,20 @@
      */
     package org.apache.accumulo.core.client;
     
    +import org.apache.accumulo.core.data.Range;
    +
     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.
    + * BatchScanners are also appropriate for large, single ranges,
    + * as a BatchScanner will break those ranges up into separate RPCs
    + * provided the range spans more than one tablet
    + * and there are sufficiently many scan threads available.
    --- End diff --
    
    Maybe instead of suggesting how to use the batch scanner, we could focus more on describing possible behavior?
    
      * May parallelize reading of data.  Multiple input ranges may be read in parallel or sub ranges of individual input ranges may be read in parallel.
      * May return data in unsorted order.
      * May batch multiple ranges into a single RPC to a tserver.   
    
    Could still mention possible use cases like :
    
      * Looking up lots of small ranges
      * Parallelizing (spell check in web browser does not like that word) a computation over an entire table using a large range w/ iterators.   This case may not return lots of data, although lots of data may be read by the iterators.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] accumulo pull request: ACCUMULO-3959 More accurate BatchScanner ja...

Posted by keith-turner <gi...@git.apache.org>.
Github user keith-turner commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/45#discussion_r37784571
  
    --- Diff: core/src/main/java/org/apache/accumulo/core/client/BatchScanner.java ---
    @@ -16,19 +16,20 @@
      */
     package org.apache.accumulo.core.client;
     
    +import org.apache.accumulo.core.data.Range;
    +
     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.
    + * BatchScanners are also appropriate for large, single ranges,
    + * as a BatchScanner will break those ranges up into separate RPCs
    + * provided the range spans more than one tablet
    + * and there are sufficiently many scan threads available.
      *
    - * 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.
    - *
    - * 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.
    + * Only use this when you do not care about returned data being in sorted order.
    --- End diff --
    
    This was already broken before your patch, but I think javadoc need `<p>` markup for paragraphs.   Not sure it will render as intended w/o it.
    
    Did you format these changes?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] accumulo pull request: ACCUMULO-3959 More accurate BatchScanner ja...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/accumulo/pull/45


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] accumulo pull request: ACCUMULO-3959 More accurate BatchScanner ja...

Posted by joshelser <gi...@git.apache.org>.
Github user joshelser commented on the pull request:

    https://github.com/apache/accumulo/pull/45#issuecomment-134319018
  
    +1 from me. Will merge today.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] accumulo pull request: ACCUMULO-3959 More accurate BatchScanner ja...

Posted by dhutchis <gi...@git.apache.org>.
Github user dhutchis commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/45#discussion_r37785744
  
    --- Diff: core/src/main/java/org/apache/accumulo/core/client/BatchScanner.java ---
    @@ -16,19 +16,20 @@
      */
     package org.apache.accumulo.core.client;
     
    +import org.apache.accumulo.core.data.Range;
    +
     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.
    + * BatchScanners are also appropriate for large, single ranges,
    + * as a BatchScanner will break those ranges up into separate RPCs
    + * provided the range spans more than one tablet
    + * and there are sufficiently many scan threads available.
      *
    - * 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.
    - *
    - * 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.
    + * Only use this when you do not care about returned data being in sorted order.
    --- End diff --
    
    Correct, I see that the <p> tag is necessary from the online javadoc at
    http://accumulo.apache.org/1.7/apidocs/org/apache/accumulo/core/client/BatchScanner.html
    
    Will fix tonight when I return to my laptop.  I don't think my editor
    (IntelliJ with the Eclipse code formatter plugin) adds the HTML tags
    automatically.
    
    On Mon, Aug 24, 2015 at 2:25 PM, Keith Turner <no...@github.com>
    wrote:
    
    > In core/src/main/java/org/apache/accumulo/core/client/BatchScanner.java
    > <https://github.com/apache/accumulo/pull/45#discussion_r37784571>:
    >
    > >   *
    > > - * 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.
    > > - *
    > > - * 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.
    > > + * Only use this when you do not care about returned data being in sorted order.
    >
    > This was already broken before your patch, but I think javadoc need <p>
    > markup for paragraphs. Not sure it will render as intended w/o it.
    >
    > Did you format these changes?
    >
    > —
    > Reply to this email directly or view it on GitHub
    > <https://github.com/apache/accumulo/pull/45/files#r37784571>.
    >



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] accumulo pull request: ACCUMULO-3959 More accurate BatchScanner ja...

Posted by keith-turner <gi...@git.apache.org>.
Github user keith-turner commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/45#discussion_r37789345
  
    --- Diff: core/src/main/java/org/apache/accumulo/core/client/BatchScanner.java ---
    @@ -16,19 +16,20 @@
      */
     package org.apache.accumulo.core.client;
     
    +import org.apache.accumulo.core.data.Range;
    +
     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.
    + * BatchScanners are also appropriate for large, single ranges,
    + * as a BatchScanner will break those ranges up into separate RPCs
    + * provided the range spans more than one tablet
    + * and there are sufficiently many scan threads available.
      *
    - * 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.
    - *
    - * 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.
    --- End diff --
    
    Not 100% sure, but I think I wrote this javadoc.   My thinking was that the Scanner does pipelining and may have better performance for reading data to a single client.   However, this may be completely wrong.  I think removing this suggestions is a good idea.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---