You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ja...@apache.org on 2020/01/11 20:34:46 UTC
[hbase] branch branch-2.2 updated: HBASE-23646 Resolved remaining
Checkstyle violations in tests of hbase-rest
This is an automated email from the ASF dual-hosted git repository.
janh pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.2 by this push:
new 56b08ee HBASE-23646 Resolved remaining Checkstyle violations in tests of hbase-rest
56b08ee is described below
commit 56b08eee0d73d239eb8e6d2badfdcea06ef2cc07
Author: Jan Hentschel <ja...@apache.org>
AuthorDate: Sat Jan 11 21:09:14 2020 +0100
HBASE-23646 Resolved remaining Checkstyle violations in tests of hbase-rest
Signed-off-by: Viraj Jasani <vj...@apache.org>
---
.../resources/hbase/checkstyle-suppressions.xml | 2 +
.../hadoop/hbase/rest/HBaseRESTTestingUtility.java | 15 +-
.../hadoop/hbase/rest/PerformanceEvaluation.java | 68 ++--
.../apache/hadoop/hbase/rest/RowResourceBase.java | 101 ++---
.../hadoop/hbase/rest/TestMultiRowResource.java | 31 +-
.../hadoop/hbase/rest/TestScannersWithFilters.java | 415 +++++++++++----------
6 files changed, 315 insertions(+), 317 deletions(-)
diff --git a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
index a5ddb1a..b83b468 100644
--- a/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
+++ b/hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
@@ -44,4 +44,6 @@
<suppress checks="MethodLength" files="org.apache.hadoop.hbase.thrift.DemoClient.java"/>
<suppress checks="InnerAssignment" files="org.apache.hadoop.hbase.Waiter"/>
<suppress checks="EmptyBlock" files="org.apache.hadoop.hbase.TestTimeout"/>
+ <suppress checks="InnerAssignment" files="org.apache.hadoop.hbase.rest.PerformanceEvaluation"/>
+ <suppress checks="EmptyBlock" files="org.apache.hadoop.hbase.rest.PerformanceEvaluation"/>
</suppressions>
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java
index ffa1835..00b28c7 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java
@@ -25,7 +25,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class HBaseRESTTestingUtility {
-
private static final Logger LOG = LoggerFactory.getLogger(HBaseRESTTestingUtility.class);
private RESTServer server;
@@ -52,12 +51,14 @@ public class HBaseRESTTestingUtility {
}
public void shutdownServletContainer() {
- if (server != null) try {
- server.stop();
- server = null;
- RESTServlet.stop();
- } catch (Exception e) {
- LOG.warn(StringUtils.stringifyException(e));
+ if (server != null) {
+ try {
+ server.stop();
+ server = null;
+ RESTServlet.stop();
+ } catch (Exception e) {
+ LOG.warn(StringUtils.stringifyException(e));
+ }
}
}
}
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
index 0d433f2..c3f9c7c 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java
@@ -75,6 +75,7 @@ import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.Hash;
import org.apache.hadoop.hbase.util.MurmurHash;
import org.apache.hadoop.hbase.util.Pair;
+
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
@@ -91,6 +92,7 @@ import org.apache.hadoop.mapreduce.lib.reduce.LongSumReducer;
import org.apache.hadoop.util.LineReader;
import org.apache.hadoop.util.Tool;
import org.apache.hadoop.util.ToolRunner;
+
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -204,8 +206,7 @@ public class PerformanceEvaluation extends Configured implements Tool {
protected void addCommandDescriptor(Class<? extends Test> cmdClass,
String name, String description) {
- CmdDescriptor cmdDescriptor =
- new CmdDescriptor(cmdClass, name, description);
+ CmdDescriptor cmdDescriptor = new CmdDescriptor(cmdClass, name, description);
commands.put(name, cmdDescriptor);
}
@@ -335,7 +336,7 @@ public class PerformanceEvaluation extends Configured implements Tool {
// generate splits
List<InputSplit> splitList = new ArrayList<>();
- for (FileStatus file: listStatus(job)) {
+ for (FileStatus file : listStatus(job)) {
if (file.isDirectory()) {
continue;
}
@@ -344,10 +345,10 @@ public class PerformanceEvaluation extends Configured implements Tool {
FSDataInputStream fileIn = fs.open(path);
LineReader in = new LineReader(fileIn, job.getConfiguration());
int lineLen;
- while(true) {
+ while (true) {
Text lineText = new Text();
lineLen = in.readLine(lineText);
- if(lineLen <= 0) {
+ if (lineLen <= 0) {
break;
}
Matcher m = LINE_PATTERN.matcher(lineText.toString());
@@ -406,7 +407,7 @@ public class PerformanceEvaluation extends Configured implements Tool {
@Override
public boolean nextKeyValue() {
- if(readOver) {
+ if (readOver) {
return false;
}
@@ -429,7 +430,7 @@ public class PerformanceEvaluation extends Configured implements Tool {
@Override
public float getProgress() {
- if(readOver) {
+ if (readOver) {
return 1.0f;
} else {
return 0.0f;
@@ -562,7 +563,7 @@ public class PerformanceEvaluation extends Configured implements Tool {
int numSplitPoints = presplitRegions - 1;
byte[][] splits = new byte[numSplitPoints][];
int jump = this.R / this.presplitRegions;
- for (int i=0; i < numSplitPoints; i++) {
+ for (int i = 0; i < numSplitPoints; i++) {
int rowkey = jump * (1 + i);
splits[i] = format(rowkey);
}
@@ -635,11 +636,11 @@ public class PerformanceEvaluation extends Configured implements Tool {
};
threads.add(t);
}
- for (Thread t: threads) {
+ for (Thread t : threads) {
t.start();
}
- for (Thread t: threads) {
- while(t.isAlive()) {
+ for (Thread t : threads) {
+ while (t.isAlive()) {
try {
t.join();
} catch (InterruptedException e) {
@@ -708,33 +709,32 @@ public class PerformanceEvaluation extends Configured implements Tool {
FileSystem fs = FileSystem.get(c);
fs.mkdirs(inputDir);
Path inputFile = new Path(inputDir, "input.txt");
- PrintStream out = new PrintStream(fs.create(inputFile));
// Make input random.
- Map<Integer, String> m = new TreeMap<>();
- Hash h = MurmurHash.getInstance();
- int perClientRows = (this.R / this.N);
- try {
+ try (PrintStream out = new PrintStream(fs.create(inputFile))) {
+ Map<Integer, String> m = new TreeMap<>();
+ Hash h = MurmurHash.getInstance();
+ int perClientRows = (this.R / this.N);
for (int i = 0; i < 10; i++) {
for (int j = 0; j < N; j++) {
- String s = "tableName=" + this.tableName +
- ", startRow=" + ((j * perClientRows) + (i * (perClientRows/10))) +
- ", perClientRunRows=" + (perClientRows / 10) +
- ", totalRows=" + this.R +
- ", clients=" + this.N +
- ", flushCommits=" + this.flushCommits +
- ", writeToWAL=" + this.writeToWAL +
- ", useTags=" + this.useTags +
- ", noOfTags=" + this.noOfTags;
- byte[] b = Bytes.toBytes(s);
+ StringBuilder s = new StringBuilder();
+ s.append("tableName=").append(tableName);
+ s.append(", startRow=").append((j * perClientRows) + (i * (perClientRows / 10)));
+ s.append(", perClientRunRows=").append(perClientRows / 10);
+ s.append(", totalRows=").append(R);
+ s.append(", clients=").append(N);
+ s.append(", flushCommits=").append(flushCommits);
+ s.append(", writeToWAL=").append(writeToWAL);
+ s.append(", useTags=").append(useTags);
+ s.append(", noOfTags=").append(noOfTags);
+
+ byte[] b = Bytes.toBytes(s.toString());
int hash = h.hash(new ByteArrayHashKey(b, 0, b.length), -1);
- m.put(hash, s);
+ m.put(hash, s.toString());
}
}
- for (Map.Entry<Integer, String> e: m.entrySet()) {
+ for (Map.Entry<Integer, String> e : m.entrySet()) {
out.println(e.getValue());
}
- } finally {
- out.close();
}
return inputDir;
}
@@ -1198,15 +1198,9 @@ public class PerformanceEvaluation extends Configured implements Tool {
void testRow(int i) throws IOException {
byte[] value = generateValue(this.rand);
Scan scan = constructScan(value);
- ResultScanner scanner = null;
- try {
- scanner = this.table.getScanner(scan);
+ try (ResultScanner scanner = this.table.getScanner(scan)) {
while (scanner.next() != null) {
}
- } finally {
- if (scanner != null) {
- scanner.close();
- }
}
}
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/RowResourceBase.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/RowResourceBase.java
index 5ab45f8..b32acfb 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/RowResourceBase.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/RowResourceBase.java
@@ -19,6 +19,9 @@ package org.apache.hadoop.hbase.rest;
import static org.junit.Assert.assertEquals;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
+
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.StringWriter;
@@ -31,8 +34,6 @@ import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseTestingUtility;
import org.apache.hadoop.hbase.HColumnDescriptor;
@@ -52,7 +53,6 @@ import org.junit.Before;
import org.junit.BeforeClass;
public class RowResourceBase {
-
protected static final String TABLE = "TestRowResource";
protected static final TableName TABLE_NAME = TableName.valueOf(TABLE);
@@ -83,7 +83,6 @@ public class RowResourceBase {
protected static Configuration conf;
protected static ObjectMapper jsonMapper;
-
@BeforeClass
public static void setUpBeforeClass() throws Exception {
conf = TEST_UTIL.getConfiguration();
@@ -178,8 +177,8 @@ public class RowResourceBase {
assertEquals(Bytes.toString(cell.getValue()), value);
}
- protected static void checkIncrementValueXML(String table, String row, String column,
- long value) throws IOException, JAXBException {
+ protected static void checkIncrementValueXML(String table, String row, String column, long value)
+ throws IOException, JAXBException {
Response response1 = getValueXML(table, row, column);
assertEquals(200, response1.getCode());
assertEquals(Constants.MIMETYPE_XML, response1.getHeader("content-type"));
@@ -261,16 +260,17 @@ public class RowResourceBase {
assertEquals(Bytes.toLong(cell.getValue()), value);
}
- protected static Response checkAndPutValuePB(String url, String table,
- String row, String column, String valueToCheck, String valueToPut, HashMap<String,String> otherCells)
- throws IOException {
+ protected static Response checkAndPutValuePB(String url, String table, String row, String column,
+ String valueToCheck, String valueToPut, HashMap<String,String> otherCells)
+ throws IOException {
RowModel rowModel = new RowModel(row);
rowModel.addCell(new CellModel(Bytes.toBytes(column),
Bytes.toBytes(valueToPut)));
- if(otherCells != null) {
- for (Map.Entry<String,String> entry :otherCells.entrySet()) {
- rowModel.addCell(new CellModel(Bytes.toBytes(entry.getKey()), Bytes.toBytes(entry.getValue())));
+ if (otherCells != null) {
+ for (Map.Entry<String,String> entry : otherCells.entrySet()) {
+ rowModel.addCell(new CellModel(Bytes.toBytes(entry.getKey()),
+ Bytes.toBytes(entry.getValue())));
}
}
@@ -290,8 +290,10 @@ public class RowResourceBase {
String column, String valueToCheck, String valueToPut) throws IOException {
return checkAndPutValuePB(table,row,column,valueToCheck,valueToPut,null);
}
- protected static Response checkAndPutValuePB(String table, String row,
- String column, String valueToCheck, String valueToPut, HashMap<String,String> otherCells) throws IOException {
+
+ protected static Response checkAndPutValuePB(String table, String row, String column,
+ String valueToCheck, String valueToPut, HashMap<String,String> otherCells)
+ throws IOException {
StringBuilder path = new StringBuilder();
path.append('/');
path.append(table);
@@ -302,16 +304,17 @@ public class RowResourceBase {
valueToCheck, valueToPut, otherCells);
}
- protected static Response checkAndPutValueXML(String url, String table,
- String row, String column, String valueToCheck, String valueToPut, HashMap<String,String> otherCells)
- throws IOException, JAXBException {
+ protected static Response checkAndPutValueXML(String url, String table, String row, String column,
+ String valueToCheck, String valueToPut, HashMap<String,String> otherCells)
+ throws IOException, JAXBException {
RowModel rowModel = new RowModel(row);
rowModel.addCell(new CellModel(Bytes.toBytes(column),
Bytes.toBytes(valueToPut)));
- if(otherCells != null) {
- for (Map.Entry<String,String> entry :otherCells.entrySet()) {
- rowModel.addCell(new CellModel(Bytes.toBytes(entry.getKey()), Bytes.toBytes(entry.getValue())));
+ if (otherCells != null) {
+ for (Map.Entry<String,String> entry : otherCells.entrySet()) {
+ rowModel.addCell(new CellModel(Bytes.toBytes(entry.getKey()),
+ Bytes.toBytes(entry.getValue())));
}
}
@@ -328,9 +331,8 @@ public class RowResourceBase {
return response;
}
- protected static Response checkAndPutValueXML(String table, String row,
- String column, String valueToCheck, String valueToPut)
- throws IOException, JAXBException {
+ protected static Response checkAndPutValueXML(String table, String row, String column,
+ String valueToCheck, String valueToPut) throws IOException, JAXBException {
return checkAndPutValueXML(table,row,column,valueToCheck,valueToPut, null);
}
@@ -352,9 +354,10 @@ public class RowResourceBase {
throws IOException, JAXBException {
RowModel rowModel = new RowModel(row);
- if(cellsToDelete != null) {
- for (Map.Entry<String,String> entry :cellsToDelete.entrySet()) {
- rowModel.addCell(new CellModel(Bytes.toBytes(entry.getKey()), Bytes.toBytes(entry.getValue())));
+ if (cellsToDelete != null) {
+ for (Map.Entry<String,String> entry : cellsToDelete.entrySet()) {
+ rowModel.addCell(new CellModel(Bytes.toBytes(entry.getKey()),
+ Bytes.toBytes(entry.getValue())));
}
}
// Add this at the end
@@ -374,8 +377,10 @@ public class RowResourceBase {
String column, String valueToCheck) throws IOException, JAXBException {
return checkAndDeleteXML(table, row, column, valueToCheck, null);
}
+
protected static Response checkAndDeleteXML(String table, String row,
- String column, String valueToCheck, HashMap<String,String> cellsToDelete) throws IOException, JAXBException {
+ String column, String valueToCheck, HashMap<String,String> cellsToDelete)
+ throws IOException, JAXBException {
StringBuilder path = new StringBuilder();
path.append('/');
path.append(table);
@@ -386,12 +391,13 @@ public class RowResourceBase {
}
protected static Response checkAndDeleteJson(String table, String row,
- String column, String valueToCheck) throws IOException, JAXBException {
+ String column, String valueToCheck) throws IOException {
return checkAndDeleteJson(table, row, column, valueToCheck, null);
}
protected static Response checkAndDeleteJson(String table, String row,
- String column, String valueToCheck, HashMap<String,String> cellsToDelete) throws IOException, JAXBException {
+ String column, String valueToCheck, HashMap<String,String> cellsToDelete)
+ throws IOException {
StringBuilder path = new StringBuilder();
path.append('/');
path.append(table);
@@ -403,12 +409,13 @@ public class RowResourceBase {
protected static Response checkAndDeleteJson(String url, String table,
String row, String column, String valueToCheck, HashMap<String,String> cellsToDelete)
- throws IOException, JAXBException {
+ throws IOException {
RowModel rowModel = new RowModel(row);
- if(cellsToDelete != null) {
- for (Map.Entry<String,String> entry :cellsToDelete.entrySet()) {
- rowModel.addCell(new CellModel(Bytes.toBytes(entry.getKey()), Bytes.toBytes(entry.getValue())));
+ if (cellsToDelete != null) {
+ for (Map.Entry<String,String> entry : cellsToDelete.entrySet()) {
+ rowModel.addCell(new CellModel(Bytes.toBytes(entry.getKey()),
+ Bytes.toBytes(entry.getValue())));
}
}
// Add this at the end
@@ -423,9 +430,8 @@ public class RowResourceBase {
return response;
}
- protected static Response checkAndDeletePB(String table, String row,
- String column, String value) throws IOException {
-
+ protected static Response checkAndDeletePB(String table, String row, String column, String value)
+ throws IOException {
return checkAndDeletePB(table, row, column, value, null);
}
@@ -444,9 +450,10 @@ public class RowResourceBase {
throws IOException {
RowModel rowModel = new RowModel(row);
- if(cellsToDelete != null) {
- for (Map.Entry<String,String> entry :cellsToDelete.entrySet()) {
- rowModel.addCell(new CellModel(Bytes.toBytes(entry.getKey()), Bytes.toBytes(entry.getValue())));
+ if (cellsToDelete != null) {
+ for (Map.Entry<String,String> entry : cellsToDelete.entrySet()) {
+ rowModel.addCell(new CellModel(Bytes.toBytes(entry.getKey()),
+ Bytes.toBytes(entry.getValue())));
}
}
// Add this at the end
@@ -535,12 +542,12 @@ public class RowResourceBase {
}
protected static void checkValueJSON(String table, String row, String column,
- String value) throws IOException, JAXBException {
+ String value) throws IOException {
Response response = getValueJson(table, row, column);
assertEquals(200, response.getCode());
assertEquals(Constants.MIMETYPE_JSON, response.getHeader("content-type"));
- ObjectMapper mapper = new JacksonJaxbJsonProvider()
- .locateMapper(CellSetModel.class, MediaType.APPLICATION_JSON_TYPE);
+ ObjectMapper mapper = new JacksonJaxbJsonProvider().locateMapper(CellSetModel.class,
+ MediaType.APPLICATION_JSON_TYPE);
CellSetModel cellSet = mapper.readValue(response.getBody(), CellSetModel.class);
RowModel rowModel = cellSet.getRows().get(0);
CellModel cell = rowModel.getCells().get(0);
@@ -549,7 +556,7 @@ public class RowResourceBase {
}
protected static void checkIncrementValueJSON(String table, String row, String column,
- long value) throws IOException, JAXBException {
+ long value) throws IOException {
Response response = getValueJson(table, row, column);
assertEquals(200, response.getCode());
assertEquals(Constants.MIMETYPE_JSON, response.getHeader("content-type"));
@@ -563,7 +570,7 @@ public class RowResourceBase {
}
protected static Response putValueJson(String table, String row, String column,
- String value) throws IOException, JAXBException {
+ String value) throws IOException {
StringBuilder path = new StringBuilder();
path.append('/');
path.append(table);
@@ -575,7 +582,7 @@ public class RowResourceBase {
}
protected static Response putValueJson(String url, String table, String row, String column,
- String value) throws IOException, JAXBException {
+ String value) throws IOException {
RowModel rowModel = new RowModel(row);
rowModel.addCell(new CellModel(Bytes.toBytes(column),
Bytes.toBytes(value)));
@@ -600,7 +607,7 @@ public class RowResourceBase {
}
protected static Response appendValuePB(String table, String row, String column,
- String value) throws IOException, JAXBException {
+ String value) throws IOException {
StringBuilder path = new StringBuilder();
path.append('/');
path.append(table);
@@ -633,7 +640,7 @@ public class RowResourceBase {
}
protected static Response incrementValuePB(String table, String row, String column,
- String value) throws IOException, JAXBException {
+ String value) throws IOException {
StringBuilder path = new StringBuilder();
path.append('/');
path.append(table);
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestMultiRowResource.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestMultiRowResource.java
index 5d8602f..27d3f03 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestMultiRowResource.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestMultiRowResource.java
@@ -21,13 +21,14 @@ import static org.junit.Assert.assertEquals;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
+
import java.io.IOException;
import java.util.Collection;
import javax.ws.rs.core.MediaType;
import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;
+
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseClassTestRule;
import org.apache.hadoop.hbase.HBaseCommonTestingUtility;
@@ -45,8 +46,10 @@ import org.apache.hadoop.hbase.rest.model.RowModel;
import org.apache.hadoop.hbase.testclassification.MediumTests;
import org.apache.hadoop.hbase.testclassification.RestTests;
import org.apache.hadoop.hbase.util.Bytes;
+
import org.apache.http.Header;
import org.apache.http.message.BasicHeader;
+
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.ClassRule;
@@ -58,7 +61,6 @@ import org.junit.runners.Parameterized;
@Category({RestTests.class, MediumTests.class})
@RunWith(Parameterized.class)
public class TestMultiRowResource {
-
@ClassRule
public static final HBaseClassTestRule CLASS_RULE =
HBaseClassTestRule.forClass(TestMultiRowResource.class);
@@ -73,7 +75,6 @@ public class TestMultiRowResource {
private static final String ROW_2 = "testrow6";
private static final String VALUE_2 = "testvalue6";
-
private static final HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
private static final HBaseRESTTestingUtility REST_TEST_UTIL = new HBaseRESTTestingUtility();
@@ -95,7 +96,6 @@ public class TestMultiRowResource {
csrfEnabled = csrf;
}
-
@BeforeClass
public static void setUpBeforeClass() throws Exception {
conf = TEST_UTIL.getConfiguration();
@@ -129,13 +129,11 @@ public class TestMultiRowResource {
TEST_UTIL.shutdownMiniCluster();
}
-
@Test
- public void testMultiCellGetJSON() throws IOException, JAXBException {
+ public void testMultiCellGetJSON() throws IOException {
String row_5_url = "/" + TABLE + "/" + ROW_1 + "/" + COLUMN_1;
String row_6_url = "/" + TABLE + "/" + ROW_2 + "/" + COLUMN_2;
-
StringBuilder path = new StringBuilder();
path.append("/");
path.append(TABLE);
@@ -152,22 +150,19 @@ public class TestMultiRowResource {
client.post(row_5_url, Constants.MIMETYPE_BINARY, Bytes.toBytes(VALUE_1), extraHdr);
client.post(row_6_url, Constants.MIMETYPE_BINARY, Bytes.toBytes(VALUE_2), extraHdr);
-
Response response = client.get(path.toString(), Constants.MIMETYPE_JSON);
assertEquals(200, response.getCode());
assertEquals(Constants.MIMETYPE_JSON, response.getHeader("content-type"));
client.delete(row_5_url, extraHdr);
client.delete(row_6_url, extraHdr);
-
}
@Test
- public void testMultiCellGetXML() throws IOException, JAXBException {
+ public void testMultiCellGetXML() throws IOException {
String row_5_url = "/" + TABLE + "/" + ROW_1 + "/" + COLUMN_1;
String row_6_url = "/" + TABLE + "/" + ROW_2 + "/" + COLUMN_2;
-
StringBuilder path = new StringBuilder();
path.append("/");
path.append(TABLE);
@@ -179,18 +174,16 @@ public class TestMultiRowResource {
client.post(row_5_url, Constants.MIMETYPE_BINARY, Bytes.toBytes(VALUE_1), extraHdr);
client.post(row_6_url, Constants.MIMETYPE_BINARY, Bytes.toBytes(VALUE_2), extraHdr);
-
Response response = client.get(path.toString(), Constants.MIMETYPE_XML);
assertEquals(200, response.getCode());
assertEquals(Constants.MIMETYPE_XML, response.getHeader("content-type"));
client.delete(row_5_url, extraHdr);
client.delete(row_6_url, extraHdr);
-
}
@Test
- public void testMultiCellGetWithColsJSON() throws IOException, JAXBException {
+ public void testMultiCellGetWithColsJSON() throws IOException {
String row_5_url = "/" + TABLE + "/" + ROW_1 + "/" + COLUMN_1;
String row_6_url = "/" + TABLE + "/" + ROW_2 + "/" + COLUMN_2;
@@ -209,8 +202,8 @@ public class TestMultiRowResource {
Response response = client.get(path.toString(), Constants.MIMETYPE_JSON);
assertEquals(200, response.getCode());
- ObjectMapper mapper =
- new JacksonJaxbJsonProvider().locateMapper(CellSetModel.class, MediaType.APPLICATION_JSON_TYPE);
+ ObjectMapper mapper = new JacksonJaxbJsonProvider().locateMapper(CellSetModel.class,
+ MediaType.APPLICATION_JSON_TYPE);
CellSetModel cellSet = mapper.readValue(response.getBody(), CellSetModel.class);
assertEquals(2, cellSet.getRows().size());
assertEquals(ROW_1, Bytes.toString(cellSet.getRows().get(0).getKey()));
@@ -220,11 +213,10 @@ public class TestMultiRowResource {
client.delete(row_5_url, extraHdr);
client.delete(row_6_url, extraHdr);
-
}
@Test
- public void testMultiCellGetJSONNotFound() throws IOException, JAXBException {
+ public void testMultiCellGetJSONNotFound() throws IOException {
String row_5_url = "/" + TABLE + "/" + ROW_1 + "/" + COLUMN_1;
StringBuilder path = new StringBuilder();
@@ -248,7 +240,7 @@ public class TestMultiRowResource {
}
@Test
- public void testMultiCellGetWithColsInQueryPathJSON() throws IOException, JAXBException {
+ public void testMultiCellGetWithColsInQueryPathJSON() throws IOException {
String row_5_url = "/" + TABLE + "/" + ROW_1 + "/" + COLUMN_1;
String row_6_url = "/" + TABLE + "/" + ROW_2 + "/" + COLUMN_2;
@@ -280,4 +272,3 @@ public class TestMultiRowResource {
client.delete(row_6_url, extraHdr);
}
}
-
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestScannersWithFilters.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestScannersWithFilters.java
index bf7b60c..7d54888 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestScannersWithFilters.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestScannersWithFilters.java
@@ -79,7 +79,6 @@ import org.slf4j.LoggerFactory;
@Category({RestTests.class, MediumTests.class})
public class TestScannersWithFilters {
-
@ClassRule
public static final HBaseClassTestRule CLASS_RULE =
HBaseClassTestRule.forClass(TestScannersWithFilters.class);
@@ -88,31 +87,31 @@ public class TestScannersWithFilters {
private static final TableName TABLE = TableName.valueOf("TestScannersWithFilters");
- private static final byte [][] ROWS_ONE = {
+ private static final byte[][] ROWS_ONE = {
Bytes.toBytes("testRowOne-0"), Bytes.toBytes("testRowOne-1"),
Bytes.toBytes("testRowOne-2"), Bytes.toBytes("testRowOne-3")
};
- private static final byte [][] ROWS_TWO = {
+ private static final byte[][] ROWS_TWO = {
Bytes.toBytes("testRowTwo-0"), Bytes.toBytes("testRowTwo-1"),
Bytes.toBytes("testRowTwo-2"), Bytes.toBytes("testRowTwo-3")
};
- private static final byte [][] FAMILIES = {
+ private static final byte[][] FAMILIES = {
Bytes.toBytes("testFamilyOne"), Bytes.toBytes("testFamilyTwo")
};
- private static final byte [][] QUALIFIERS_ONE = {
+ private static final byte[][] QUALIFIERS_ONE = {
Bytes.toBytes("testQualifierOne-0"), Bytes.toBytes("testQualifierOne-1"),
Bytes.toBytes("testQualifierOne-2"), Bytes.toBytes("testQualifierOne-3")
};
- private static final byte [][] QUALIFIERS_TWO = {
+ private static final byte[][] QUALIFIERS_TWO = {
Bytes.toBytes("testQualifierTwo-0"), Bytes.toBytes("testQualifierTwo-1"),
Bytes.toBytes("testQualifierTwo-2"), Bytes.toBytes("testQualifierTwo-3")
};
- private static final byte [][] VALUES = {
+ private static final byte[][] VALUES = {
Bytes.toBytes("testValueOne"), Bytes.toBytes("testValueTwo")
};
@@ -147,49 +146,49 @@ public class TestScannersWithFilters {
admin.createTable(htd);
Table table = TEST_UTIL.getConnection().getTable(TABLE);
// Insert first half
- for(byte [] ROW : ROWS_ONE) {
+ for (byte[] ROW : ROWS_ONE) {
Put p = new Put(ROW);
p.setDurability(Durability.SKIP_WAL);
- for(byte [] QUALIFIER : QUALIFIERS_ONE) {
+ for (byte[] QUALIFIER : QUALIFIERS_ONE) {
p.addColumn(FAMILIES[0], QUALIFIER, VALUES[0]);
}
table.put(p);
}
- for(byte [] ROW : ROWS_TWO) {
+ for (byte[] ROW : ROWS_TWO) {
Put p = new Put(ROW);
p.setDurability(Durability.SKIP_WAL);
- for(byte [] QUALIFIER : QUALIFIERS_TWO) {
+ for (byte[] QUALIFIER : QUALIFIERS_TWO) {
p.addColumn(FAMILIES[1], QUALIFIER, VALUES[1]);
}
table.put(p);
}
// Insert second half (reverse families)
- for(byte [] ROW : ROWS_ONE) {
+ for (byte[] ROW : ROWS_ONE) {
Put p = new Put(ROW);
p.setDurability(Durability.SKIP_WAL);
- for(byte [] QUALIFIER : QUALIFIERS_ONE) {
+ for (byte[] QUALIFIER : QUALIFIERS_ONE) {
p.addColumn(FAMILIES[1], QUALIFIER, VALUES[0]);
}
table.put(p);
}
- for(byte [] ROW : ROWS_TWO) {
+ for (byte[] ROW : ROWS_TWO) {
Put p = new Put(ROW);
p.setDurability(Durability.SKIP_WAL);
- for(byte [] QUALIFIER : QUALIFIERS_TWO) {
+ for (byte[] QUALIFIER : QUALIFIERS_TWO) {
p.addColumn(FAMILIES[0], QUALIFIER, VALUES[1]);
}
table.put(p);
}
// Delete the second qualifier from all rows and families
- for(byte [] ROW : ROWS_ONE) {
+ for (byte[] ROW : ROWS_ONE) {
Delete d = new Delete(ROW);
d.addColumns(FAMILIES[0], QUALIFIERS_ONE[1]);
d.addColumns(FAMILIES[1], QUALIFIERS_ONE[1]);
table.delete(d);
}
- for(byte [] ROW : ROWS_TWO) {
+ for (byte[] ROW : ROWS_TWO) {
Delete d = new Delete(ROW);
d.addColumns(FAMILIES[0], QUALIFIERS_TWO[1]);
d.addColumns(FAMILIES[1], QUALIFIERS_TWO[1]);
@@ -198,13 +197,13 @@ public class TestScannersWithFilters {
colsPerRow -= 2;
// Delete the second rows from both groups, one column at a time
- for(byte [] QUALIFIER : QUALIFIERS_ONE) {
+ for (byte[] QUALIFIER : QUALIFIERS_ONE) {
Delete d = new Delete(ROWS_ONE[1]);
d.addColumns(FAMILIES[0], QUALIFIER);
d.addColumns(FAMILIES[1], QUALIFIER);
table.delete(d);
}
- for(byte [] QUALIFIER : QUALIFIERS_TWO) {
+ for (byte[] QUALIFIER : QUALIFIERS_TWO) {
Delete d = new Delete(ROWS_TWO[1]);
d.addColumns(FAMILIES[0], QUALIFIER);
d.addColumns(FAMILIES[1], QUALIFIER);
@@ -243,9 +242,9 @@ public class TestScannersWithFilters {
unmarshaller.unmarshal(new ByteArrayInputStream(response.getBody()));
int rows = cells.getRows().size();
- assertTrue("Scanned too many rows! Only expected " + expectedRows +
- " total but scanned " + rows, expectedRows == rows);
- for (RowModel row: cells.getRows()) {
+ assertEquals("Scanned too many rows! Only expected " + expectedRows +
+ " total but scanned " + rows, expectedRows, rows);
+ for (RowModel row : cells.getRows()) {
int count = row.getCells().size();
assertEquals("Expected " + expectedKeys + " keys per row but " +
"returned " + count, expectedKeys, count);
@@ -256,8 +255,7 @@ public class TestScannersWithFilters {
assertEquals(200, response.getCode());
}
- private static void verifyScanFull(Scan s, KeyValue [] kvs)
- throws Exception {
+ private static void verifyScanFull(Scan s, KeyValue [] kvs) throws Exception {
ScannerModel model = ScannerModel.fromScan(s);
model.setBatch(Integer.MAX_VALUE); // fetch it all at once
StringWriter writer = new StringWriter();
@@ -286,10 +284,16 @@ public class TestScannersWithFilters {
Iterator<RowModel> i = cellSet.getRows().iterator();
for (boolean done = true; done; row++) {
done = i.hasNext();
- if (!done) break;
+ if (!done) {
+ break;
+ }
+
RowModel rowModel = i.next();
List<CellModel> cells = rowModel.getCells();
- if (cells.isEmpty()) break;
+ if (cells.isEmpty()) {
+ break;
+ }
+
assertTrue("Scanned too many keys! Only expected " + kvs.length +
" total but already scanned " + (cells.size() + idx),
kvs.length >= idx + cells.size());
@@ -339,10 +343,16 @@ public class TestScannersWithFilters {
int j = 0;
for (boolean done = true; done; j++) {
done = i.hasNext();
- if (!done) break;
+ if (!done) {
+ break;
+ }
+
RowModel rowModel = i.next();
List<CellModel> cells = rowModel.getCells();
- if (cells.isEmpty()) break;
+ if (cells.isEmpty()) {
+ break;
+ }
+
assertTrue("Scanned too many rows! Only expected " + expectedRows +
" total but already scanned " + (j+1), expectedRows > j);
assertEquals("Expected " + expectedKeys + " keys per row but " +
@@ -517,8 +527,7 @@ public class TestScannersWithFilters {
s.setFilter(f);
verifyScanNoEarlyOut(s, expectedRows, expectedKeys);
- // Match keys less than or equal
- // Expect four keys (two from each family) in half the rows
+ // Match keys less than or equal. Expect four keys (two from each family) in half the rows
expectedRows = numRows / 2;
expectedKeys = 4;
f = new QualifierFilter(CompareOperator.LESS_OR_EQUAL,
@@ -527,8 +536,7 @@ public class TestScannersWithFilters {
s.setFilter(f);
verifyScanNoEarlyOut(s, expectedRows, expectedKeys);
- // Match keys not equal
- // Expect four keys (two from each family)
+ // Match keys not equal. Expect four keys (two from each family)
// Only look in first group of rows
expectedRows = numRows / 2;
expectedKeys = 4;
@@ -538,8 +546,7 @@ public class TestScannersWithFilters {
s.setFilter(f);
verifyScanNoEarlyOut(s, expectedRows, expectedKeys);
- // Match keys greater or equal
- // Expect four keys (two from each family)
+ // Match keys greater or equal. Expect four keys (two from each family)
// Only look in first group of rows
expectedRows = numRows / 2;
expectedKeys = 4;
@@ -549,8 +556,7 @@ public class TestScannersWithFilters {
s.setFilter(f);
verifyScanNoEarlyOut(s, expectedRows, expectedKeys);
- // Match keys greater
- // Expect two keys (one from each family)
+ // Match keys greater. Expect two keys (one from each family)
// Only look in first group of rows
expectedRows = numRows / 2;
expectedKeys = 2;
@@ -560,57 +566,54 @@ public class TestScannersWithFilters {
s.setFilter(f);
verifyScanNoEarlyOut(s, expectedRows, expectedKeys);
- // Match keys not equal to
- // Look across rows and fully validate the keys and ordering
- // Expect varied numbers of keys, 4 per row in group one, 6 per row in
- // group two
+ // Match keys not equal to. Look across rows and fully validate the keys and ordering
+ // Expect varied numbers of keys, 4 per row in group one, 6 per row in group two
f = new QualifierFilter(CompareOperator.NOT_EQUAL,
new BinaryComparator(QUALIFIERS_ONE[2]));
s = new Scan();
s.setFilter(f);
KeyValue [] kvs = {
- // testRowOne-0
- new KeyValue(ROWS_ONE[0], FAMILIES[0], QUALIFIERS_ONE[0], VALUES[0]),
- new KeyValue(ROWS_ONE[0], FAMILIES[0], QUALIFIERS_ONE[3], VALUES[0]),
- new KeyValue(ROWS_ONE[0], FAMILIES[1], QUALIFIERS_ONE[0], VALUES[0]),
- new KeyValue(ROWS_ONE[0], FAMILIES[1], QUALIFIERS_ONE[3], VALUES[0]),
- // testRowOne-2
- new KeyValue(ROWS_ONE[2], FAMILIES[0], QUALIFIERS_ONE[0], VALUES[0]),
- new KeyValue(ROWS_ONE[2], FAMILIES[0], QUALIFIERS_ONE[3], VALUES[0]),
- new KeyValue(ROWS_ONE[2], FAMILIES[1], QUALIFIERS_ONE[0], VALUES[0]),
- new KeyValue(ROWS_ONE[2], FAMILIES[1], QUALIFIERS_ONE[3], VALUES[0]),
- // testRowOne-3
- new KeyValue(ROWS_ONE[3], FAMILIES[0], QUALIFIERS_ONE[0], VALUES[0]),
- new KeyValue(ROWS_ONE[3], FAMILIES[0], QUALIFIERS_ONE[3], VALUES[0]),
- new KeyValue(ROWS_ONE[3], FAMILIES[1], QUALIFIERS_ONE[0], VALUES[0]),
- new KeyValue(ROWS_ONE[3], FAMILIES[1], QUALIFIERS_ONE[3], VALUES[0]),
- // testRowTwo-0
- new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[2], VALUES[1]),
- new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
- new KeyValue(ROWS_TWO[0], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[0], FAMILIES[1], QUALIFIERS_TWO[2], VALUES[1]),
- new KeyValue(ROWS_TWO[0], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
- // testRowTwo-2
- new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[2], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[2], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
- // testRowTwo-3
- new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[2], VALUES[1]),
- new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
- new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[2], VALUES[1]),
- new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
+ // testRowOne-0
+ new KeyValue(ROWS_ONE[0], FAMILIES[0], QUALIFIERS_ONE[0], VALUES[0]),
+ new KeyValue(ROWS_ONE[0], FAMILIES[0], QUALIFIERS_ONE[3], VALUES[0]),
+ new KeyValue(ROWS_ONE[0], FAMILIES[1], QUALIFIERS_ONE[0], VALUES[0]),
+ new KeyValue(ROWS_ONE[0], FAMILIES[1], QUALIFIERS_ONE[3], VALUES[0]),
+ // testRowOne-2
+ new KeyValue(ROWS_ONE[2], FAMILIES[0], QUALIFIERS_ONE[0], VALUES[0]),
+ new KeyValue(ROWS_ONE[2], FAMILIES[0], QUALIFIERS_ONE[3], VALUES[0]),
+ new KeyValue(ROWS_ONE[2], FAMILIES[1], QUALIFIERS_ONE[0], VALUES[0]),
+ new KeyValue(ROWS_ONE[2], FAMILIES[1], QUALIFIERS_ONE[3], VALUES[0]),
+ // testRowOne-3
+ new KeyValue(ROWS_ONE[3], FAMILIES[0], QUALIFIERS_ONE[0], VALUES[0]),
+ new KeyValue(ROWS_ONE[3], FAMILIES[0], QUALIFIERS_ONE[3], VALUES[0]),
+ new KeyValue(ROWS_ONE[3], FAMILIES[1], QUALIFIERS_ONE[0], VALUES[0]),
+ new KeyValue(ROWS_ONE[3], FAMILIES[1], QUALIFIERS_ONE[3], VALUES[0]),
+ // testRowTwo-0
+ new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[2], VALUES[1]),
+ new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
+ new KeyValue(ROWS_TWO[0], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[0], FAMILIES[1], QUALIFIERS_TWO[2], VALUES[1]),
+ new KeyValue(ROWS_TWO[0], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
+ // testRowTwo-2
+ new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[2], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[2], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
+ // testRowTwo-3
+ new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[2], VALUES[1]),
+ new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
+ new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[2], VALUES[1]),
+ new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
};
verifyScanFull(s, kvs);
- // Test across rows and groups with a regex
- // Filter out "test*-2"
+ // Test across rows and groups with a regex. Filter out "test*-2"
// Expect 4 keys per row across both groups
f = new QualifierFilter(CompareOperator.NOT_EQUAL,
new RegexStringComparator("test.+-2"));
@@ -618,36 +621,36 @@ public class TestScannersWithFilters {
s.setFilter(f);
kvs = new KeyValue [] {
- // testRowOne-0
- new KeyValue(ROWS_ONE[0], FAMILIES[0], QUALIFIERS_ONE[0], VALUES[0]),
- new KeyValue(ROWS_ONE[0], FAMILIES[0], QUALIFIERS_ONE[3], VALUES[0]),
- new KeyValue(ROWS_ONE[0], FAMILIES[1], QUALIFIERS_ONE[0], VALUES[0]),
- new KeyValue(ROWS_ONE[0], FAMILIES[1], QUALIFIERS_ONE[3], VALUES[0]),
- // testRowOne-2
- new KeyValue(ROWS_ONE[2], FAMILIES[0], QUALIFIERS_ONE[0], VALUES[0]),
- new KeyValue(ROWS_ONE[2], FAMILIES[0], QUALIFIERS_ONE[3], VALUES[0]),
- new KeyValue(ROWS_ONE[2], FAMILIES[1], QUALIFIERS_ONE[0], VALUES[0]),
- new KeyValue(ROWS_ONE[2], FAMILIES[1], QUALIFIERS_ONE[3], VALUES[0]),
- // testRowOne-3
- new KeyValue(ROWS_ONE[3], FAMILIES[0], QUALIFIERS_ONE[0], VALUES[0]),
- new KeyValue(ROWS_ONE[3], FAMILIES[0], QUALIFIERS_ONE[3], VALUES[0]),
- new KeyValue(ROWS_ONE[3], FAMILIES[1], QUALIFIERS_ONE[0], VALUES[0]),
- new KeyValue(ROWS_ONE[3], FAMILIES[1], QUALIFIERS_ONE[3], VALUES[0]),
- // testRowTwo-0
- new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
- new KeyValue(ROWS_TWO[0], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[0], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
- // testRowTwo-2
- new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
- // testRowTwo-3
- new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
- new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
+ // testRowOne-0
+ new KeyValue(ROWS_ONE[0], FAMILIES[0], QUALIFIERS_ONE[0], VALUES[0]),
+ new KeyValue(ROWS_ONE[0], FAMILIES[0], QUALIFIERS_ONE[3], VALUES[0]),
+ new KeyValue(ROWS_ONE[0], FAMILIES[1], QUALIFIERS_ONE[0], VALUES[0]),
+ new KeyValue(ROWS_ONE[0], FAMILIES[1], QUALIFIERS_ONE[3], VALUES[0]),
+ // testRowOne-2
+ new KeyValue(ROWS_ONE[2], FAMILIES[0], QUALIFIERS_ONE[0], VALUES[0]),
+ new KeyValue(ROWS_ONE[2], FAMILIES[0], QUALIFIERS_ONE[3], VALUES[0]),
+ new KeyValue(ROWS_ONE[2], FAMILIES[1], QUALIFIERS_ONE[0], VALUES[0]),
+ new KeyValue(ROWS_ONE[2], FAMILIES[1], QUALIFIERS_ONE[3], VALUES[0]),
+ // testRowOne-3
+ new KeyValue(ROWS_ONE[3], FAMILIES[0], QUALIFIERS_ONE[0], VALUES[0]),
+ new KeyValue(ROWS_ONE[3], FAMILIES[0], QUALIFIERS_ONE[3], VALUES[0]),
+ new KeyValue(ROWS_ONE[3], FAMILIES[1], QUALIFIERS_ONE[0], VALUES[0]),
+ new KeyValue(ROWS_ONE[3], FAMILIES[1], QUALIFIERS_ONE[3], VALUES[0]),
+ // testRowTwo-0
+ new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
+ new KeyValue(ROWS_TWO[0], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[0], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
+ // testRowTwo-2
+ new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
+ // testRowTwo-3
+ new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
+ new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
};
verifyScanFull(s, kvs);
}
@@ -731,41 +734,41 @@ public class TestScannersWithFilters {
s.setFilter(f);
KeyValue [] kvs = {
- // testRowOne-0
- new KeyValue(ROWS_ONE[0], FAMILIES[0], QUALIFIERS_ONE[0], VALUES[0]),
- new KeyValue(ROWS_ONE[0], FAMILIES[0], QUALIFIERS_ONE[2], VALUES[0]),
- new KeyValue(ROWS_ONE[0], FAMILIES[0], QUALIFIERS_ONE[3], VALUES[0]),
- new KeyValue(ROWS_ONE[0], FAMILIES[1], QUALIFIERS_ONE[0], VALUES[0]),
- new KeyValue(ROWS_ONE[0], FAMILIES[1], QUALIFIERS_ONE[2], VALUES[0]),
- new KeyValue(ROWS_ONE[0], FAMILIES[1], QUALIFIERS_ONE[3], VALUES[0]),
- // testRowOne-3
- new KeyValue(ROWS_ONE[3], FAMILIES[0], QUALIFIERS_ONE[0], VALUES[0]),
- new KeyValue(ROWS_ONE[3], FAMILIES[0], QUALIFIERS_ONE[2], VALUES[0]),
- new KeyValue(ROWS_ONE[3], FAMILIES[0], QUALIFIERS_ONE[3], VALUES[0]),
- new KeyValue(ROWS_ONE[3], FAMILIES[1], QUALIFIERS_ONE[0], VALUES[0]),
- new KeyValue(ROWS_ONE[3], FAMILIES[1], QUALIFIERS_ONE[2], VALUES[0]),
- new KeyValue(ROWS_ONE[3], FAMILIES[1], QUALIFIERS_ONE[3], VALUES[0]),
- // testRowTwo-0
- new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[2], VALUES[1]),
- new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
- new KeyValue(ROWS_TWO[0], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[0], FAMILIES[1], QUALIFIERS_TWO[2], VALUES[1]),
- new KeyValue(ROWS_TWO[0], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
- // testRowTwo-2
- new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[2], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[2], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
- // testRowTwo-3
- new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[2], VALUES[1]),
- new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
- new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[2], VALUES[1]),
- new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
+ // testRowOne-0
+ new KeyValue(ROWS_ONE[0], FAMILIES[0], QUALIFIERS_ONE[0], VALUES[0]),
+ new KeyValue(ROWS_ONE[0], FAMILIES[0], QUALIFIERS_ONE[2], VALUES[0]),
+ new KeyValue(ROWS_ONE[0], FAMILIES[0], QUALIFIERS_ONE[3], VALUES[0]),
+ new KeyValue(ROWS_ONE[0], FAMILIES[1], QUALIFIERS_ONE[0], VALUES[0]),
+ new KeyValue(ROWS_ONE[0], FAMILIES[1], QUALIFIERS_ONE[2], VALUES[0]),
+ new KeyValue(ROWS_ONE[0], FAMILIES[1], QUALIFIERS_ONE[3], VALUES[0]),
+ // testRowOne-3
+ new KeyValue(ROWS_ONE[3], FAMILIES[0], QUALIFIERS_ONE[0], VALUES[0]),
+ new KeyValue(ROWS_ONE[3], FAMILIES[0], QUALIFIERS_ONE[2], VALUES[0]),
+ new KeyValue(ROWS_ONE[3], FAMILIES[0], QUALIFIERS_ONE[3], VALUES[0]),
+ new KeyValue(ROWS_ONE[3], FAMILIES[1], QUALIFIERS_ONE[0], VALUES[0]),
+ new KeyValue(ROWS_ONE[3], FAMILIES[1], QUALIFIERS_ONE[2], VALUES[0]),
+ new KeyValue(ROWS_ONE[3], FAMILIES[1], QUALIFIERS_ONE[3], VALUES[0]),
+ // testRowTwo-0
+ new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[2], VALUES[1]),
+ new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
+ new KeyValue(ROWS_TWO[0], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[0], FAMILIES[1], QUALIFIERS_TWO[2], VALUES[1]),
+ new KeyValue(ROWS_TWO[0], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
+ // testRowTwo-2
+ new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[2], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[2], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
+ // testRowTwo-3
+ new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[2], VALUES[1]),
+ new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
+ new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[2], VALUES[1]),
+ new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
};
verifyScanFull(s, kvs);
@@ -778,20 +781,20 @@ public class TestScannersWithFilters {
s.setFilter(f);
kvs = new KeyValue [] {
- // testRowOne-2
- new KeyValue(ROWS_ONE[2], FAMILIES[0], QUALIFIERS_ONE[0], VALUES[0]),
- new KeyValue(ROWS_ONE[2], FAMILIES[0], QUALIFIERS_ONE[2], VALUES[0]),
- new KeyValue(ROWS_ONE[2], FAMILIES[0], QUALIFIERS_ONE[3], VALUES[0]),
- new KeyValue(ROWS_ONE[2], FAMILIES[1], QUALIFIERS_ONE[0], VALUES[0]),
- new KeyValue(ROWS_ONE[2], FAMILIES[1], QUALIFIERS_ONE[2], VALUES[0]),
- new KeyValue(ROWS_ONE[2], FAMILIES[1], QUALIFIERS_ONE[3], VALUES[0]),
- // testRowTwo-2
- new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[2], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[2], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1])
+ // testRowOne-2
+ new KeyValue(ROWS_ONE[2], FAMILIES[0], QUALIFIERS_ONE[0], VALUES[0]),
+ new KeyValue(ROWS_ONE[2], FAMILIES[0], QUALIFIERS_ONE[2], VALUES[0]),
+ new KeyValue(ROWS_ONE[2], FAMILIES[0], QUALIFIERS_ONE[3], VALUES[0]),
+ new KeyValue(ROWS_ONE[2], FAMILIES[1], QUALIFIERS_ONE[0], VALUES[0]),
+ new KeyValue(ROWS_ONE[2], FAMILIES[1], QUALIFIERS_ONE[2], VALUES[0]),
+ new KeyValue(ROWS_ONE[2], FAMILIES[1], QUALIFIERS_ONE[3], VALUES[0]),
+ // testRowTwo-2
+ new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[2], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[2], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1])
};
verifyScanFull(s, kvs);
}
@@ -894,27 +897,27 @@ public class TestScannersWithFilters {
s.setFilter(f);
KeyValue [] kvs = {
- // testRowTwo-0
- new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[2], VALUES[1]),
- new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
- new KeyValue(ROWS_TWO[0], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[0], FAMILIES[1], QUALIFIERS_TWO[2], VALUES[1]),
- new KeyValue(ROWS_TWO[0], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
- // testRowTwo-2
- new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[2], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[2], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
- // testRowTwo-3
- new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[2], VALUES[1]),
- new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
- new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[2], VALUES[1]),
- new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
+ // testRowTwo-0
+ new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[2], VALUES[1]),
+ new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
+ new KeyValue(ROWS_TWO[0], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[0], FAMILIES[1], QUALIFIERS_TWO[2], VALUES[1]),
+ new KeyValue(ROWS_TWO[0], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
+ // testRowTwo-2
+ new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[2], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[2], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
+ // testRowTwo-3
+ new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[2], VALUES[1]),
+ new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
+ new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[2], VALUES[1]),
+ new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
};
verifyScanFull(s, kvs);
}
@@ -929,27 +932,27 @@ public class TestScannersWithFilters {
s.setFilter(f);
KeyValue [] kvs = {
- // testRowTwo-0
- new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[2], VALUES[1]),
- new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
- new KeyValue(ROWS_TWO[0], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[0], FAMILIES[1], QUALIFIERS_TWO[2], VALUES[1]),
- new KeyValue(ROWS_TWO[0], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
- // testRowTwo-2
- new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[2], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[2], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
- // testRowTwo-3
- new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[2], VALUES[1]),
- new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
- new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[2], VALUES[1]),
- new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
+ // testRowTwo-0
+ new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[2], VALUES[1]),
+ new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
+ new KeyValue(ROWS_TWO[0], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[0], FAMILIES[1], QUALIFIERS_TWO[2], VALUES[1]),
+ new KeyValue(ROWS_TWO[0], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
+ // testRowTwo-2
+ new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[2], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[2], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
+ // testRowTwo-3
+ new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[2], VALUES[1]),
+ new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[3], VALUES[1]),
+ new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[2], VALUES[1]),
+ new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
};
verifyScanFull(s, kvs);
}
@@ -971,7 +974,7 @@ public class TestScannersWithFilters {
s.addFamily(FAMILIES[0]);
s.setFilter(f);
KeyValue [] kvs = {
- new KeyValue(ROWS_ONE[2], FAMILIES[0], QUALIFIERS_ONE[2], VALUES[0])
+ new KeyValue(ROWS_ONE[2], FAMILIES[0], QUALIFIERS_ONE[2], VALUES[0])
};
verifyScanFull(s, kvs);
@@ -996,12 +999,12 @@ public class TestScannersWithFilters {
s.setFilter(new FirstKeyOnlyFilter());
// Expected KVs, the first KV from each of the remaining 6 rows
KeyValue [] kvs = {
- new KeyValue(ROWS_ONE[0], FAMILIES[0], QUALIFIERS_ONE[0], VALUES[0]),
- new KeyValue(ROWS_ONE[2], FAMILIES[0], QUALIFIERS_ONE[0], VALUES[0]),
- new KeyValue(ROWS_ONE[3], FAMILIES[0], QUALIFIERS_ONE[0], VALUES[0]),
- new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
- new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1])
+ new KeyValue(ROWS_ONE[0], FAMILIES[0], QUALIFIERS_ONE[0], VALUES[0]),
+ new KeyValue(ROWS_ONE[2], FAMILIES[0], QUALIFIERS_ONE[0], VALUES[0]),
+ new KeyValue(ROWS_ONE[3], FAMILIES[0], QUALIFIERS_ONE[0], VALUES[0]),
+ new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[2], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
+ new KeyValue(ROWS_TWO[3], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1])
};
verifyScanFull(s, kvs);
}