accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ivakegg <...@git.apache.org>
Subject [GitHub] accumulo pull request #260: ACCUMULO-4643 initial implementation
Date Tue, 30 May 2017 15:41:03 GMT
Github user ivakegg commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/260#discussion_r119136681
  
    --- Diff: server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
---
    @@ -715,47 +722,54 @@ Batch nextBatch(SortedKeyValueIterator<Key,Value> iter, Range
range, int num, Se
     
         long maxResultsSize = tableConfiguration.getAsBytes(Property.TABLE_SCAN_MAXMEM);
     
    -    if (columns.size() == 0) {
    -      iter.seek(range, LocalityGroupUtil.EMPTY_CF_SET, false);
    -    } else {
    -      iter.seek(range, LocalityGroupUtil.families(columns), true);
    -    }
    -
         Key continueKey = null;
         boolean skipContinueKey = false;
     
         boolean endOfTabletReached = false;
    -    while (iter.hasTop()) {
     
    -      value = iter.getTopValue();
    -      key = iter.getTopKey();
    +    try {
    +      if (columns.size() == 0) {
    +        iter.seek(range, LocalityGroupUtil.EMPTY_CF_SET, false);
    --- End diff --
    
    Not too sure I am following you here.  Lets say that seek gets called with a range.  The
underlying iterator would presumably seek its source with the same range.  Now the seek is
iterating through keys past the initial start of the range and realizes at some point that
it has been passing by many of the underlying keys for whatever reason without returning control
to the Tablet.  Now it throws a ScanYieldException specifying where it left off in the seek.
 Later the Tablet will come back and rebuild the iterator and seek it using the new start
as specified.  The seek can now continue doing its job until it actually finds a key that
is to be returned.  Where in this scenario is a key missed?  The whole point of throwing the
exception is that we have not yet found a key to return to the user.  There is no missed data.


---
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.
---

Mime
View raw message