hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r829703 - in /hadoop/hbase/trunk: CHANGES.txt src/java/org/apache/hadoop/hbase/client/HTable.java
Date Mon, 26 Oct 2009 05:23:54 GMT
Author: stack
Date: Mon Oct 26 05:23:53 2009
New Revision: 829703

URL: http://svn.apache.org/viewvc?rev=829703&view=rev
Log:
HBASE-1934 NullPointerException in ClientScanner

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HTable.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=829703&r1=829702&r2=829703&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Mon Oct 26 05:23:53 2009
@@ -82,6 +82,7 @@
    HBASE-1925  IllegalAccessError: Has not been initialized (getMaxSequenceId)
    HBASE-1929  If hbase-default.xml is not in CP, zk session timeout is 10 secs!
    HBASE-1927  Scanners not closed properly in certain circumstances
+   HBASE-1934  NullPointerException in ClientScanner (Daniel Ploeg via Stack)
 
   IMPROVEMENTS
    HBASE-1760  Cleanup TODOs in HTable

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HTable.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HTable.java?rev=829703&r1=829702&r2=829703&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HTable.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HTable.java Mon Oct 26 05:23:53
2009
@@ -834,36 +834,6 @@
       return s;
     }
 
-    /**
-     * @param endKey
-     * @return Returns true if the passed region endkey is judged beyond
-     * filter.
-     */
-    private boolean filterSaysStop(final byte [] endKey) {
-      if (scan.getStopRow().length > 0) {
-        // there is a stop row, check to see if we are past it.
-        byte [] stopRow = scan.getStopRow();
-        int cmp = Bytes.compareTo(stopRow, 0, stopRow.length,
-            endKey, 0, endKey.length);
-        if (cmp <= 0) {
-          // stopRow <= endKey (endKey is equals to or larger than stopRow)
-          // This is a stop.
-          return true;
-        }
-      }
-
-      if(!scan.hasFilter()) {
-        return false;
-      }
-
-      if (scan.getFilter() != null) {
-        // Let the filter see current row.
-        scan.getFilter().filterRowKey(endKey, 0, endKey.length);
-        return scan.getFilter().filterAllRemaining();
-      }
-      return false; //unlikely.
-    }
-
     public Result next() throws IOException {
       // If the scanner is closed but there is some rows left in the cache,
       // it will first empty it before returning null
@@ -897,12 +867,14 @@
             }
             // Else, its signal from depths of ScannerCallable that we got an
             // NSRE on a next and that we need to reset the scanner.
-            this.scan.setStartRow(this.lastResult.getRow());
-            // Clear region as flag to nextScanner to use this.scan.startRow.
+            if (this.lastResult != null) {
+              this.scan.setStartRow(this.lastResult.getRow());
+              // Skip first row returned.  We already let it out on previous
+              // invocation.
+              skipFirst = true;
+            }
+            // Clear region
             this.currentRegion = null;
-            // Skip first row returned.  We already let it out on previous
-            // invocation.
-            skipFirst = true;
             continue;
           } catch (IOException e) {
             if (e instanceof UnknownScannerException &&



Mime
View raw message