hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mberto...@apache.org
Subject [20/50] [abbrv] hbase git commit: HBASE-13421 Reduce the number of object creations introduced by HBASE-11544 in scan RPC hot code paths
Date Thu, 09 Apr 2015 20:59:25 GMT
http://git-wip-us.apache.org/repos/asf/hbase/blob/62d47e17/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
index 6a5e844..6abe076 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
@@ -128,11 +128,10 @@ import org.apache.hadoop.hbase.protobuf.generated.WALProtos.FlushDescriptor.Stor
 import org.apache.hadoop.hbase.protobuf.generated.WALProtos.RegionEventDescriptor;
 import org.apache.hadoop.hbase.protobuf.generated.WALProtos.StoreDescriptor;
 import org.apache.hadoop.hbase.regionserver.HRegion.RegionScannerImpl;
-import org.apache.hadoop.hbase.regionserver.InternalScanner.NextState;
 import org.apache.hadoop.hbase.regionserver.Region.RowLock;
 import org.apache.hadoop.hbase.regionserver.TestStore.FaultyFileSystem;
-import org.apache.hadoop.hbase.regionserver.wal.HLogKey;
 import org.apache.hadoop.hbase.regionserver.handler.FinishRegionRecoveringHandler;
+import org.apache.hadoop.hbase.regionserver.wal.HLogKey;
 import org.apache.hadoop.hbase.regionserver.wal.MetricsWAL;
 import org.apache.hadoop.hbase.regionserver.wal.MetricsWALSource;
 import org.apache.hadoop.hbase.regionserver.wal.WALActionsListener;
@@ -1265,7 +1264,7 @@ public class TestHRegion {
     boolean more = false;
     List<Cell> results = new ArrayList<Cell>();
     do {
-      more = NextState.hasMoreValues(scanner.next(results));
+      more = scanner.next(results);
       if (results != null && !results.isEmpty())
         count++;
       else
@@ -1284,7 +1283,7 @@ public class TestHRegion {
     List<Cell> results = new ArrayList<Cell>();
     boolean more = false;
     do {
-      more = NextState.hasMoreValues(resultScanner.next(results));
+      more = resultScanner.next(results);
       if (results != null && !results.isEmpty())
         numberOfResults++;
       else
@@ -2274,7 +2273,7 @@ public class TestHRegion {
       InternalScanner s = region.getScanner(scan);
 
       List<Cell> results = new ArrayList<Cell>();
-      assertEquals(false, NextState.hasMoreValues(s.next(results)));
+      assertEquals(false, s.next(results));
       assertEquals(1, results.size());
       Cell kv = results.get(0);
 
@@ -2766,7 +2765,7 @@ public class TestHRegion {
       List<Cell> actual = new ArrayList<Cell>();
       InternalScanner scanner = region.getScanner(scan);
 
-      boolean hasNext = NextState.hasMoreValues(scanner.next(actual));
+      boolean hasNext = scanner.next(actual);
       assertEquals(false, hasNext);
 
       // Verify result
@@ -2829,7 +2828,7 @@ public class TestHRegion {
       List<Cell> actual = new ArrayList<Cell>();
       InternalScanner scanner = region.getScanner(scan);
 
-      boolean hasNext = NextState.hasMoreValues(scanner.next(actual));
+      boolean hasNext = scanner.next(actual);
       assertEquals(false, hasNext);
 
       // Verify result
@@ -2911,7 +2910,7 @@ public class TestHRegion {
       List<Cell> actual = new ArrayList<Cell>();
       InternalScanner scanner = region.getScanner(scan);
 
-      boolean hasNext = NextState.hasMoreValues(scanner.next(actual));
+      boolean hasNext = scanner.next(actual);
       assertEquals(false, hasNext);
 
       // Verify result
@@ -2972,7 +2971,7 @@ public class TestHRegion {
       List<Cell> actual = new ArrayList<Cell>();
       InternalScanner scanner = region.getScanner(scan);
 
-      boolean hasNext = NextState.hasMoreValues(scanner.next(actual));
+      boolean hasNext = scanner.next(actual);
       assertEquals(false, hasNext);
 
       // Verify result
@@ -3033,7 +3032,7 @@ public class TestHRegion {
       List<Cell> actual = new ArrayList<Cell>();
       InternalScanner scanner = region.getScanner(scan);
 
-      boolean hasNext = NextState.hasMoreValues(scanner.next(actual));
+      boolean hasNext = scanner.next(actual);
       assertEquals(false, hasNext);
 
       // Verify result
@@ -3086,7 +3085,7 @@ public class TestHRegion {
       InternalScanner s = region.getScanner(scan);
 
       List<Cell> results = new ArrayList<Cell>();
-      assertEquals(false, NextState.hasMoreValues(s.next(results)));
+      assertEquals(false, s.next(results));
       assertEquals(0, results.size());
     } finally {
       HBaseTestingUtility.closeRegionAndWAL(this.region);
@@ -3160,7 +3159,7 @@ public class TestHRegion {
       List<Cell> actual = new ArrayList<Cell>();
       InternalScanner scanner = region.getScanner(scan);
 
-      boolean hasNext = NextState.hasMoreValues(scanner.next(actual));
+      boolean hasNext = scanner.next(actual);
       assertEquals(false, hasNext);
 
       // Verify result
@@ -3223,18 +3222,18 @@ public class TestHRegion {
       InternalScanner s = region.getScanner(scan);
 
       List<Cell> results = new ArrayList<Cell>();
-      assertTrue(NextState.hasMoreValues(s.next(results)));
+      assertTrue(s.next(results));
       assertEquals(results.size(), 1);
       results.clear();
 
-      assertTrue(NextState.hasMoreValues(s.next(results)));
+      assertTrue(s.next(results));
       assertEquals(results.size(), 3);
       assertTrue("orderCheck", CellUtil.matchingFamily(results.get(0), cf_alpha));
       assertTrue("orderCheck", CellUtil.matchingFamily(results.get(1), cf_essential));
       assertTrue("orderCheck", CellUtil.matchingFamily(results.get(2), cf_joined));
       results.clear();
 
-      assertFalse(NextState.hasMoreValues(s.next(results)));
+      assertFalse(s.next(results));
       assertEquals(results.size(), 0);
     } finally {
       HBaseTestingUtility.closeRegionAndWAL(this.region);
@@ -3317,8 +3316,9 @@ public class TestHRegion {
 
       List<Cell> results = new ArrayList<Cell>();
       int index = 0;
+      ScannerContext scannerContext = ScannerContext.newBuilder().setBatchLimit(3).build();
       while (true) {
-        boolean more = NextState.hasMoreValues(s.next(results, 3));
+        boolean more = s.next(results, scannerContext);
         if ((index >> 1) < 5) {
           if (index % 2 == 0)
             assertEquals(results.size(), 3);
@@ -3592,7 +3592,7 @@ public class TestHRegion {
           if (toggle) {
             flushThread.flush();
           }
-          while (NextState.hasMoreValues(scanner.next(res)))
+          while (scanner.next(res))
             ;
           if (!toggle) {
             flushThread.flush();
@@ -3717,7 +3717,7 @@ public class TestHRegion {
         boolean previousEmpty = res.isEmpty();
         res.clear();
         InternalScanner scanner = region.getScanner(scan);
-        while (NextState.hasMoreValues(scanner.next(res)))
+        while (scanner.next(res))
           ;
         if (!res.isEmpty() || !previousEmpty || i > compactInterval) {
           assertEquals("i=" + i, expectedCount, res.size());
@@ -3999,7 +3999,7 @@ public class TestHRegion {
       InternalScanner scanner = region.getScanner(idxScan);
       List<Cell> res = new ArrayList<Cell>();
 
-      while (NextState.hasMoreValues(scanner.next(res)))
+      while (scanner.next(res))
         ;
       assertEquals(1L, res.size());
     } finally {
@@ -4895,7 +4895,7 @@ public class TestHRegion {
     try {
       List<Cell> curVals = new ArrayList<Cell>();
       boolean first = true;
-      OUTER_LOOP: while (NextState.hasMoreValues(s.next(curVals))) {
+      OUTER_LOOP: while (s.next(curVals)) {
         for (Cell kv : curVals) {
           byte[] val = CellUtil.cloneValue(kv);
           byte[] curval = val;
@@ -5091,17 +5091,17 @@ public class TestHRegion {
       scan.setReversed(true);
       InternalScanner scanner = region.getScanner(scan);
       List<Cell> currRow = new ArrayList<Cell>();
-      boolean hasNext = NextState.hasMoreValues(scanner.next(currRow));
+      boolean hasNext = scanner.next(currRow);
       assertEquals(2, currRow.size());
       assertTrue(Bytes.equals(currRow.get(0).getRow(), rowC));
       assertTrue(hasNext);
       currRow.clear();
-      hasNext = NextState.hasMoreValues(scanner.next(currRow));
+      hasNext = scanner.next(currRow);
       assertEquals(1, currRow.size());
       assertTrue(Bytes.equals(currRow.get(0).getRow(), rowB));
       assertTrue(hasNext);
       currRow.clear();
-      hasNext = NextState.hasMoreValues(scanner.next(currRow));
+      hasNext = scanner.next(currRow);
       assertEquals(1, currRow.size());
       assertTrue(Bytes.equals(currRow.get(0).getRow(), rowA));
       assertFalse(hasNext);
@@ -5148,17 +5148,17 @@ public class TestHRegion {
       scan.setReversed(true);
       scan.setMaxVersions(5);
       InternalScanner scanner = region.getScanner(scan);
-      boolean hasNext = NextState.hasMoreValues(scanner.next(currRow));
+      boolean hasNext = scanner.next(currRow);
       assertEquals(2, currRow.size());
       assertTrue(Bytes.equals(currRow.get(0).getRow(), rowC));
       assertTrue(hasNext);
       currRow.clear();
-      hasNext = NextState.hasMoreValues(scanner.next(currRow));
+      hasNext = scanner.next(currRow);
       assertEquals(1, currRow.size());
       assertTrue(Bytes.equals(currRow.get(0).getRow(), rowB));
       assertTrue(hasNext);
       currRow.clear();
-      hasNext = NextState.hasMoreValues(scanner.next(currRow));
+      hasNext = scanner.next(currRow);
       assertEquals(1, currRow.size());
       assertTrue(Bytes.equals(currRow.get(0).getRow(), rowA));
       assertFalse(hasNext);
@@ -5202,17 +5202,17 @@ public class TestHRegion {
       List<Cell> currRow = new ArrayList<Cell>();
       scan.setReversed(true);
       InternalScanner scanner = region.getScanner(scan);
-      boolean hasNext = NextState.hasMoreValues(scanner.next(currRow));
+      boolean hasNext = scanner.next(currRow);
       assertEquals(1, currRow.size());
       assertTrue(Bytes.equals(currRow.get(0).getRow(), rowC));
       assertTrue(hasNext);
       currRow.clear();
-      hasNext = NextState.hasMoreValues(scanner.next(currRow));
+      hasNext = scanner.next(currRow);
       assertEquals(1, currRow.size());
       assertTrue(Bytes.equals(currRow.get(0).getRow(), rowB));
       assertTrue(hasNext);
       currRow.clear();
-      hasNext = NextState.hasMoreValues(scanner.next(currRow));
+      hasNext = scanner.next(currRow);
       assertEquals(1, currRow.size());
       assertTrue(Bytes.equals(currRow.get(0).getRow(), rowA));
       assertFalse(hasNext);
@@ -5270,17 +5270,17 @@ public class TestHRegion {
       scan.setReversed(true);
       List<Cell> currRow = new ArrayList<Cell>();
       InternalScanner scanner = region.getScanner(scan);
-      boolean hasNext = NextState.hasMoreValues(scanner.next(currRow));
+      boolean hasNext = scanner.next(currRow);
       assertEquals(1, currRow.size());
       assertTrue(Bytes.equals(currRow.get(0).getRow(), rowD));
       assertTrue(hasNext);
       currRow.clear();
-      hasNext = NextState.hasMoreValues(scanner.next(currRow));
+      hasNext = scanner.next(currRow);
       assertEquals(1, currRow.size());
       assertTrue(Bytes.equals(currRow.get(0).getRow(), rowC));
       assertTrue(hasNext);
       currRow.clear();
-      hasNext = NextState.hasMoreValues(scanner.next(currRow));
+      hasNext = scanner.next(currRow);
       assertEquals(1, currRow.size());
       assertTrue(Bytes.equals(currRow.get(0).getRow(), rowB));
       assertFalse(hasNext);
@@ -5291,7 +5291,7 @@ public class TestHRegion {
       scan.setReversed(true);
       currRow.clear();
       scanner = region.getScanner(scan);
-      hasNext = NextState.hasMoreValues(scanner.next(currRow));
+      hasNext = scanner.next(currRow);
       assertEquals(1, currRow.size());
       assertTrue(Bytes.equals(currRow.get(0).getRow(), rowD));
       scanner.close();
@@ -5350,17 +5350,17 @@ public class TestHRegion {
       scan.setReversed(true);
       List<Cell> currRow = new ArrayList<Cell>();
       InternalScanner scanner = region.getScanner(scan);
-      boolean hasNext = NextState.hasMoreValues(scanner.next(currRow));
+      boolean hasNext = scanner.next(currRow);
       assertEquals(1, currRow.size());
       assertTrue(Bytes.equals(currRow.get(0).getRow(), rowD));
       assertTrue(hasNext);
       currRow.clear();
-      hasNext = NextState.hasMoreValues(scanner.next(currRow));
+      hasNext = scanner.next(currRow);
       assertEquals(1, currRow.size());
       assertTrue(Bytes.equals(currRow.get(0).getRow(), rowC));
       assertTrue(hasNext);
       currRow.clear();
-      hasNext = NextState.hasMoreValues(scanner.next(currRow));
+      hasNext = scanner.next(currRow);
       assertEquals(1, currRow.size());
       assertTrue(Bytes.equals(currRow.get(0).getRow(), rowB));
       assertFalse(hasNext);
@@ -5371,7 +5371,7 @@ public class TestHRegion {
       scan.setReversed(true);
       currRow.clear();
       scanner = region.getScanner(scan);
-      hasNext = NextState.hasMoreValues(scanner.next(currRow));
+      hasNext = scanner.next(currRow);
       assertEquals(1, currRow.size());
       assertTrue(Bytes.equals(currRow.get(0).getRow(), rowD));
       scanner.close();
@@ -5495,42 +5495,42 @@ public class TestHRegion {
       // 1. scan out "row4" (5 kvs), "row5" can't be scanned out since not
       // included in scan range
       // "row4" takes 2 next() calls since batch=3
-      hasNext = NextState.hasMoreValues(scanner.next(currRow));
+      hasNext = scanner.next(currRow);
       assertEquals(3, currRow.size());
       assertTrue(Bytes.equals(currRow.get(0).getRow(), row4));
       assertTrue(hasNext);
       currRow.clear();
-      hasNext = NextState.hasMoreValues(scanner.next(currRow));
+      hasNext = scanner.next(currRow);
       assertEquals(2, currRow.size());
       assertTrue(Bytes.equals(currRow.get(0).getRow(), row4));
       assertTrue(hasNext);
       // 2. scan out "row3" (2 kv)
       currRow.clear();
-      hasNext = NextState.hasMoreValues(scanner.next(currRow));
+      hasNext = scanner.next(currRow);
       assertEquals(2, currRow.size());
       assertTrue(Bytes.equals(currRow.get(0).getRow(), row3));
       assertTrue(hasNext);
       // 3. scan out "row2" (4 kvs)
       // "row2" takes 2 next() calls since batch=3
       currRow.clear();
-      hasNext = NextState.hasMoreValues(scanner.next(currRow));
+      hasNext = scanner.next(currRow);
       assertEquals(3, currRow.size());
       assertTrue(Bytes.equals(currRow.get(0).getRow(), row2));
       assertTrue(hasNext);
       currRow.clear();
-      hasNext = NextState.hasMoreValues(scanner.next(currRow));
+      hasNext = scanner.next(currRow);
       assertEquals(1, currRow.size());
       assertTrue(Bytes.equals(currRow.get(0).getRow(), row2));
       assertTrue(hasNext);
       // 4. scan out "row1" (2 kv)
       currRow.clear();
-      hasNext = NextState.hasMoreValues(scanner.next(currRow));
+      hasNext = scanner.next(currRow);
       assertEquals(2, currRow.size());
       assertTrue(Bytes.equals(currRow.get(0).getRow(), row1));
       assertTrue(hasNext);
       // 5. scan out "row0" (1 kv)
       currRow.clear();
-      hasNext = NextState.hasMoreValues(scanner.next(currRow));
+      hasNext = scanner.next(currRow);
       assertEquals(1, currRow.size());
       assertTrue(Bytes.equals(currRow.get(0).getRow(), row0));
       assertFalse(hasNext);
@@ -5591,22 +5591,22 @@ public class TestHRegion {
       scan.setBatch(10);
       InternalScanner scanner = region.getScanner(scan);
       List<Cell> currRow = new ArrayList<Cell>();
-      boolean hasNext = NextState.hasMoreValues(scanner.next(currRow));
+      boolean hasNext = scanner.next(currRow);
       assertEquals(1, currRow.size());
       assertTrue(Bytes.equals(currRow.get(0).getRow(), row4));
       assertTrue(hasNext);
       currRow.clear();
-      hasNext = NextState.hasMoreValues(scanner.next(currRow));
+      hasNext = scanner.next(currRow);
       assertEquals(1, currRow.size());
       assertTrue(Bytes.equals(currRow.get(0).getRow(), row3));
       assertTrue(hasNext);
       currRow.clear();
-      hasNext = NextState.hasMoreValues(scanner.next(currRow));
+      hasNext = scanner.next(currRow);
       assertEquals(1, currRow.size());
       assertTrue(Bytes.equals(currRow.get(0).getRow(), row2));
       assertTrue(hasNext);
       currRow.clear();
-      hasNext = NextState.hasMoreValues(scanner.next(currRow));
+      hasNext = scanner.next(currRow);
       assertEquals(1, currRow.size());
       assertTrue(Bytes.equals(currRow.get(0).getRow(), row1));
       assertFalse(hasNext);
@@ -5659,7 +5659,7 @@ public class TestHRegion {
       boolean more = false;
       int verify = startRow + 2 * numRows - 1;
       do {
-        more = NextState.hasMoreValues(scanner.next(currRow));
+        more = scanner.next(currRow);
         assertEquals(Bytes.toString(currRow.get(0).getRow()), verify + "");
         verify--;
         currRow.clear();
@@ -5672,7 +5672,7 @@ public class TestHRegion {
       scanner = regions[1].getScanner(scan);
       verify = startRow + 2 * numRows - 1;
       do {
-        more = NextState.hasMoreValues(scanner.next(currRow));
+        more = scanner.next(currRow);
         assertEquals(Bytes.toString(currRow.get(0).getRow()), verify + "");
         verify--;
         currRow.clear();
@@ -5685,7 +5685,7 @@ public class TestHRegion {
       scanner = regions[0].getScanner(scan);
       verify = startRow + numRows - 1;
       do {
-        more = NextState.hasMoreValues(scanner.next(currRow));
+        more = scanner.next(currRow);
         assertEquals(Bytes.toString(currRow.get(0).getRow()), verify + "");
         verify--;
         currRow.clear();
@@ -5698,7 +5698,7 @@ public class TestHRegion {
       scanner = regions[0].getScanner(scan);
       verify = startRow + numRows - 1;
       do {
-        more = NextState.hasMoreValues(scanner.next(currRow));
+        more = scanner.next(currRow);
         assertEquals(Bytes.toString(currRow.get(0).getRow()), verify + "");
         verify--;
         currRow.clear();

http://git-wip-us.apache.org/repos/asf/hbase/blob/62d47e17/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java
index c480cd8..9286e0d 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java
@@ -38,7 +38,6 @@ import org.apache.hadoop.hbase.client.Get;
 import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.Scan;
-import org.apache.hadoop.hbase.regionserver.InternalScanner.NextState;
 import org.apache.hadoop.hbase.testclassification.RegionServerTests;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
 import org.apache.hadoop.hbase.util.Bytes;
@@ -264,7 +263,8 @@ public class TestKeepDeletes {
     s.setTimeRange(0L, ts+1);
     InternalScanner scanner = region.getScanner(s);
     List<Cell> kvs = new ArrayList<Cell>();
-    while (NextState.hasMoreValues(scanner.next(kvs)));
+    while (scanner.next(kvs))
+      ;
     assertTrue(kvs.isEmpty());
 
     // flushing and minor compaction keep delete markers
@@ -946,7 +946,7 @@ public class TestKeepDeletes {
     int res = 0;
     boolean hasMore;
     do {
-      hasMore = NextState.hasMoreValues(scan.next(kvs));
+      hasMore = scan.next(kvs);
       for (Cell kv : kvs) {
         if(CellUtil.isDelete(kv)) res++;
       }

http://git-wip-us.apache.org/repos/asf/hbase/blob/62d47e17/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMajorCompaction.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMajorCompaction.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMajorCompaction.java
index 12ab2ad..cc16804 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMajorCompaction.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMajorCompaction.java
@@ -52,7 +52,6 @@ import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
 import org.apache.hadoop.hbase.io.hfile.HFileDataBlockEncoder;
 import org.apache.hadoop.hbase.io.hfile.HFileDataBlockEncoderImpl;
 import org.apache.hadoop.hbase.io.hfile.HFileScanner;
-import org.apache.hadoop.hbase.regionserver.InternalScanner.NextState;
 import org.apache.hadoop.hbase.regionserver.compactions.CompactionProgress;
 import org.apache.hadoop.hbase.regionserver.compactions.CompactionRequest;
 import org.apache.hadoop.hbase.regionserver.compactions.RatioBasedCompactionPolicy;
@@ -132,7 +131,7 @@ public class TestMajorCompaction {
     InternalScanner s = r.getScanner(new Scan());
     do {
       List<Cell> results = new ArrayList<Cell>();
-      boolean result = NextState.hasMoreValues(s.next(results));
+      boolean result = s.next(results);
       r.delete(new Delete(CellUtil.cloneRow(results.get(0))));
       if (!result) break;
     } while(true);
@@ -145,7 +144,7 @@ public class TestMajorCompaction {
     int counter = 0;
     do {
       List<Cell> results = new ArrayList<Cell>();
-      boolean result = NextState.hasMoreValues(s.next(results));
+      boolean result = s.next(results);
       if (!result) break;
       counter++;
     } while(true);
@@ -456,7 +455,7 @@ public class TestMajorCompaction {
     InternalScanner s = r.getScanner(scan);
     do {
       List<Cell> results = new ArrayList<Cell>();
-      boolean result = NextState.hasMoreValues(s.next(results));
+      boolean result = s.next(results);
       assertTrue(!results.isEmpty());
       r.delete(new Delete(results.get(0).getRow()));
       if (!result) break;
@@ -472,7 +471,7 @@ public class TestMajorCompaction {
     int counter = 0;
     do {
       List<Cell> results = new ArrayList<Cell>();
-      boolean result = NextState.hasMoreValues(s.next(results));
+      boolean result = s.next(results);
       if (!result) break;
       counter++;
     } while (true);

http://git-wip-us.apache.org/repos/asf/hbase/blob/62d47e17/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiColumnScanner.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiColumnScanner.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiColumnScanner.java
index 28d3ab9..dfdc4e4 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiColumnScanner.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiColumnScanner.java
@@ -49,7 +49,6 @@ import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.io.compress.Compression;
 import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
-import org.apache.hadoop.hbase.regionserver.InternalScanner.NextState;
 import org.apache.hadoop.hbase.testclassification.MediumTests;
 import org.apache.hadoop.hbase.testclassification.RegionServerTests;
 import org.apache.hadoop.hbase.util.Bytes;
@@ -250,7 +249,7 @@ public class TestMultiColumnScanner {
         String queryInfo = "columns queried: " + qualSet + " (columnBitMask="
             + columnBitMask + "), maxVersions=" + maxVersions;
 
-        while (NextState.hasMoreValues(scanner.next(results)) || results.size() > 0) {
+        while (scanner.next(results) || results.size() > 0) {
           for (Cell kv : results) {
             while (kvPos < kvs.size()
                 && !matchesQuery(kvs.get(kvPos), qualSet, maxVersions,

http://git-wip-us.apache.org/repos/asf/hbase/blob/62d47e17/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionMergeTransaction.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionMergeTransaction.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionMergeTransaction.java
index 313a6ba..b2115b3 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionMergeTransaction.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionMergeTransaction.java
@@ -44,7 +44,6 @@ import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.client.Durability;
 import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Scan;
-import org.apache.hadoop.hbase.regionserver.InternalScanner.NextState;
 import org.apache.hadoop.hbase.testclassification.RegionServerTests;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
 import org.apache.hadoop.hbase.util.Bytes;
@@ -427,7 +426,7 @@ public class TestRegionMergeTransaction {
       List<Cell> kvs = new ArrayList<Cell>();
       boolean hasNext = true;
       while (hasNext) {
-        hasNext = NextState.hasMoreValues(scanner.next(kvs));
+        hasNext = scanner.next(kvs);
         if (!kvs.isEmpty())
           rowcount++;
       }

http://git-wip-us.apache.org/repos/asf/hbase/blob/62d47e17/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestReversibleScanners.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestReversibleScanners.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestReversibleScanners.java
index 92915e6..8052d9c 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestReversibleScanners.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestReversibleScanners.java
@@ -55,7 +55,6 @@ import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
 import org.apache.hadoop.hbase.io.hfile.CacheConfig;
 import org.apache.hadoop.hbase.io.hfile.HFileContext;
 import org.apache.hadoop.hbase.io.hfile.HFileContextBuilder;
-import org.apache.hadoop.hbase.regionserver.InternalScanner.NextState;
 import org.apache.hadoop.hbase.testclassification.MediumTests;
 import org.apache.hadoop.hbase.testclassification.RegionServerTests;
 import org.apache.hadoop.hbase.util.Bytes;
@@ -434,7 +433,7 @@ public class TestReversibleScanners {
     int rowCount = 0;
     int kvCount = 0;
     try {
-      while (NextState.hasMoreValues(scanner.next(kvList))) {
+      while (scanner.next(kvList)) {
         if (kvList.isEmpty()) continue;
         rowCount++;
         kvCount += kvList.size();

http://git-wip-us.apache.org/repos/asf/hbase/blob/62d47e17/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanWithBloomError.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanWithBloomError.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanWithBloomError.java
index ccae4bc..eada3fb 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanWithBloomError.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanWithBloomError.java
@@ -47,7 +47,6 @@ import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.io.compress.Compression;
 import org.apache.hadoop.hbase.io.hfile.HFilePrettyPrinter;
 import org.apache.hadoop.hbase.regionserver.HRegion.RegionScannerImpl;
-import org.apache.hadoop.hbase.regionserver.InternalScanner.NextState;
 import org.apache.hadoop.hbase.testclassification.RegionServerTests;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
 import org.apache.hadoop.hbase.util.Bytes;
@@ -165,7 +164,7 @@ public class TestScanWithBloomError {
 
     { // Limit the scope of results.
       List<Cell> results = new ArrayList<Cell>();
-      while (NextState.hasMoreValues(scanner.next(results)) || results.size() > 0) {
+      while (scanner.next(results) || results.size() > 0) {
         allResults.addAll(results);
         results.clear();
       }

http://git-wip-us.apache.org/repos/asf/hbase/blob/62d47e17/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanner.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanner.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanner.java
index ee72ce4..84cb355 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanner.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanner.java
@@ -54,7 +54,6 @@ import org.apache.hadoop.hbase.filter.Filter;
 import org.apache.hadoop.hbase.filter.InclusiveStopFilter;
 import org.apache.hadoop.hbase.filter.PrefixFilter;
 import org.apache.hadoop.hbase.filter.WhileMatchFilter;
-import org.apache.hadoop.hbase.regionserver.InternalScanner.NextState;
 import org.apache.hadoop.hbase.testclassification.RegionServerTests;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
 import org.apache.hadoop.hbase.util.Bytes;
@@ -137,7 +136,7 @@ public class TestScanner {
 
       InternalScanner s = r.getScanner(scan);
       int count = 0;
-      while (NextState.hasMoreValues(s.next(results))) {
+      while (s.next(results)) {
         count++;
       }
       s.close();
@@ -150,7 +149,7 @@ public class TestScanner {
       count = 0;
       Cell kv = null;
       results = new ArrayList<Cell>();
-      for (boolean first = true; NextState.hasMoreValues(s.next(results));) {
+      for (boolean first = true; s.next(results);) {
         kv = results.get(0);
         if (first) {
           assertTrue(CellUtil.matchingRow(kv,  startrow));
@@ -173,7 +172,7 @@ public class TestScanner {
     InternalScanner s = r.getScanner(scan);
     boolean hasMore = true;
     while (hasMore) {
-      hasMore = NextState.hasMoreValues(s.next(results));
+      hasMore = s.next(results);
       for (Cell kv : results) {
         assertEquals((byte)'a', CellUtil.cloneRow(kv)[0]);
         assertEquals((byte)'b', CellUtil.cloneRow(kv)[1]);
@@ -189,7 +188,7 @@ public class TestScanner {
     InternalScanner s = r.getScanner(scan);
     boolean hasMore = true;
     while (hasMore) {
-      hasMore = NextState.hasMoreValues(s.next(results));
+      hasMore = s.next(results);
       for (Cell kv : results) {
         assertTrue(Bytes.compareTo(CellUtil.cloneRow(kv), stopRow) <= 0);
       }
@@ -389,7 +388,7 @@ public class TestScanner {
           scan.addColumn(COLS[0],  EXPLICIT_COLS[ii]);
         }
         scanner = r.getScanner(scan);
-        while (NextState.hasMoreValues(scanner.next(results))) {
+        while (scanner.next(results)) {
           assertTrue(hasColumn(results, HConstants.CATALOG_FAMILY,
               HConstants.REGIONINFO_QUALIFIER));
           byte [] val = CellUtil.cloneValue(getColumn(results, HConstants.CATALOG_FAMILY,

http://git-wip-us.apache.org/repos/asf/hbase/blob/62d47e17/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSeekOptimizations.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSeekOptimizations.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSeekOptimizations.java
index dfced3b..1e09c40 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSeekOptimizations.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSeekOptimizations.java
@@ -44,7 +44,6 @@ import org.apache.hadoop.hbase.client.Delete;
 import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.io.compress.Compression;
-import org.apache.hadoop.hbase.regionserver.InternalScanner.NextState;
 import org.apache.hadoop.hbase.testclassification.MediumTests;
 import org.apache.hadoop.hbase.testclassification.RegionServerTests;
 import org.apache.hadoop.hbase.util.Bytes;
@@ -225,7 +224,7 @@ public class TestSeekOptimizations {
     // result, not to the one already returned in results.
     boolean hasNext;
     do {
-      hasNext = NextState.hasMoreValues(scanner.next(results));
+      hasNext = scanner.next(results);
       actualKVs.addAll(results);
       results.clear();
     } while (hasNext);

http://git-wip-us.apache.org/repos/asf/hbase/blob/62d47e17/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransaction.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransaction.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransaction.java
index da4f811..4f371bd 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransaction.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransaction.java
@@ -50,7 +50,6 @@ import org.apache.hadoop.hbase.coprocessor.ObserverContext;
 import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.io.hfile.CacheConfig;
 import org.apache.hadoop.hbase.io.hfile.LruBlockCache;
-import org.apache.hadoop.hbase.regionserver.InternalScanner.NextState;
 import org.apache.hadoop.hbase.testclassification.RegionServerTests;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
 import org.apache.hadoop.hbase.util.Bytes;
@@ -361,7 +360,7 @@ public class TestSplitTransaction {
       List<Cell> kvs = new ArrayList<Cell>();
       boolean hasNext = true;
       while (hasNext) {
-        hasNext = NextState.hasMoreValues(scanner.next(kvs));
+        hasNext = scanner.next(kvs);
         if (!kvs.isEmpty()) rowcount++;
       }
     } finally {

http://git-wip-us.apache.org/repos/asf/hbase/blob/62d47e17/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreScanner.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreScanner.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreScanner.java
index c723c2e..ee39212 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreScanner.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreScanner.java
@@ -36,7 +36,6 @@ import org.apache.hadoop.hbase.KeepDeletedCells;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.KeyValueTestUtil;
 import org.apache.hadoop.hbase.client.Scan;
-import org.apache.hadoop.hbase.regionserver.InternalScanner.NextState;
 import org.apache.hadoop.hbase.testclassification.MediumTests;
 import org.apache.hadoop.hbase.testclassification.RegionServerTests;
 import org.apache.hadoop.hbase.util.Bytes;
@@ -91,7 +90,7 @@ public class TestStoreScanner extends TestCase {
     StoreScanner scan = new StoreScanner(scanSpec, scanInfo, scanType,
         getCols("a"), scanners);
     List<Cell> results = new ArrayList<Cell>();
-    assertEquals(true, NextState.hasMoreValues(scan.next(results)));
+    assertEquals(true, scan.next(results));
     assertEquals(5, results.size());
     assertEquals(kvs[kvs.length - 1], results.get(0));
     // Scan limited TimeRange
@@ -101,7 +100,7 @@ public class TestStoreScanner extends TestCase {
     scan = new StoreScanner(scanSpec, scanInfo, scanType, getCols("a"),
         scanners);
     results = new ArrayList<Cell>();
-    assertEquals(true, NextState.hasMoreValues(scan.next(results)));
+    assertEquals(true, scan.next(results));
     assertEquals(2, results.size());
     // Another range.
     scanSpec = new Scan(Bytes.toBytes(r1));
@@ -110,7 +109,7 @@ public class TestStoreScanner extends TestCase {
     scan = new StoreScanner(scanSpec, scanInfo, scanType, getCols("a"),
         scanners);
     results = new ArrayList<Cell>();
-    assertEquals(true, NextState.hasMoreValues(scan.next(results)));
+    assertEquals(true, scan.next(results));
     assertEquals(1, results.size());
     // See how TimeRange and Versions interact.
     // Another range.
@@ -120,7 +119,7 @@ public class TestStoreScanner extends TestCase {
     scan = new StoreScanner(scanSpec, scanInfo, scanType, getCols("a"),
         scanners);
     results = new ArrayList<Cell>();
-    assertEquals(true, NextState.hasMoreValues(scan.next(results)));
+    assertEquals(true, scan.next(results));
     assertEquals(3, results.size());
   }
 
@@ -141,7 +140,7 @@ public class TestStoreScanner extends TestCase {
         getCols("a"), scanners);
 
     List<Cell> results = new ArrayList<Cell>();
-    assertEquals(true, NextState.hasMoreValues(scan.next(results)));
+    assertEquals(true, scan.next(results));
     assertEquals(1, results.size());
     assertEquals(kvs[0], results.get(0));
   }
@@ -196,7 +195,7 @@ public class TestStoreScanner extends TestCase {
         getCols("a"), scanners);
 
     List<Cell> results = new ArrayList<Cell>();
-    assertFalse(NextState.hasMoreValues(scan.next(results)));
+    assertFalse(scan.next(results));
     assertEquals(0, results.size());
   }
 
@@ -216,14 +215,14 @@ public class TestStoreScanner extends TestCase {
         getCols("a"), scanners);
 
     List<Cell> results = new ArrayList<Cell>();
-    assertEquals(true, NextState.hasMoreValues(scan.next(results)));
+    assertEquals(true, scan.next(results));
     assertEquals(0, results.size());
 
-    assertEquals(true, NextState.hasMoreValues(scan.next(results)));
+    assertEquals(true, scan.next(results));
     assertEquals(1, results.size());
     assertEquals(kvs[2], results.get(0));
 
-    assertEquals(false, NextState.hasMoreValues(scan.next(results)));
+    assertEquals(false, scan.next(results));
   }
 
   public void testDeleteVersionMaskingMultiplePuts() throws IOException {
@@ -245,7 +244,7 @@ public class TestStoreScanner extends TestCase {
     // the two put at ts=now will be masked by the 1 delete, and
     // since the scan default returns 1 version we'll return the newest
     // key, which is kvs[2], now-100.
-    assertEquals(true, NextState.hasMoreValues(scan.next(results)));
+    assertEquals(true, scan.next(results));
     assertEquals(1, results.size());
     assertEquals(kvs2[1], results.get(0));
   }
@@ -267,7 +266,7 @@ public class TestStoreScanner extends TestCase {
     StoreScanner scan = new StoreScanner(scanSpec, scanInfo, scanType,
         getCols("a"), scanners);
     List<Cell> results = new ArrayList<Cell>();
-    assertEquals(true, NextState.hasMoreValues(scan.next(results)));
+    assertEquals(true, scan.next(results));
     assertEquals(2, results.size());
     assertEquals(kvs2[1], results.get(0));
     assertEquals(kvs2[0], results.get(1));
@@ -283,7 +282,7 @@ public class TestStoreScanner extends TestCase {
     StoreScanner scan = new StoreScanner(new Scan(Bytes.toBytes("R1")),
         scanInfo, scanType, null, scanners);
     List<Cell> results = new ArrayList<Cell>();
-    assertEquals(true, NextState.hasMoreValues(scan.next(results)));
+    assertEquals(true, scan.next(results));
     assertEquals(2, results.size());
     assertEquals(kvs[0], results.get(0));
     assertEquals(kvs[1], results.get(1));
@@ -312,7 +311,7 @@ public class TestStoreScanner extends TestCase {
     StoreScanner scan = new StoreScanner(new Scan().setMaxVersions(2),
         scanInfo, scanType, null, scanners);
     List<Cell> results = new ArrayList<Cell>();
-    assertEquals(true, NextState.hasMoreValues(scan.next(results)));
+    assertEquals(true, scan.next(results));
     assertEquals(5, results.size());
     assertEquals(kvs[0], results.get(0));
     assertEquals(kvs[2], results.get(1));
@@ -341,13 +340,13 @@ public class TestStoreScanner extends TestCase {
         new Scan().setMaxVersions(Integer.MAX_VALUE), scanInfo, scanType, null,
         scanners);
     List<Cell> results = new ArrayList<Cell>();
-    assertEquals(true, NextState.hasMoreValues(scan.next(results)));
+    assertEquals(true, scan.next(results));
     assertEquals(0, results.size());
-    assertEquals(true, NextState.hasMoreValues(scan.next(results)));
+    assertEquals(true, scan.next(results));
     assertEquals(1, results.size());
     assertEquals(kvs[kvs.length-1], results.get(0));
 
-    assertEquals(false, NextState.hasMoreValues(scan.next(results)));
+    assertEquals(false, scan.next(results));
   }
 
   public void testDeleteColumn() throws IOException {
@@ -361,7 +360,7 @@ public class TestStoreScanner extends TestCase {
     StoreScanner scan = new StoreScanner(new Scan(), scanInfo, scanType, null,
         scanners);
     List<Cell> results = new ArrayList<Cell>();
-    assertEquals(true, NextState.hasMoreValues(scan.next(results)));
+    assertEquals(true, scan.next(results));
     assertEquals(1, results.size());
     assertEquals(kvs[3], results.get(0));
   }
@@ -385,18 +384,18 @@ public class TestStoreScanner extends TestCase {
         getCols("a", "d"), scanners);
 
     List<Cell> results = new ArrayList<Cell>();
-    assertEquals(true, NextState.hasMoreValues(scan.next(results)));
+    assertEquals(true, scan.next(results));
     assertEquals(2, results.size());
     assertEquals(kvs[0], results.get(0));
     assertEquals(kvs[3], results.get(1));
     results.clear();
 
-    assertEquals(true, NextState.hasMoreValues(scan.next(results)));
+    assertEquals(true, scan.next(results));
     assertEquals(1, results.size());
     assertEquals(kvs[kvs.length-1], results.get(0));
 
     results.clear();
-    assertEquals(false, NextState.hasMoreValues(scan.next(results)));
+    assertEquals(false, scan.next(results));
   }
 
   /*
@@ -426,20 +425,20 @@ public class TestStoreScanner extends TestCase {
           null, scanners);
 
     List<Cell> results = new ArrayList<Cell>();
-    assertEquals(true, NextState.hasMoreValues(scanner.next(results)));
+    assertEquals(true, scanner.next(results));
     assertEquals(2, results.size());
     assertEquals(kvs[1], results.get(0));
     assertEquals(kvs[2], results.get(1));
     results.clear();
 
-    assertEquals(true, NextState.hasMoreValues(scanner.next(results)));
+    assertEquals(true, scanner.next(results));
     assertEquals(3, results.size());
     assertEquals(kvs[4], results.get(0));
     assertEquals(kvs[5], results.get(1));
     assertEquals(kvs[6], results.get(2));
     results.clear();
 
-    assertEquals(false, NextState.hasMoreValues(scanner.next(results)));
+    assertEquals(false, scanner.next(results));
   }
 
   public void testScannerReseekDoesntNPE() throws Exception {
@@ -496,12 +495,12 @@ public class TestStoreScanner extends TestCase {
         new StoreScanner(scan, scanInfo, scanType, null, scanners);
 
     List<Cell> results = new ArrayList<Cell>();
-    assertEquals(true, NextState.hasMoreValues(scanner.next(results)));
+    assertEquals(true, scanner.next(results));
     assertEquals(1, results.size());
     assertEquals(kvs[1], results.get(0));
     results.clear();
 
-    assertEquals(false, NextState.hasMoreValues(scanner.next(results)));
+    assertEquals(false, scanner.next(results));
   }
 
   public void testDeleteMarkerLongevity() throws Exception {
@@ -561,7 +560,7 @@ public class TestStoreScanner extends TestCase {
           HConstants.OLDEST_TIMESTAMP);
       List<Cell> results = new ArrayList<Cell>();
       results = new ArrayList<Cell>();
-      assertEquals(true, NextState.hasMoreValues(scanner.next(results)));
+      assertEquals(true, scanner.next(results));
       assertEquals(kvs[0], results.get(0));
       assertEquals(kvs[2], results.get(1));
       assertEquals(kvs[3], results.get(2));

http://git-wip-us.apache.org/repos/asf/hbase/blob/62d47e17/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStripeCompactor.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStripeCompactor.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStripeCompactor.java
index 06bbd54..b743550 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStripeCompactor.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStripeCompactor.java
@@ -237,22 +237,14 @@ public class TestStripeCompactor {
     }
 
     @Override
-    public NextState next(List<Cell> results) throws IOException {
-      if (kvs.isEmpty()) return NextState.makeState(NextState.State.NO_MORE_VALUES);
+    public boolean next(List<Cell> results) throws IOException {
+      if (kvs.isEmpty()) return false;
       results.add(kvs.remove(0));
-      if (!kvs.isEmpty()) {
-        return NextState.makeState(NextState.State.MORE_VALUES);
-      } else {
-        return NextState.makeState(NextState.State.NO_MORE_VALUES);
-      }
-    }
-    @Override
-    public NextState next(List<Cell> result, int limit) throws IOException {
-      return next(result);
+      return !kvs.isEmpty();
     }
 
     @Override
-    public NextState next(List<Cell> result, int limit, long remainingResultSize)
+    public boolean next(List<Cell> result, ScannerContext scannerContext)
         throws IOException {
       return next(result);
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/62d47e17/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestWideScanner.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestWideScanner.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestWideScanner.java
index 303ee36..fb4561b 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestWideScanner.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestWideScanner.java
@@ -37,7 +37,6 @@ import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.client.Durability;
 import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Scan;
-import org.apache.hadoop.hbase.regionserver.InternalScanner.NextState;
 import org.apache.hadoop.hbase.testclassification.RegionServerTests;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
 import org.apache.hadoop.hbase.util.Bytes;
@@ -106,7 +105,7 @@ public class TestWideScanner extends HBaseTestCase {
       int i = 0;
       boolean more;
       do {
-        more = NextState.hasMoreValues(s.next(results));
+        more = s.next(results);
         i++;
         LOG.info("iteration #" + i + ", results.size=" + results.size());
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/62d47e17/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/TestStripeCompactionPolicy.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/TestStripeCompactionPolicy.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/TestStripeCompactionPolicy.java
index 3294f6d..81f8115 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/TestStripeCompactionPolicy.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/TestStripeCompactionPolicy.java
@@ -54,6 +54,7 @@ import org.apache.hadoop.hbase.io.hfile.HFile;
 import org.apache.hadoop.hbase.regionserver.BloomType;
 import org.apache.hadoop.hbase.regionserver.InternalScanner;
 import org.apache.hadoop.hbase.regionserver.ScanType;
+import org.apache.hadoop.hbase.regionserver.ScannerContext;
 import org.apache.hadoop.hbase.regionserver.Store;
 import org.apache.hadoop.hbase.regionserver.StoreConfigInformation;
 import org.apache.hadoop.hbase.regionserver.StoreFile;
@@ -774,24 +775,15 @@ public class TestStripeCompactionPolicy {
     }
 
     @Override
-    public NextState next(List<Cell> results) throws IOException {
-      if (kvs.isEmpty()) return NextState.makeState(NextState.State.NO_MORE_VALUES);
+    public boolean next(List<Cell> results) throws IOException {
+      if (kvs.isEmpty()) return false;
       results.add(kvs.remove(0));
 
-      if (!kvs.isEmpty()) {
-        return NextState.makeState(NextState.State.MORE_VALUES);
-      } else {
-        return NextState.makeState(NextState.State.NO_MORE_VALUES);
-      }
-    }
-
-    @Override
-    public NextState next(List<Cell> result, int limit) throws IOException {
-      return next(result);
+      return !kvs.isEmpty();
     }
 
     @Override
-    public NextState next(List<Cell> result, int limit, long remainingResultSize)
+    public boolean next(List<Cell> result, ScannerContext scannerContext)
         throws IOException {
       return next(result);
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/62d47e17/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestWALReplay.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestWALReplay.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestWALReplay.java
index afdcdc7..5310a2e 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestWALReplay.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestWALReplay.java
@@ -71,7 +71,6 @@ import org.apache.hadoop.hbase.regionserver.FlushRequestListener;
 import org.apache.hadoop.hbase.regionserver.FlushRequester;
 import org.apache.hadoop.hbase.regionserver.HRegion;
 import org.apache.hadoop.hbase.regionserver.HRegionServer;
-import org.apache.hadoop.hbase.regionserver.InternalScanner.NextState;
 import org.apache.hadoop.hbase.regionserver.MemStoreSnapshot;
 import org.apache.hadoop.hbase.regionserver.Region;
 import org.apache.hadoop.hbase.regionserver.RegionScanner;
@@ -751,7 +750,7 @@ public class TestWALReplay {
     int scannedCount = 0;
     List<Cell> results = new ArrayList<Cell>();
     while (true) {
-      boolean existMore = NextState.hasMoreValues(scanner.next(results));
+      boolean existMore = scanner.next(results);
       if (!results.isEmpty())
         scannedCount++;
       if (!existMore)

http://git-wip-us.apache.org/repos/asf/hbase/blob/62d47e17/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestMergeTool.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestMergeTool.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestMergeTool.java
index c071a33..056eeb2 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestMergeTool.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestMergeTool.java
@@ -40,7 +40,6 @@ import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.regionserver.HRegion;
 import org.apache.hadoop.hbase.regionserver.InternalScanner;
-import org.apache.hadoop.hbase.regionserver.InternalScanner.NextState;
 import org.apache.hadoop.hbase.testclassification.LargeTests;
 import org.apache.hadoop.hbase.testclassification.MiscTests;
 import org.apache.hadoop.hbase.wal.WAL;
@@ -232,7 +231,7 @@ public class TestMergeTool extends HBaseTestCase {
     List<Cell> testRes = null;
       while (true) {
         testRes = new ArrayList<Cell>();
-        boolean hasNext = NextState.hasMoreValues(scanner.next(testRes));
+        boolean hasNext = scanner.next(testRes);
         if (!hasNext) {
           break;
         }


Mime
View raw message