hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [2/4] hbase git commit: HBASE-13892 NPE in ClientScanner on null results array
Date Fri, 12 Jun 2015 02:26:35 GMT
HBASE-13892 NPE in ClientScanner on null results array

Test only

Signed-off-by: Andrew Purtell <apurtell@apache.org>
Amending-Author: Andrew Purtell <apurtell@apache.org>

Conflicts:
	hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/71baa89e
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/71baa89e
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/71baa89e

Branch: refs/heads/branch-1.0
Commit: 71baa89ec45393ff5459567b069be6085ea16b8e
Parents: 904ec1e
Author: Josh Elser <elserj@apache.org>
Authored: Thu Jun 11 20:33:19 2015 -0400
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Thu Jun 11 18:14:39 2015 -0700

----------------------------------------------------------------------
 .../hadoop/hbase/client/TestFromClientSide.java      | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/71baa89e/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
index 85c0475..891f92a 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
@@ -74,6 +74,8 @@ import org.apache.hadoop.hbase.filter.CompareFilter;
 import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
 import org.apache.hadoop.hbase.filter.Filter;
 import org.apache.hadoop.hbase.filter.FilterList;
+import org.apache.hadoop.hbase.filter.FirstKeyOnlyFilter;
+import org.apache.hadoop.hbase.filter.InclusiveStopFilter;
 import org.apache.hadoop.hbase.filter.KeyOnlyFilter;
 import org.apache.hadoop.hbase.filter.LongComparator;
 import org.apache.hadoop.hbase.filter.PrefixFilter;
@@ -6375,4 +6377,17 @@ public class TestFromClientSide {
     }
   }
 
+  @Test
+  public void testFilterAllRecords() throws IOException {
+    Scan scan = new Scan();
+    scan.setBatch(1);
+    scan.setCaching(1);
+    // Filter out any records
+    scan.setFilter(new FilterList(new FirstKeyOnlyFilter(), new InclusiveStopFilter(new byte[0])));
+    try (Table table = TEST_UTIL.getConnection().getTable(TableName.NAMESPACE_TABLE_NAME))
{
+      try (ResultScanner s = table.getScanner(scan)) {
+        assertNull(s.next());
+      }
+    }
+  }
 }


Mime
View raw message