hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bus...@apache.org
Subject [18/50] [abbrv] hbase git commit: HBASE-18769 Make CompareFilter use generic CompareOperator instead of internal enum
Date Mon, 11 Sep 2017 07:42:45 GMT
http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e0a839/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java
index 38e292c..b74bb14 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java
@@ -18,6 +18,7 @@
 
 package org.apache.hadoop.hbase.security.access;
 
+import org.apache.hadoop.hbase.CompareOperator;
 import org.apache.hadoop.hbase.shaded.com.google.common.collect.ArrayListMultimap;
 import org.apache.hadoop.hbase.shaded.com.google.common.collect.ListMultimap;
 import org.apache.hadoop.hbase.shaded.com.google.common.collect.Lists;
@@ -323,7 +324,7 @@ public class AccessControlLists {
     scan.addFamily(ACL_LIST_FAMILY);
 
     String columnName = Bytes.toString(column);
-    scan.setFilter(new QualifierFilter(CompareOp.EQUAL, new RegexStringComparator(
+    scan.setFilter(new QualifierFilter(CompareOperator.EQUAL, new RegexStringComparator(
         String.format("(%s%s%s)|(%s%s)$",
             ACL_KEY_DELIMITER, columnName, ACL_KEY_DELIMITER,
             ACL_KEY_DELIMITER, columnName))));

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e0a839/hbase-server/src/test/java/org/apache/hadoop/hbase/TestSerialization.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestSerialization.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestSerialization.java
index be033e9..e3c1df3 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestSerialization.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestSerialization.java
@@ -131,7 +131,7 @@ public class TestSerialization {
   }
 
   @Test public void testCompareFilter() throws Exception {
-    Filter f = new RowFilter(CompareOp.EQUAL,
+    Filter f = new RowFilter(CompareOperator.EQUAL,
       new BinaryComparator(Bytes.toBytes("testRowOne-2")));
     byte [] bytes = f.toByteArray();
     Filter ff = RowFilter.parseFrom(bytes);

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e0a839/hbase-server/src/test/java/org/apache/hadoop/hbase/TestServerSideScanMetricsFromClientSide.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestServerSideScanMetricsFromClientSide.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestServerSideScanMetricsFromClientSide.java
index 370d3d8..7c0e471 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestServerSideScanMetricsFromClientSide.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestServerSideScanMetricsFromClientSide.java
@@ -205,21 +205,21 @@ public class TestServerSideScanMetricsFromClientSide {
     }
 
     // The filter should filter out all rows, but we still expect to see every row.
-    Filter filter = new RowFilter(CompareOp.EQUAL, new BinaryComparator("xyz".getBytes()));
+    Filter filter = new RowFilter(CompareOperator.EQUAL, new BinaryComparator("xyz".getBytes()));
     scan = new Scan(baseScan);
     scan.setFilter(filter);
     testMetric(scan, ServerSideScanMetrics.COUNT_OF_ROWS_SCANNED_KEY_METRIC_NAME, ROWS.length);
 
     // Filter should pass on all rows
     SingleColumnValueFilter singleColumnValueFilter =
-        new SingleColumnValueFilter(FAMILIES[0], QUALIFIERS[0], CompareOp.EQUAL, VALUE);
+        new SingleColumnValueFilter(FAMILIES[0], QUALIFIERS[0], CompareOperator.EQUAL, VALUE);
     scan = new Scan(baseScan);
     scan.setFilter(singleColumnValueFilter);
     testMetric(scan, ServerSideScanMetrics.COUNT_OF_ROWS_SCANNED_KEY_METRIC_NAME, ROWS.length);
 
     // Filter should filter out all rows
     singleColumnValueFilter =
-        new SingleColumnValueFilter(FAMILIES[0], QUALIFIERS[0], CompareOp.NOT_EQUAL, VALUE);
+        new SingleColumnValueFilter(FAMILIES[0], QUALIFIERS[0], CompareOperator.NOT_EQUAL, VALUE);
     scan = new Scan(baseScan);
     scan.setFilter(singleColumnValueFilter);
     testMetric(scan, ServerSideScanMetrics.COUNT_OF_ROWS_SCANNED_KEY_METRIC_NAME, ROWS.length);
@@ -255,7 +255,7 @@ public class TestServerSideScanMetricsFromClientSide {
     testRowsFilteredMetric(baseScan, null, 0);
 
     // Row filter doesn't match any row key. All rows should be filtered
-    Filter filter = new RowFilter(CompareOp.EQUAL, new BinaryComparator("xyz".getBytes()));
+    Filter filter = new RowFilter(CompareOperator.EQUAL, new BinaryComparator("xyz".getBytes()));
     testRowsFilteredMetric(baseScan, filter, ROWS.length);
 
     // Filter will return results containing only the first key. Number of entire rows filtered
@@ -273,16 +273,17 @@ public class TestServerSideScanMetricsFromClientSide {
     testRowsFilteredMetric(baseScan, filter, ROWS.length);
 
     // Matching column value should exist in each row. No rows should be filtered.
-    filter = new SingleColumnValueFilter(FAMILIES[0], QUALIFIERS[0], CompareOp.EQUAL, VALUE);
+    filter = new SingleColumnValueFilter(FAMILIES[0], QUALIFIERS[0], CompareOperator.EQUAL, VALUE);
     testRowsFilteredMetric(baseScan, filter, 0);
 
     // No matching column value should exist in any row. Filter all rows
-    filter = new SingleColumnValueFilter(FAMILIES[0], QUALIFIERS[0], CompareOp.NOT_EQUAL, VALUE);
+    filter = new SingleColumnValueFilter(FAMILIES[0], QUALIFIERS[0],
+      CompareOperator.NOT_EQUAL, VALUE);
     testRowsFilteredMetric(baseScan, filter, ROWS.length);
 
     List<Filter> filters = new ArrayList<>();
-    filters.add(new RowFilter(CompareOp.EQUAL, new BinaryComparator(ROWS[0])));
-    filters.add(new RowFilter(CompareOp.EQUAL, new BinaryComparator(ROWS[3])));
+    filters.add(new RowFilter(CompareOperator.EQUAL, new BinaryComparator(ROWS[0])));
+    filters.add(new RowFilter(CompareOperator.EQUAL, new BinaryComparator(ROWS[3])));
     int numberOfMatchingRowFilters = filters.size();
     filter = new FilterList(Operator.MUST_PASS_ONE, filters);
     testRowsFilteredMetric(baseScan, filter, ROWS.length - numberOfMatchingRowFilters);
@@ -294,7 +295,7 @@ public class TestServerSideScanMetricsFromClientSide {
     for (int family = 0; family < FAMILIES.length; family++) {
       for (int qualifier = 0; qualifier < QUALIFIERS.length; qualifier++) {
         filters.add(new SingleColumnValueExcludeFilter(FAMILIES[family], QUALIFIERS[qualifier],
-            CompareOp.EQUAL, VALUE));
+          CompareOperator.EQUAL, VALUE));
       }
     }
     filter = new FilterList(Operator.MUST_PASS_ONE, filters);

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e0a839/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestCheckAndMutate.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestCheckAndMutate.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestCheckAndMutate.java
index 5c3114e..09e76b0 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestCheckAndMutate.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestCheckAndMutate.java
@@ -132,7 +132,7 @@ public class TestCheckAndMutate {
       // put the same row again with C column deleted
       RowMutations rm = makeRowMutationsWithColumnCDeleted();
       boolean res = table.checkAndMutate(ROWKEY, FAMILY, Bytes.toBytes("A"),
-        CompareFilter.CompareOp.EQUAL, Bytes.toBytes("a"), rm);
+        CompareOperator.EQUAL, Bytes.toBytes("a"), rm);
       assertTrue(res);
 
       // get row back and assert the values
@@ -141,7 +141,7 @@ public class TestCheckAndMutate {
       //Test that we get a region level exception
       try {
         rm = getBogusRowMutations();
-        table.checkAndMutate(ROWKEY, FAMILY, Bytes.toBytes("A"), CompareFilter.CompareOp.EQUAL,
+        table.checkAndMutate(ROWKEY, FAMILY, Bytes.toBytes("A"), CompareOperator.EQUAL,
             Bytes.toBytes("a"), rm);
         fail("Expected NoSuchColumnFamilyException");
       } catch (RetriesExhaustedWithDetailsException e) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e0a839/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 feedef7..a898abb 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
@@ -53,6 +53,7 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CellUtil;
+import org.apache.hadoop.hbase.CompareOperator;
 import org.apache.hadoop.hbase.DoNotRetryIOException;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.HColumnDescriptor;
@@ -453,7 +454,7 @@ public class TestFromClientSide {
     FilterList allFilters = new FilterList(/* FilterList.Operator.MUST_PASS_ALL */);
     allFilters.addFilter(new PrefixFilter(Bytes.toBytes(keyPrefix)));
     SingleColumnValueFilter filter = new SingleColumnValueFilter(Bytes
-        .toBytes("trans-tags"), Bytes.toBytes("qual2"), CompareOp.EQUAL, Bytes
+        .toBytes("trans-tags"), Bytes.toBytes("qual2"), CompareOperator.EQUAL, Bytes
         .toBytes(value));
     filter.setFilterIfMissing(true);
     allFilters.addFilter(filter);
@@ -542,15 +543,15 @@ public class TestFromClientSide {
 
     key = new byte [] {'a', 'a', 'a'};
     int countBBB = TEST_UTIL.countRows(t,
-      createScanWithRowFilter(key, null, CompareFilter.CompareOp.EQUAL));
+      createScanWithRowFilter(key, null, CompareOperator.EQUAL));
     assertEquals(1, countBBB);
 
     int countGreater = TEST_UTIL.countRows(t, createScanWithRowFilter(endKey, null,
-      CompareFilter.CompareOp.GREATER_OR_EQUAL));
+      CompareOperator.GREATER_OR_EQUAL));
     // Because started at start of table.
     assertEquals(0, countGreater);
     countGreater = TEST_UTIL.countRows(t, createScanWithRowFilter(endKey, endKey,
-      CompareFilter.CompareOp.GREATER_OR_EQUAL));
+      CompareOperator.GREATER_OR_EQUAL));
     assertEquals(rowCount - endKeyCount, countGreater);
   }
 
@@ -694,7 +695,7 @@ public class TestFromClientSide {
    * @return Scan with RowFilter that does LESS than passed key.
    */
   private Scan createScanWithRowFilter(final byte [] key) {
-    return createScanWithRowFilter(key, null, CompareFilter.CompareOp.LESS);
+    return createScanWithRowFilter(key, null, CompareOperator.LESS);
   }
 
   /*
@@ -704,7 +705,7 @@ public class TestFromClientSide {
    * @return Scan with RowFilter that does CompareOp op on passed key.
    */
   private Scan createScanWithRowFilter(final byte [] key,
-      final byte [] startRow, CompareFilter.CompareOp op) {
+      final byte [] startRow, CompareOperator op) {
     // Make sure key is of some substance... non-null and > than first key.
     assertTrue(key != null && key.length > 0 &&
       Bytes.BYTES_COMPARATOR.compare(key, new byte [] {'a', 'a', 'a'}) >= 0);
@@ -826,7 +827,7 @@ public class TestFromClientSide {
     }
     Scan scan = new Scan();
     scan.addFamily(FAMILY);
-    Filter filter = new QualifierFilter(CompareOp.EQUAL,
+    Filter filter = new QualifierFilter(CompareOperator.EQUAL,
       new RegexStringComparator("col[1-5]"));
     scan.setFilter(filter);
     ResultScanner scanner = ht.getScanner(scan);
@@ -859,7 +860,7 @@ public class TestFromClientSide {
     }
     Scan scan = new Scan();
     scan.addFamily(FAMILY);
-    Filter filter = new SingleColumnValueFilter(FAMILY, QUALIFIER, CompareOp.GREATER,
+    Filter filter = new SingleColumnValueFilter(FAMILY, QUALIFIER, CompareOperator.GREATER,
       new LongComparator(500));
     scan.setFilter(filter);
     ResultScanner scanner = ht.getScanner(scan);
@@ -1478,7 +1479,7 @@ public class TestFromClientSide {
 
     RowMutations mutate = new RowMutations(ROW);
     mutate.add(new Put(ROW).addColumn(FAMILY, null, Bytes.toBytes("checkAndMutate")));
-    table.checkAndMutate(ROW, FAMILY, null, CompareOp.EQUAL, Bytes.toBytes("checkAndPut"), mutate);
+    table.checkAndMutate(ROW, FAMILY, null, CompareOperator.EQUAL, Bytes.toBytes("checkAndPut"), mutate);
 
     delete = new Delete(ROW);
     delete.addColumns(FAMILY, null);
@@ -4913,47 +4914,47 @@ public class TestFromClientSide {
 
     // cell = "bbbb", using "aaaa" to compare only LESS/LESS_OR_EQUAL/NOT_EQUAL
     // turns out "match"
-    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOp.GREATER, value1, put2);
+    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOperator.GREATER, value1, put2);
     assertEquals(ok, false);
-    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOp.EQUAL, value1, put2);
+    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOperator.EQUAL, value1, put2);
     assertEquals(ok, false);
-    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOp.GREATER_OR_EQUAL, value1, put2);
+    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOperator.GREATER_OR_EQUAL, value1, put2);
     assertEquals(ok, false);
-    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOp.LESS, value1, put2);
+    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOperator.LESS, value1, put2);
     assertEquals(ok, true);
-    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOp.LESS_OR_EQUAL, value1, put2);
+    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOperator.LESS_OR_EQUAL, value1, put2);
     assertEquals(ok, true);
-    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOp.NOT_EQUAL, value1, put3);
+    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOperator.NOT_EQUAL, value1, put3);
     assertEquals(ok, true);
 
     // cell = "cccc", using "dddd" to compare only LARGER/LARGER_OR_EQUAL/NOT_EQUAL
     // turns out "match"
-    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOp.LESS, value4, put3);
+    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOperator.LESS, value4, put3);
     assertEquals(ok, false);
-    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOp.LESS_OR_EQUAL, value4, put3);
+    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOperator.LESS_OR_EQUAL, value4, put3);
     assertEquals(ok, false);
-    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOp.EQUAL, value4, put3);
+    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOperator.EQUAL, value4, put3);
     assertEquals(ok, false);
-    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOp.GREATER, value4, put3);
+    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOperator.GREATER, value4, put3);
     assertEquals(ok, true);
-    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOp.GREATER_OR_EQUAL, value4, put3);
+    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOperator.GREATER_OR_EQUAL, value4, put3);
     assertEquals(ok, true);
-    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOp.NOT_EQUAL, value4, put2);
+    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOperator.NOT_EQUAL, value4, put2);
     assertEquals(ok, true);
 
     // cell = "bbbb", using "bbbb" to compare only GREATER_OR_EQUAL/LESS_OR_EQUAL/EQUAL
     // turns out "match"
-    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOp.GREATER, value2, put2);
+    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOperator.GREATER, value2, put2);
     assertEquals(ok, false);
-    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOp.NOT_EQUAL, value2, put2);
+    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOperator.NOT_EQUAL, value2, put2);
     assertEquals(ok, false);
-    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOp.LESS, value2, put2);
+    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOperator.LESS, value2, put2);
     assertEquals(ok, false);
-    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOp.GREATER_OR_EQUAL, value2, put2);
+    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOperator.GREATER_OR_EQUAL, value2, put2);
     assertEquals(ok, true);
-    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOp.LESS_OR_EQUAL, value2, put2);
+    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOperator.LESS_OR_EQUAL, value2, put2);
     assertEquals(ok, true);
-    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOp.EQUAL, value2, put3);
+    ok = table.checkAndPut(ROW, FAMILY, QUALIFIER, CompareOperator.EQUAL, value2, put3);
     assertEquals(ok, true);
   }
 
@@ -4997,55 +4998,55 @@ public class TestFromClientSide {
 
     // cell = "bbbb", using "aaaa" to compare only LESS/LESS_OR_EQUAL/NOT_EQUAL
     // turns out "match"
-    boolean ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOp.GREATER, value1, delete);
+    boolean ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOperator.GREATER, value1, delete);
     assertEquals(ok, false);
-    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOp.EQUAL, value1, delete);
+    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOperator.EQUAL, value1, delete);
     assertEquals(ok, false);
-    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOp.GREATER_OR_EQUAL, value1, delete);
+    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOperator.GREATER_OR_EQUAL, value1, delete);
     assertEquals(ok, false);
-    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOp.LESS, value1, delete);
+    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOperator.LESS, value1, delete);
     assertEquals(ok, true);
     table.put(put2);
-    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOp.LESS_OR_EQUAL, value1, delete);
+    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOperator.LESS_OR_EQUAL, value1, delete);
     assertEquals(ok, true);
     table.put(put2);
-    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOp.NOT_EQUAL, value1, delete);
+    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOperator.NOT_EQUAL, value1, delete);
     assertEquals(ok, true);
 
     // cell = "cccc", using "dddd" to compare only LARGER/LARGER_OR_EQUAL/NOT_EQUAL
     // turns out "match"
     table.put(put3);
-    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOp.LESS, value4, delete);
+    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOperator.LESS, value4, delete);
     assertEquals(ok, false);
-    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOp.LESS_OR_EQUAL, value4, delete);
+    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOperator.LESS_OR_EQUAL, value4, delete);
     assertEquals(ok, false);
-    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOp.EQUAL, value4, delete);
+    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOperator.EQUAL, value4, delete);
     assertEquals(ok, false);
-    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOp.GREATER, value4, delete);
+    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOperator.GREATER, value4, delete);
     assertEquals(ok, true);
     table.put(put3);
-    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOp.GREATER_OR_EQUAL, value4, delete);
+    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOperator.GREATER_OR_EQUAL, value4, delete);
     assertEquals(ok, true);
     table.put(put3);
-    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOp.NOT_EQUAL, value4, delete);
+    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOperator.NOT_EQUAL, value4, delete);
     assertEquals(ok, true);
 
     // cell = "bbbb", using "bbbb" to compare only GREATER_OR_EQUAL/LESS_OR_EQUAL/EQUAL
     // turns out "match"
     table.put(put2);
-    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOp.GREATER, value2, delete);
+    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOperator.GREATER, value2, delete);
     assertEquals(ok, false);
-    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOp.NOT_EQUAL, value2, delete);
+    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOperator.NOT_EQUAL, value2, delete);
     assertEquals(ok, false);
-    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOp.LESS, value2, delete);
+    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOperator.LESS, value2, delete);
     assertEquals(ok, false);
-    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOp.GREATER_OR_EQUAL, value2, delete);
+    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOperator.GREATER_OR_EQUAL, value2, delete);
     assertEquals(ok, true);
     table.put(put2);
-    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOp.LESS_OR_EQUAL, value2, delete);
+    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOperator.LESS_OR_EQUAL, value2, delete);
     assertEquals(ok, true);
     table.put(put2);
-    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOp.EQUAL, value2, delete);
+    ok = table.checkAndDelete(ROW, FAMILY, QUALIFIER, CompareOperator.EQUAL, value2, delete);
     assertEquals(ok, true);
   }
 
@@ -5450,7 +5451,7 @@ public class TestFromClientSide {
     scan.setStartRow(Bytes.toBytes(1));
     scan.setStopRow(Bytes.toBytes(3));
     scan.addColumn(FAMILY, FAMILY);
-    scan.setFilter(new RowFilter(CompareFilter.CompareOp.NOT_EQUAL,
+    scan.setFilter(new RowFilter(CompareOperator.NOT_EQUAL,
         new BinaryComparator(Bytes.toBytes(1))));
 
     ResultScanner scanner = foo.getScanner(scan);
@@ -5757,7 +5758,7 @@ public class TestFromClientSide {
     Scan scan = new Scan();
     scan.setReversed(true);
     scan.addFamily(FAMILY);
-    Filter filter = new QualifierFilter(CompareOp.EQUAL,
+    Filter filter = new QualifierFilter(CompareOperator.EQUAL,
         new RegexStringComparator("col[1-5]"));
     scan.setFilter(filter);
     ResultScanner scanner = ht.getScanner(scan);
@@ -6561,7 +6562,7 @@ public class TestFromClientSide {
     table.put(put);
 
     Scan scan =
-        new Scan().setFilter(new ValueFilter(CompareOp.EQUAL, new SubstringComparator("value-a")))
+        new Scan().setFilter(new ValueFilter(CompareOperator.EQUAL, new SubstringComparator("value-a")))
             .setMaxVersions(3);
     ResultScanner scanner = table.getScanner(scan);
     Result result = scanner.next();
@@ -6571,7 +6572,7 @@ public class TestFromClientSide {
 
     Get get =
         new Get(ROW)
-            .setFilter(new ValueFilter(CompareOp.EQUAL, new SubstringComparator("value-a")))
+            .setFilter(new ValueFilter(CompareOperator.EQUAL, new SubstringComparator("value-a")))
             .setMaxVersions(3);
     result = table.get(get);
     // ts[0] has gone from user view. Only read ts[2] which value is less or equal to 3
@@ -6580,7 +6581,7 @@ public class TestFromClientSide {
 
     // Test with max versions 1, it should still read ts[1]
     scan =
-        new Scan().setFilter(new ValueFilter(CompareOp.EQUAL, new SubstringComparator("value-a")))
+        new Scan().setFilter(new ValueFilter(CompareOperator.EQUAL, new SubstringComparator("value-a")))
             .setMaxVersions(1);
     scanner = table.getScanner(scan);
     result = scanner.next();
@@ -6591,7 +6592,7 @@ public class TestFromClientSide {
     // Test with max versions 1, it should still read ts[1]
     get =
         new Get(ROW)
-            .setFilter(new ValueFilter(CompareOp.EQUAL, new SubstringComparator("value-a")))
+            .setFilter(new ValueFilter(CompareOperator.EQUAL, new SubstringComparator("value-a")))
             .setMaxVersions(1);
     result = table.get(get);
     // ts[0] has gone from user view. Only read ts[2] which value is less or equal to 3
@@ -6600,7 +6601,7 @@ public class TestFromClientSide {
 
     // Test with max versions 5, it should still read ts[1]
     scan =
-        new Scan().setFilter(new ValueFilter(CompareOp.EQUAL, new SubstringComparator("value-a")))
+        new Scan().setFilter(new ValueFilter(CompareOperator.EQUAL, new SubstringComparator("value-a")))
             .setMaxVersions(5);
     scanner = table.getScanner(scan);
     result = scanner.next();
@@ -6611,7 +6612,7 @@ public class TestFromClientSide {
     // Test with max versions 5, it should still read ts[1]
     get =
         new Get(ROW)
-            .setFilter(new ValueFilter(CompareOp.EQUAL, new SubstringComparator("value-a")))
+            .setFilter(new ValueFilter(CompareOperator.EQUAL, new SubstringComparator("value-a")))
             .setMaxVersions(5);
     result = table.get(get);
     // ts[0] has gone from user view. Only read ts[2] which value is less or equal to 3

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e0a839/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestDependentColumnFilter.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestDependentColumnFilter.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestDependentColumnFilter.java
index 704441a..16420d1 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestDependentColumnFilter.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestDependentColumnFilter.java
@@ -32,6 +32,7 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CellComparator;
+import org.apache.hadoop.hbase.CompareOperator;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.HRegionInfo;
@@ -192,7 +193,7 @@ public class TestDependentColumnFilter {
 
     // include a comparator operation
     filter = new DependentColumnFilter(FAMILIES[0], QUALIFIER, false,
-        CompareOp.EQUAL, new BinaryComparator(MATCH_VAL));
+    CompareOperator.EQUAL, new BinaryComparator(MATCH_VAL));
     scan = new Scan();
     scan.setFilter(filter);
     scan.setMaxVersions(Integer.MAX_VALUE);
@@ -209,7 +210,7 @@ public class TestDependentColumnFilter {
 
     // include a comparator operation and drop comparator
     filter = new DependentColumnFilter(FAMILIES[0], QUALIFIER, true,
-        CompareOp.EQUAL, new BinaryComparator(MATCH_VAL));
+    CompareOperator.EQUAL, new BinaryComparator(MATCH_VAL));
     scan = new Scan();
     scan.setFilter(filter);
     scan.setMaxVersions(Integer.MAX_VALUE);
@@ -268,7 +269,7 @@ public class TestDependentColumnFilter {
       filter.toString().contains("null"));
 
     // Test constructor with explicit null comparator
-    filter = new DependentColumnFilter(FAMILIES[0], QUALIFIER, true, CompareOp.EQUAL, null);
+    filter = new DependentColumnFilter(FAMILIES[0], QUALIFIER, true, CompareOperator.EQUAL, null);
     assertNotNull(filter.toString());
     assertTrue("check string contains 'null' as compatator is null",
       filter.toString().contains("null"));
@@ -277,7 +278,7 @@ public class TestDependentColumnFilter {
   @Test
   public void testToStringWithNonNullComparator() {
     Filter filter =
-        new DependentColumnFilter(FAMILIES[0], QUALIFIER, true, CompareOp.EQUAL,
+        new DependentColumnFilter(FAMILIES[0], QUALIFIER, true, CompareOperator.EQUAL,
             new BinaryComparator(MATCH_VAL));
     assertNotNull(filter.toString());
     assertTrue("check string contains comparator value", filter.toString().contains("match"));

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e0a839/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilter.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilter.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilter.java
index 17cddae..2624d95 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilter.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilter.java
@@ -33,6 +33,7 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CellComparator;
 import org.apache.hadoop.hbase.CellUtil;
+import org.apache.hadoop.hbase.CompareOperator;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.HConstants;
@@ -675,7 +676,7 @@ public class TestFilter {
   public void testWhileMatchFilterWithFilterKeyValue() throws Exception {
     Scan s = new Scan();
     WhileMatchFilter filter = new WhileMatchFilter(
-        new SingleColumnValueFilter(FAMILIES[0], QUALIFIERS_ONE[0], CompareOp.EQUAL, Bytes.toBytes("foo"))
+        new SingleColumnValueFilter(FAMILIES[0], QUALIFIERS_ONE[0], CompareOperator.EQUAL, Bytes.toBytes("foo"))
     );
     s.setFilter(filter);
 
@@ -768,7 +769,7 @@ public class TestFilter {
     // Match two keys (one from each family) in half the rows
     long expectedRows = this.numRows / 2;
     long expectedKeys = 2;
-    Filter f = new QualifierFilter(CompareOp.EQUAL,
+    Filter f = new QualifierFilter(CompareOperator.EQUAL,
         new BinaryComparator(Bytes.toBytes("testQualifierOne-2")));
     Scan s = new Scan();
     s.setFilter(f);
@@ -778,7 +779,7 @@ public class TestFilter {
     // Expect only two keys (one from each family) in half the rows
     expectedRows = this.numRows / 2;
     expectedKeys = 2;
-    f = new QualifierFilter(CompareOp.LESS,
+    f = new QualifierFilter(CompareOperator.LESS,
         new BinaryComparator(Bytes.toBytes("testQualifierOne-2")));
     s = new Scan();
     s.setFilter(f);
@@ -788,7 +789,7 @@ public class TestFilter {
     // Expect four keys (two from each family) in half the rows
     expectedRows = this.numRows / 2;
     expectedKeys = 4;
-    f = new QualifierFilter(CompareOp.LESS_OR_EQUAL,
+    f = new QualifierFilter(CompareOperator.LESS_OR_EQUAL,
         new BinaryComparator(Bytes.toBytes("testQualifierOne-2")));
     s = new Scan();
     s.setFilter(f);
@@ -799,7 +800,7 @@ public class TestFilter {
     // Only look in first group of rows
     expectedRows = this.numRows / 2;
     expectedKeys = 4;
-    f = new QualifierFilter(CompareOp.NOT_EQUAL,
+    f = new QualifierFilter(CompareOperator.NOT_EQUAL,
         new BinaryComparator(Bytes.toBytes("testQualifierOne-2")));
     s = new Scan(HConstants.EMPTY_START_ROW, Bytes.toBytes("testRowTwo"));
     s.setFilter(f);
@@ -810,7 +811,7 @@ public class TestFilter {
     // Only look in first group of rows
     expectedRows = this.numRows / 2;
     expectedKeys = 4;
-    f = new QualifierFilter(CompareOp.GREATER_OR_EQUAL,
+    f = new QualifierFilter(CompareOperator.GREATER_OR_EQUAL,
         new BinaryComparator(Bytes.toBytes("testQualifierOne-2")));
     s = new Scan(HConstants.EMPTY_START_ROW, Bytes.toBytes("testRowTwo"));
     s.setFilter(f);
@@ -821,7 +822,7 @@ public class TestFilter {
     // Only look in first group of rows
     expectedRows = this.numRows / 2;
     expectedKeys = 2;
-    f = new QualifierFilter(CompareOp.GREATER,
+    f = new QualifierFilter(CompareOperator.GREATER,
         new BinaryComparator(Bytes.toBytes("testQualifierOne-2")));
     s = new Scan(HConstants.EMPTY_START_ROW, Bytes.toBytes("testRowTwo"));
     s.setFilter(f);
@@ -830,7 +831,7 @@ public class TestFilter {
     // 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(CompareOp.NOT_EQUAL,
+    f = new QualifierFilter(CompareOperator.NOT_EQUAL,
         new BinaryComparator(QUALIFIERS_ONE[2]));
     s = new Scan();
     s.setFilter(f);
@@ -879,7 +880,7 @@ public class TestFilter {
     // Test across rows and groups with a regex
     // Filter out "test*-2"
     // Expect 4 keys per row across both groups
-    f = new QualifierFilter(CompareOp.NOT_EQUAL,
+    f = new QualifierFilter(CompareOperator.NOT_EQUAL,
         new RegexStringComparator("test.+-2"));
     s = new Scan();
     s.setFilter(f);
@@ -926,7 +927,7 @@ public class TestFilter {
       // Match family, only half of columns returned.
       long expectedRows = this.numRows;
       long expectedKeys = this.colsPerRow / 2;
-      Filter f = new FamilyFilter(CompareOp.EQUAL,
+      Filter f = new FamilyFilter(CompareOperator.EQUAL,
           new BinaryComparator(Bytes.toBytes("testFamilyOne")));
       Scan s = new Scan();
       s.setFilter(f);
@@ -935,7 +936,7 @@ public class TestFilter {
       // Match keys less than given family, should return nothing
       expectedRows = 0;
       expectedKeys = 0;
-      f = new FamilyFilter(CompareOp.LESS,
+      f = new FamilyFilter(CompareOperator.LESS,
           new BinaryComparator(Bytes.toBytes("testFamily")));
       s = new Scan();
       s.setFilter(f);
@@ -944,7 +945,7 @@ public class TestFilter {
       // Match keys less than or equal, should return half of columns
       expectedRows = this.numRows;
       expectedKeys = this.colsPerRow / 2;
-      f = new FamilyFilter(CompareOp.LESS_OR_EQUAL,
+      f = new FamilyFilter(CompareOperator.LESS_OR_EQUAL,
           new BinaryComparator(Bytes.toBytes("testFamilyOne")));
       s = new Scan();
       s.setFilter(f);
@@ -954,7 +955,7 @@ public class TestFilter {
       // look only in second group of rows
       expectedRows = this.numRows / 2;
       expectedKeys = this.colsPerRow / 2;
-      f = new FamilyFilter(CompareOp.NOT_EQUAL,
+      f = new FamilyFilter(CompareOperator.NOT_EQUAL,
           new BinaryComparator(Bytes.toBytes("testFamilyOne")));
       s = new Scan(HConstants.EMPTY_START_ROW, Bytes.toBytes("testRowTwo"));
       s.setFilter(f);
@@ -964,7 +965,7 @@ public class TestFilter {
       // look only in second group of rows
       expectedRows = this.numRows / 2;
       expectedKeys = this.colsPerRow;
-      f = new FamilyFilter(CompareOp.GREATER_OR_EQUAL,
+      f = new FamilyFilter(CompareOperator.GREATER_OR_EQUAL,
           new BinaryComparator(Bytes.toBytes("testFamilyOne")));
       s = new Scan(HConstants.EMPTY_START_ROW, Bytes.toBytes("testRowTwo"));
       s.setFilter(f);
@@ -974,7 +975,7 @@ public class TestFilter {
       // look only in second group of rows
       expectedRows = this.numRows / 2;
       expectedKeys = this.colsPerRow / 2;
-      f = new FamilyFilter(CompareOp.GREATER,
+      f = new FamilyFilter(CompareOperator.GREATER,
           new BinaryComparator(Bytes.toBytes("testFamilyOne")));
       s = new Scan(HConstants.EMPTY_START_ROW, Bytes.toBytes("testRowTwo"));
       s.setFilter(f);
@@ -982,7 +983,7 @@ public class TestFilter {
 
       // Match keys not equal to given family
       // Look across rows and fully validate the keys and ordering
-      f = new FamilyFilter(CompareOp.NOT_EQUAL,
+      f = new FamilyFilter(CompareOperator.NOT_EQUAL,
           new BinaryComparator(FAMILIES[1]));
       s = new Scan();
       s.setFilter(f);
@@ -1019,7 +1020,7 @@ public class TestFilter {
       // Test across rows and groups with a regex
       // Filter out "test*-2"
       // Expect 4 keys per row across both groups
-      f = new FamilyFilter(CompareOp.NOT_EQUAL,
+      f = new FamilyFilter(CompareOperator.NOT_EQUAL,
           new RegexStringComparator("test.*One"));
       s = new Scan();
       s.setFilter(f);
@@ -1061,7 +1062,7 @@ public class TestFilter {
     // Match a single row, all keys
     long expectedRows = 1;
     long expectedKeys = this.colsPerRow;
-    Filter f = new RowFilter(CompareOp.EQUAL,
+    Filter f = new RowFilter(CompareOperator.EQUAL,
         new BinaryComparator(Bytes.toBytes("testRowOne-2")));
     Scan s = new Scan();
     s.setFilter(f);
@@ -1070,7 +1071,7 @@ public class TestFilter {
     // Match a two rows, one from each group, using regex
     expectedRows = 2;
     expectedKeys = this.colsPerRow;
-    f = new RowFilter(CompareOp.EQUAL,
+    f = new RowFilter(CompareOperator.EQUAL,
         new RegexStringComparator("testRow.+-2"));
     s = new Scan();
     s.setFilter(f);
@@ -1080,7 +1081,7 @@ public class TestFilter {
     // Expect all keys in one row
     expectedRows = 1;
     expectedKeys = this.colsPerRow;
-    f = new RowFilter(CompareOp.LESS,
+    f = new RowFilter(CompareOperator.LESS,
         new BinaryComparator(Bytes.toBytes("testRowOne-2")));
     s = new Scan();
     s.setFilter(f);
@@ -1090,7 +1091,7 @@ public class TestFilter {
     // Expect all keys in two rows
     expectedRows = 2;
     expectedKeys = this.colsPerRow;
-    f = new RowFilter(CompareOp.LESS_OR_EQUAL,
+    f = new RowFilter(CompareOperator.LESS_OR_EQUAL,
         new BinaryComparator(Bytes.toBytes("testRowOne-2")));
     s = new Scan();
     s.setFilter(f);
@@ -1100,7 +1101,7 @@ public class TestFilter {
     // Expect all keys in all but one row
     expectedRows = this.numRows - 1;
     expectedKeys = this.colsPerRow;
-    f = new RowFilter(CompareOp.NOT_EQUAL,
+    f = new RowFilter(CompareOperator.NOT_EQUAL,
         new BinaryComparator(Bytes.toBytes("testRowOne-2")));
     s = new Scan();
     s.setFilter(f);
@@ -1110,7 +1111,7 @@ public class TestFilter {
     // Expect all keys in all but one row
     expectedRows = this.numRows - 1;
     expectedKeys = this.colsPerRow;
-    f = new RowFilter(CompareOp.GREATER_OR_EQUAL,
+    f = new RowFilter(CompareOperator.GREATER_OR_EQUAL,
         new BinaryComparator(Bytes.toBytes("testRowOne-2")));
     s = new Scan();
     s.setFilter(f);
@@ -1120,7 +1121,7 @@ public class TestFilter {
     // Expect all keys in all but two rows
     expectedRows = this.numRows - 2;
     expectedKeys = this.colsPerRow;
-    f = new RowFilter(CompareOp.GREATER,
+    f = new RowFilter(CompareOperator.GREATER,
         new BinaryComparator(Bytes.toBytes("testRowOne-2")));
     s = new Scan();
     s.setFilter(f);
@@ -1129,7 +1130,7 @@ public class TestFilter {
     // Match rows not equal to testRowTwo-2
     // Look across rows and fully validate the keys and ordering
     // Should see all keys in all rows but testRowTwo-2
-    f = new RowFilter(CompareOp.NOT_EQUAL,
+    f = new RowFilter(CompareOperator.NOT_EQUAL,
         new BinaryComparator(Bytes.toBytes("testRowOne-2")));
     s = new Scan();
     s.setFilter(f);
@@ -1177,7 +1178,7 @@ public class TestFilter {
     // Test across rows and groups with a regex
     // Filter out everything that doesn't match "*-2"
     // Expect all keys in two rows
-    f = new RowFilter(CompareOp.EQUAL,
+    f = new RowFilter(CompareOperator.EQUAL,
         new RegexStringComparator(".+-2"));
     s = new Scan();
     s.setFilter(f);
@@ -1208,7 +1209,7 @@ public class TestFilter {
     // Match group one rows
     long expectedRows = this.numRows / 2;
     long expectedKeys = this.colsPerRow;
-    Filter f = new ValueFilter(CompareOp.EQUAL,
+    Filter f = new ValueFilter(CompareOperator.EQUAL,
         new BinaryComparator(Bytes.toBytes("testValueOne")));
     Scan s = new Scan();
     s.setFilter(f);
@@ -1217,7 +1218,7 @@ public class TestFilter {
     // Match group two rows
     expectedRows = this.numRows / 2;
     expectedKeys = this.colsPerRow;
-    f = new ValueFilter(CompareOp.EQUAL,
+    f = new ValueFilter(CompareOperator.EQUAL,
         new BinaryComparator(Bytes.toBytes("testValueTwo")));
     s = new Scan();
     s.setFilter(f);
@@ -1226,7 +1227,7 @@ public class TestFilter {
     // Match all values using regex
     expectedRows = this.numRows;
     expectedKeys = this.colsPerRow;
-    f = new ValueFilter(CompareOp.EQUAL,
+    f = new ValueFilter(CompareOperator.EQUAL,
         new RegexStringComparator("testValue((One)|(Two))"));
     s = new Scan();
     s.setFilter(f);
@@ -1236,7 +1237,7 @@ public class TestFilter {
     // Expect group one rows
     expectedRows = this.numRows / 2;
     expectedKeys = this.colsPerRow;
-    f = new ValueFilter(CompareOp.LESS,
+    f = new ValueFilter(CompareOperator.LESS,
         new BinaryComparator(Bytes.toBytes("testValueTwo")));
     s = new Scan();
     s.setFilter(f);
@@ -1246,7 +1247,7 @@ public class TestFilter {
     // Expect all rows
     expectedRows = this.numRows;
     expectedKeys = this.colsPerRow;
-    f = new ValueFilter(CompareOp.LESS_OR_EQUAL,
+    f = new ValueFilter(CompareOperator.LESS_OR_EQUAL,
         new BinaryComparator(Bytes.toBytes("testValueTwo")));
     s = new Scan();
     s.setFilter(f);
@@ -1256,7 +1257,7 @@ public class TestFilter {
     // Expect group one rows
     expectedRows = this.numRows / 2;
     expectedKeys = this.colsPerRow;
-    f = new ValueFilter(CompareOp.LESS_OR_EQUAL,
+    f = new ValueFilter(CompareOperator.LESS_OR_EQUAL,
         new BinaryComparator(Bytes.toBytes("testValueOne")));
     s = new Scan();
     s.setFilter(f);
@@ -1266,7 +1267,7 @@ public class TestFilter {
     // Expect half the rows
     expectedRows = this.numRows / 2;
     expectedKeys = this.colsPerRow;
-    f = new ValueFilter(CompareOp.NOT_EQUAL,
+    f = new ValueFilter(CompareOperator.NOT_EQUAL,
         new BinaryComparator(Bytes.toBytes("testValueOne")));
     s = new Scan();
     s.setFilter(f);
@@ -1276,7 +1277,7 @@ public class TestFilter {
     // Expect all rows
     expectedRows = this.numRows;
     expectedKeys = this.colsPerRow;
-    f = new ValueFilter(CompareOp.GREATER_OR_EQUAL,
+    f = new ValueFilter(CompareOperator.GREATER_OR_EQUAL,
         new BinaryComparator(Bytes.toBytes("testValueOne")));
     s = new Scan();
     s.setFilter(f);
@@ -1286,7 +1287,7 @@ public class TestFilter {
     // Expect half rows
     expectedRows = this.numRows / 2;
     expectedKeys = this.colsPerRow;
-    f = new ValueFilter(CompareOp.GREATER,
+    f = new ValueFilter(CompareOperator.GREATER,
         new BinaryComparator(Bytes.toBytes("testValueOne")));
     s = new Scan();
     s.setFilter(f);
@@ -1295,7 +1296,7 @@ public class TestFilter {
     // Match values not equal to testValueOne
     // Look across rows and fully validate the keys and ordering
     // Should see all keys in all group two rows
-    f = new ValueFilter(CompareOp.NOT_EQUAL,
+    f = new ValueFilter(CompareOperator.NOT_EQUAL,
         new BinaryComparator(Bytes.toBytes("testValueOne")));
     s = new Scan();
     s.setFilter(f);
@@ -1331,7 +1332,7 @@ public class TestFilter {
 
     // Test for qualifier regex: "testQualifierOne-2"
     // Should only get rows from second group, and all keys
-    Filter f = new SkipFilter(new QualifierFilter(CompareOp.NOT_EQUAL,
+    Filter f = new SkipFilter(new QualifierFilter(CompareOperator.NOT_EQUAL,
         new BinaryComparator(Bytes.toBytes("testQualifierOne-2"))));
     Scan s = new Scan();
     s.setFilter(f);
@@ -1371,9 +1372,9 @@ public class TestFilter {
     // regular expression and substring filters
     // Use must pass all
     List<Filter> filters = new ArrayList<>();
-    filters.add(new RowFilter(CompareOp.EQUAL, new RegexStringComparator(".+-2")));
-    filters.add(new QualifierFilter(CompareOp.EQUAL, new RegexStringComparator(".+-2")));
-    filters.add(new ValueFilter(CompareOp.EQUAL, new SubstringComparator("One")));
+    filters.add(new RowFilter(CompareOperator.EQUAL, new RegexStringComparator(".+-2")));
+    filters.add(new QualifierFilter(CompareOperator.EQUAL, new RegexStringComparator(".+-2")));
+    filters.add(new ValueFilter(CompareOperator.EQUAL, new SubstringComparator("One")));
     Filter f = new FilterList(Operator.MUST_PASS_ALL, filters);
     Scan s = new Scan();
     s.addFamily(FAMILIES[0]);
@@ -1386,9 +1387,9 @@ public class TestFilter {
     // Test getting everything with a MUST_PASS_ONE filter including row, qf, val
     // regular expression and substring filters
     filters.clear();
-    filters.add(new RowFilter(CompareOp.EQUAL, new RegexStringComparator(".+Two.+")));
-    filters.add(new QualifierFilter(CompareOp.EQUAL, new RegexStringComparator(".+-2")));
-    filters.add(new ValueFilter(CompareOp.EQUAL, new SubstringComparator("One")));
+    filters.add(new RowFilter(CompareOperator.EQUAL, new RegexStringComparator(".+Two.+")));
+    filters.add(new QualifierFilter(CompareOperator.EQUAL, new RegexStringComparator(".+-2")));
+    filters.add(new ValueFilter(CompareOperator.EQUAL, new SubstringComparator("One")));
     f = new FilterList(Operator.MUST_PASS_ONE, filters);
     s = new Scan();
     s.setFilter(f);
@@ -1419,7 +1420,7 @@ public class TestFilter {
 
     // Scan using SingleColumnValueFilter
     SingleColumnValueFilter f1 = new SingleColumnValueFilter(FAMILIES[0], QUALIFIERS_ONE[0],
-          CompareOp.EQUAL, VALUES[0]);
+    CompareOperator.EQUAL, VALUES[0]);
     f1.setFilterIfMissing( true );
     Scan s1 = new Scan();
     s1.addFamily(FAMILIES[0]);
@@ -1440,7 +1441,7 @@ public class TestFilter {
 
     // Scan using another SingleColumnValueFilter, expect disjoint result
     SingleColumnValueFilter f2 = new SingleColumnValueFilter(FAMILIES[0], QUALIFIERS_TWO[0],
-        CompareOp.EQUAL, VALUES[1]);
+    CompareOperator.EQUAL, VALUES[1]);
     f2.setFilterIfMissing( true );
     Scan s2 = new Scan();
     s2.addFamily(FAMILIES[0]);
@@ -1513,7 +1514,7 @@ public class TestFilter {
     PrefixFilter pf = new PrefixFilter(new byte[] {'b'}) ;
     // rows with value of column 'q1' set to '113'
     SingleColumnValueFilter scvf = new SingleColumnValueFilter(
-        family, qualifier, CompareOp.EQUAL, Bytes.toBytes("113"));
+        family, qualifier, CompareOperator.EQUAL, Bytes.toBytes("113"));
     // combine these two with OR in a FilterList
     FilterList filterList = new FilterList(Operator.MUST_PASS_ONE, pf, scvf);
 
@@ -1555,9 +1556,9 @@ public class TestFilter {
     // so limiting scan to group one
     List<Filter> filters = new ArrayList<>();
     filters.add(new SingleColumnValueFilter(FAMILIES[0], QUALIFIERS_ONE[0],
-        CompareOp.EQUAL, VALUES[0]));
+      CompareOperator.EQUAL, VALUES[0]));
     filters.add(new SingleColumnValueFilter(FAMILIES[0], QUALIFIERS_ONE[2],
-        CompareOp.EQUAL, VALUES[1]));
+      CompareOperator.EQUAL, VALUES[1]));
     Filter f = new FilterList(Operator.MUST_PASS_ALL, filters);
     Scan s = new Scan(ROWS_ONE[0], ROWS_TWO[0]);
     s.addFamily(FAMILIES[0]);
@@ -1575,9 +1576,9 @@ public class TestFilter {
     // need to wrap SCVFs in SkipFilters
     filters = new ArrayList<>();
     filters.add(new SkipFilter(new SingleColumnValueFilter(FAMILIES[0], QUALIFIERS_ONE[0],
-        CompareOp.EQUAL, VALUES[0])));
+      CompareOperator.EQUAL, VALUES[0])));
     filters.add(new SkipFilter(new SingleColumnValueFilter(FAMILIES[0], QUALIFIERS_ONE[2],
-        CompareOp.EQUAL, VALUES[1])));
+      CompareOperator.EQUAL, VALUES[1])));
     f = new FilterList(Operator.MUST_PASS_ALL, filters);
     s = new Scan(ROWS_ONE[0], ROWS_TWO[0]);
     s.addFamily(FAMILIES[0]);
@@ -1612,7 +1613,7 @@ public class TestFilter {
     // Match VALUES[0] against QUALIFIERS_ONE[0] with filterIfMissing = false
     // Expect 3 rows (0, 2, 3)
     SingleColumnValueFilter scvf = new SingleColumnValueFilter(FAMILIES[0],
-        QUALIFIERS_ONE[0], CompareOp.EQUAL, VALUES[0]);
+        QUALIFIERS_ONE[0], CompareOperator.EQUAL, VALUES[0]);
     s = new Scan(ROWS_THREE[0], Bytes.toBytes("rowThree-4"));
     s.addFamily(FAMILIES[0]);
     s.setFilter(scvf);
@@ -1622,7 +1623,7 @@ public class TestFilter {
     // Match VALUES[0] against QUALIFIERS_ONE[0] with filterIfMissing = true
     // Expect 1 row (0)
     scvf = new SingleColumnValueFilter(FAMILIES[0], QUALIFIERS_ONE[0],
-        CompareOp.EQUAL, VALUES[0]);
+    CompareOperator.EQUAL, VALUES[0]);
     scvf.setFilterIfMissing(true);
     s = new Scan(ROWS_THREE[0], Bytes.toBytes("rowThree-4"));
     s.addFamily(FAMILIES[0]);
@@ -1633,7 +1634,7 @@ public class TestFilter {
     // Match VALUES[1] against QUALIFIERS_ONE[1] with filterIfMissing = true
     // Expect 1 row (3)
     scvf = new SingleColumnValueFilter(FAMILIES[0],
-        QUALIFIERS_ONE[1], CompareOp.EQUAL, VALUES[1]);
+        QUALIFIERS_ONE[1], CompareOperator.EQUAL, VALUES[1]);
     scvf.setFilterIfMissing(true);
     s = new Scan(ROWS_THREE[0], Bytes.toBytes("rowThree-4"));
     s.addFamily(FAMILIES[0]);
@@ -1648,7 +1649,7 @@ public class TestFilter {
     // Match VALUES[1] against QUALIFIERS_ONE[1] with filterIfMissing = true
     // Expect 1 row (3)
     scvf = new SingleColumnValueFilter(FAMILIES[0],
-        QUALIFIERS_ONE[1], CompareOp.EQUAL, VALUES[1]);
+        QUALIFIERS_ONE[1], CompareOperator.EQUAL, VALUES[1]);
     scvf.setFilterIfMissing(true);
     s = new Scan(ROWS_THREE[0], Bytes.toBytes("rowThree-4"));
     s.addFamily(FAMILIES[0]);
@@ -2069,7 +2070,7 @@ public class TestFilter {
     }
     testRegion.flush(true);
     // 1. got rows > "row4"
-    Filter rowFilter = new RowFilter(CompareOp.GREATER,new BinaryComparator(Bytes.toBytes("row4")));
+    Filter rowFilter = new RowFilter(CompareOperator.GREATER,new BinaryComparator(Bytes.toBytes("row4")));
     Scan s1 = new Scan();
     s1.setFilter(rowFilter);
     InternalScanner scanner = testRegion.getScanner(s1);
@@ -2083,10 +2084,10 @@ public class TestFilter {
     }
     // 2. got rows <= "row4" and S=
     FilterList subFilterList = new FilterList(FilterList.Operator.MUST_PASS_ALL);
-    Filter subFilter1 = new RowFilter(CompareOp.LESS_OR_EQUAL,
+    Filter subFilter1 = new RowFilter(CompareOperator.LESS_OR_EQUAL,
       new BinaryComparator(Bytes.toBytes("row4")));
     subFilterList.addFilter(subFilter1);
-    Filter subFilter2 = new SingleColumnValueFilter(FAMILIES[0], columnStatus, CompareOp.EQUAL,
+    Filter subFilter2 = new SingleColumnValueFilter(FAMILIES[0], columnStatus, CompareOperator.EQUAL,
       Bytes.toBytes(0));
     subFilterList.addFilter(subFilter2);
     s1 = new Scan();

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e0a839/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterList.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterList.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterList.java
index f7c1b20..f20a9ba 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterList.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterList.java
@@ -18,6 +18,7 @@
  */
 package org.apache.hadoop.hbase.filter;
 
+import org.apache.hadoop.hbase.CompareOperator;
 import org.apache.hadoop.hbase.shaded.com.google.common.collect.Lists;
 import java.io.IOException;
 import java.util.ArrayList;
@@ -565,12 +566,12 @@ public class TestFilterList {
     //  OR (family=fam AND qualifier=qual2)
     final FilterList flist = new FilterList(Operator.MUST_PASS_ONE, Lists.<Filter>newArrayList(
         new FilterList(Operator.MUST_PASS_ALL, Lists.<Filter>newArrayList(
-            new FamilyFilter(CompareOp.EQUAL, new BinaryComparator(Bytes.toBytes("fam"))),
-            new QualifierFilter(CompareOp.EQUAL, new BinaryComparator(Bytes.toBytes("qual1"))),
+            new FamilyFilter(CompareOperator.EQUAL, new BinaryComparator(Bytes.toBytes("fam"))),
+            new QualifierFilter(CompareOperator.EQUAL, new BinaryComparator(Bytes.toBytes("qual1"))),
             new KeyOnlyFilter())),
         new FilterList(Operator.MUST_PASS_ALL, Lists.<Filter>newArrayList(
-            new FamilyFilter(CompareOp.EQUAL, new BinaryComparator(Bytes.toBytes("fam"))),
-            new QualifierFilter(CompareOp.EQUAL, new BinaryComparator(Bytes.toBytes("qual2")))))));
+            new FamilyFilter(CompareOperator.EQUAL, new BinaryComparator(Bytes.toBytes("fam"))),
+            new QualifierFilter(CompareOperator.EQUAL, new BinaryComparator(Bytes.toBytes("qual2")))))));
 
     final KeyValue kvQual1 = new KeyValue(
         Bytes.toBytes("row"), Bytes.toBytes("fam"), Bytes.toBytes("qual1"), Bytes.toBytes("value"));

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e0a839/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterSerialization.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterSerialization.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterSerialization.java
index 37e0d2d..8fa41e3 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterSerialization.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterSerialization.java
@@ -26,6 +26,7 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.TreeSet;
 
+import org.apache.hadoop.hbase.CompareOperator;
 import org.apache.hadoop.hbase.testclassification.FilterTests;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
 import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
@@ -88,7 +89,7 @@ public class TestFilterSerialization {
 
     // non-null column qualifier/family
     dependentColumnFilter = new DependentColumnFilter(Bytes.toBytes("family"),
-      Bytes.toBytes("qual"), true, CompareOp.GREATER_OR_EQUAL,
+      Bytes.toBytes("qual"), true, CompareOperator.GREATER_OR_EQUAL,
       new BitComparator(Bytes.toBytes("bitComparator"), BitComparator.BitwiseOp.OR));
     assertTrue(dependentColumnFilter.areSerializedFieldsEqual(
       ProtobufUtil.toFilter(ProtobufUtil.toFilter(dependentColumnFilter))));
@@ -96,7 +97,7 @@ public class TestFilterSerialization {
 
   @Test
   public void testFamilyFilter() throws Exception {
-    FamilyFilter familyFilter = new FamilyFilter(CompareFilter.CompareOp.EQUAL,
+    FamilyFilter familyFilter = new FamilyFilter(CompareOperator.EQUAL,
       new BinaryPrefixComparator(Bytes.toBytes("testValueOne")));
     assertTrue(familyFilter.areSerializedFieldsEqual(
       ProtobufUtil.toFilter(ProtobufUtil.toFilter(familyFilter))));
@@ -112,7 +113,7 @@ public class TestFilterSerialization {
     // non-empty filter list
     LinkedList<Filter> list = new LinkedList<>();
     list.add(new ColumnCountGetFilter(1));
-    list.add(new RowFilter(CompareFilter.CompareOp.EQUAL,
+    list.add(new RowFilter(CompareOperator.EQUAL,
       new SubstringComparator("testFilterList")));
     assertTrue(filterList.areSerializedFieldsEqual(
       ProtobufUtil.toFilter(ProtobufUtil.toFilter(filterList))));
@@ -229,7 +230,7 @@ public class TestFilterSerialization {
 
   @Test
   public void testQualifierFilter() throws Exception {
-    QualifierFilter qualifierFilter = new QualifierFilter(CompareFilter.CompareOp.EQUAL,
+    QualifierFilter qualifierFilter = new QualifierFilter(CompareOperator.EQUAL,
       new NullComparator());
     assertTrue(qualifierFilter.areSerializedFieldsEqual(
       ProtobufUtil.toFilter(ProtobufUtil.toFilter(qualifierFilter))));
@@ -244,7 +245,7 @@ public class TestFilterSerialization {
 
   @Test
   public void testRowFilter() throws Exception {
-    RowFilter rowFilter = new RowFilter(CompareFilter.CompareOp.EQUAL,
+    RowFilter rowFilter = new RowFilter(CompareOperator.EQUAL,
       new SubstringComparator("testRowFilter"));
     assertTrue(rowFilter.areSerializedFieldsEqual(
       ProtobufUtil.toFilter(ProtobufUtil.toFilter(rowFilter))));
@@ -255,14 +256,14 @@ public class TestFilterSerialization {
     // null family/column SingleColumnValueExcludeFilter
     SingleColumnValueExcludeFilter singleColumnValueExcludeFilter =
       new SingleColumnValueExcludeFilter(null, null,
-      CompareFilter.CompareOp.GREATER_OR_EQUAL, Bytes.toBytes("value"));
+      CompareOperator.GREATER_OR_EQUAL, Bytes.toBytes("value"));
     assertTrue(singleColumnValueExcludeFilter.areSerializedFieldsEqual(
       ProtobufUtil.toFilter(ProtobufUtil.toFilter(singleColumnValueExcludeFilter))));
 
     // non-null family/column SingleColumnValueFilter
     singleColumnValueExcludeFilter =
       new SingleColumnValueExcludeFilter(Bytes.toBytes("fam"), Bytes.toBytes("qual"),
-      CompareFilter.CompareOp.LESS_OR_EQUAL, new NullComparator(), false, false);
+      CompareOperator.LESS_OR_EQUAL, new NullComparator(), false, false);
     assertTrue(singleColumnValueExcludeFilter.areSerializedFieldsEqual(
       ProtobufUtil.toFilter(ProtobufUtil.toFilter(singleColumnValueExcludeFilter))));
   }
@@ -272,14 +273,14 @@ public class TestFilterSerialization {
     // null family/column SingleColumnValueFilter
     SingleColumnValueFilter singleColumnValueFilter =
       new SingleColumnValueFilter(null, null,
-      CompareFilter.CompareOp.LESS, Bytes.toBytes("value"));
+      CompareOperator.LESS, Bytes.toBytes("value"));
     assertTrue(singleColumnValueFilter.areSerializedFieldsEqual(
       ProtobufUtil.toFilter(ProtobufUtil.toFilter(singleColumnValueFilter))));
 
     // non-null family/column SingleColumnValueFilter
     singleColumnValueFilter =
       new SingleColumnValueFilter(Bytes.toBytes("family"), Bytes.toBytes("qualifier"),
-      CompareFilter.CompareOp.NOT_EQUAL, new NullComparator(), true, true);
+       CompareOperator.NOT_EQUAL, new NullComparator(), true, true);
     assertTrue(singleColumnValueFilter.areSerializedFieldsEqual(
       ProtobufUtil.toFilter(ProtobufUtil.toFilter(singleColumnValueFilter))));
   }
@@ -309,7 +310,7 @@ public class TestFilterSerialization {
 
   @Test
   public void testValueFilter() throws Exception {
-    ValueFilter valueFilter = new ValueFilter(CompareFilter.CompareOp.NO_OP,
+    ValueFilter valueFilter = new ValueFilter(CompareOperator.NO_OP,
       new BinaryComparator(Bytes.toBytes("testValueOne")));
     assertTrue(valueFilter.areSerializedFieldsEqual(
       ProtobufUtil.toFilter(ProtobufUtil.toFilter(valueFilter))));

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e0a839/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterWithScanLimits.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterWithScanLimits.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterWithScanLimits.java
index 4b2842c..79dc36f 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterWithScanLimits.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterWithScanLimits.java
@@ -30,6 +30,7 @@ import java.util.List;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.Cell;
+import org.apache.hadoop.hbase.CompareOperator;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Result;
@@ -63,7 +64,7 @@ public class TestFilterWithScanLimits extends FilterTestingCluster {
       scan.setBatch(2);
       SingleColumnValueFilter filter = new SingleColumnValueFilter(
           Bytes.toBytes(columnFamily), Bytes.toBytes("c5"),
-          CompareFilter.CompareOp.EQUAL, new SubstringComparator("2_c5"));
+      CompareOperator .EQUAL, new SubstringComparator("2_c5"));
 
       // add filter after batch defined
       scan.setFilter(filter);

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e0a839/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterWrapper.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterWrapper.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterWrapper.java
index c4c3e36..e779706 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterWrapper.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterWrapper.java
@@ -28,6 +28,7 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CellUtil;
+import org.apache.hadoop.hbase.CompareOperator;
 import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.HColumnDescriptor;
@@ -78,7 +79,7 @@ public class TestFilterWrapper {
       List<Filter> fs = new ArrayList<>();
 
       DependentColumnFilter f1 = new DependentColumnFilter(Bytes.toBytes("f1"),
-          Bytes.toBytes("c5"), true, CompareFilter.CompareOp.EQUAL,
+          Bytes.toBytes("c5"), true, CompareOperator.EQUAL,
           new SubstringComparator("c5"));
       PageFilter f2 = new PageFilter(2);
       fs.add(f1);

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e0a839/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestParseFilter.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestParseFilter.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestParseFilter.java
index b6d8bc1..bcd239d 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestParseFilter.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestParseFilter.java
@@ -24,6 +24,7 @@ import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.hadoop.hbase.CompareOperator;
 import org.apache.hadoop.hbase.testclassification.RegionServerTests;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
 import org.apache.hadoop.hbase.util.Bytes;
@@ -242,7 +243,7 @@ public class TestParseFilter {
     String filterString = "RowFilter ( =,   'binary:regionse')";
     RowFilter rowFilter =
       doTestFilter(filterString, RowFilter.class);
-    assertEquals(CompareFilter.CompareOp.EQUAL, rowFilter.getOperator());
+    assertEquals(CompareOperator.EQUAL, rowFilter.getCompareOperator());
     assertTrue(rowFilter.getComparator() instanceof BinaryComparator);
     BinaryComparator binaryComparator = (BinaryComparator) rowFilter.getComparator();
     assertEquals("regionse", new String(binaryComparator.getValue()));
@@ -253,7 +254,7 @@ public class TestParseFilter {
     String filterString = "FamilyFilter(>=, 'binaryprefix:pre')";
     FamilyFilter familyFilter =
       doTestFilter(filterString, FamilyFilter.class);
-    assertEquals(CompareFilter.CompareOp.GREATER_OR_EQUAL, familyFilter.getOperator());
+    assertEquals(CompareOperator.GREATER_OR_EQUAL, familyFilter.getCompareOperator());
     assertTrue(familyFilter.getComparator() instanceof BinaryPrefixComparator);
     BinaryPrefixComparator binaryPrefixComparator =
       (BinaryPrefixComparator) familyFilter.getComparator();
@@ -265,7 +266,7 @@ public class TestParseFilter {
     String filterString = "QualifierFilter(=, 'regexstring:pre*')";
     QualifierFilter qualifierFilter =
       doTestFilter(filterString, QualifierFilter.class);
-    assertEquals(CompareFilter.CompareOp.EQUAL, qualifierFilter.getOperator());
+    assertEquals(CompareOperator.EQUAL, qualifierFilter.getCompareOperator());
     assertTrue(qualifierFilter.getComparator() instanceof RegexStringComparator);
     RegexStringComparator regexStringComparator =
       (RegexStringComparator) qualifierFilter.getComparator();
@@ -277,7 +278,7 @@ public class TestParseFilter {
     String filterString = "ValueFilter(!=, 'substring:pre')";
     ValueFilter valueFilter =
       doTestFilter(filterString, ValueFilter.class);
-    assertEquals(CompareFilter.CompareOp.NOT_EQUAL, valueFilter.getOperator());
+    assertEquals(CompareOperator.NOT_EQUAL, valueFilter.getCompareOperator());
     assertTrue(valueFilter.getComparator() instanceof SubstringComparator);
     SubstringComparator substringComparator =
       (SubstringComparator) valueFilter.getComparator();
@@ -303,7 +304,7 @@ public class TestParseFilter {
     assertEquals("family", new String(dependentColumnFilter.getFamily()));
     assertEquals("qualifier", new String(dependentColumnFilter.getQualifier()));
     assertTrue(dependentColumnFilter.getDropDependentColumn());
-    assertEquals(CompareFilter.CompareOp.EQUAL, dependentColumnFilter.getOperator());
+    assertEquals(CompareOperator.EQUAL, dependentColumnFilter.getCompareOperator());
     assertTrue(dependentColumnFilter.getComparator() instanceof BinaryComparator);
     BinaryComparator binaryComparator = (BinaryComparator)dependentColumnFilter.getComparator();
     assertEquals("abc", new String(binaryComparator.getValue()));
@@ -317,7 +318,7 @@ public class TestParseFilter {
       doTestFilter(filterString, SingleColumnValueFilter.class);
     assertEquals("family", new String(singleColumnValueFilter.getFamily()));
     assertEquals("qualifier", new String(singleColumnValueFilter.getQualifier()));
-    assertEquals(singleColumnValueFilter.getOperator(), CompareFilter.CompareOp.GREATER_OR_EQUAL);
+    assertEquals(singleColumnValueFilter.getCompareOperator(), CompareOperator.GREATER_OR_EQUAL);
     assertTrue(singleColumnValueFilter.getComparator() instanceof BinaryComparator);
     BinaryComparator binaryComparator = (BinaryComparator) singleColumnValueFilter.getComparator();
     assertEquals(new String(binaryComparator.getValue()), "a");
@@ -329,7 +330,7 @@ public class TestParseFilter {
     singleColumnValueFilter = doTestFilter(filterString, SingleColumnValueFilter.class);
     assertEquals("family", new String(singleColumnValueFilter.getFamily()));
     assertEquals("qualifier", new String(singleColumnValueFilter.getQualifier()));
-    assertEquals(singleColumnValueFilter.getOperator(), CompareFilter.CompareOp.GREATER);
+    assertEquals(singleColumnValueFilter.getCompareOperator(), CompareOperator.GREATER);
     assertTrue(singleColumnValueFilter.getComparator() instanceof BinaryPrefixComparator);
     BinaryPrefixComparator binaryPrefixComparator =
       (BinaryPrefixComparator) singleColumnValueFilter.getComparator();
@@ -344,7 +345,7 @@ public class TestParseFilter {
       "SingleColumnValueExcludeFilter ('family', 'qualifier', <, 'binaryprefix:a')";
     SingleColumnValueExcludeFilter singleColumnValueExcludeFilter =
       doTestFilter(filterString, SingleColumnValueExcludeFilter.class);
-    assertEquals(singleColumnValueExcludeFilter.getOperator(), CompareFilter.CompareOp.LESS);
+    assertEquals(singleColumnValueExcludeFilter.getCompareOperator(), CompareOperator.LESS);
     assertEquals("family", new String(singleColumnValueExcludeFilter.getFamily()));
     assertEquals("qualifier", new String(singleColumnValueExcludeFilter.getQualifier()));
     assertEquals(new String(singleColumnValueExcludeFilter.getComparator().getValue()), "a");
@@ -357,8 +358,8 @@ public class TestParseFilter {
       doTestFilter(filterString, SingleColumnValueExcludeFilter.class);
     assertEquals("family", new String(singleColumnValueExcludeFilter.getFamily()));
     assertEquals("qualifier", new String(singleColumnValueExcludeFilter.getQualifier()));
-    assertEquals(singleColumnValueExcludeFilter.getOperator(),
-                 CompareFilter.CompareOp.LESS_OR_EQUAL);
+    assertEquals(singleColumnValueExcludeFilter.getCompareOperator(),
+      CompareOperator.LESS_OR_EQUAL);
     assertTrue(singleColumnValueExcludeFilter.getComparator() instanceof BinaryPrefixComparator);
     BinaryPrefixComparator binaryPrefixComparator =
       (BinaryPrefixComparator) singleColumnValueExcludeFilter.getComparator();
@@ -375,7 +376,7 @@ public class TestParseFilter {
     assertTrue(skipFilter.getFilter() instanceof ValueFilter);
     ValueFilter valueFilter = (ValueFilter) skipFilter.getFilter();
 
-    assertEquals(CompareFilter.CompareOp.EQUAL, valueFilter.getOperator());
+    assertEquals(CompareOperator.EQUAL, valueFilter.getCompareOperator());
     assertTrue(valueFilter.getComparator() instanceof BinaryComparator);
     BinaryComparator binaryComparator = (BinaryComparator) valueFilter.getComparator();
     assertEquals("0", new String(binaryComparator.getValue()));
@@ -389,7 +390,7 @@ public class TestParseFilter {
     assertTrue(whileMatchFilter.getFilter() instanceof RowFilter);
     RowFilter rowFilter = (RowFilter) whileMatchFilter.getFilter();
 
-    assertEquals(CompareFilter.CompareOp.NOT_EQUAL, rowFilter.getOperator());
+    assertEquals(CompareOperator.NOT_EQUAL, rowFilter.getCompareOperator());
     assertTrue(rowFilter.getComparator() instanceof BinaryComparator);
     BinaryComparator binaryComparator = (BinaryComparator) rowFilter.getComparator();
     assertEquals("row1", new String(binaryComparator.getValue()));
@@ -429,7 +430,7 @@ public class TestParseFilter {
     assertTrue(filterListFilters.get(1) instanceof QualifierFilter);
     assertEquals(filterList.getOperator(), FilterList.Operator.MUST_PASS_ALL);
 
-    assertEquals(CompareFilter.CompareOp.EQUAL, familyFilter.getOperator());
+    assertEquals(CompareOperator.EQUAL, familyFilter.getCompareOperator());
     assertTrue(familyFilter.getComparator() instanceof BinaryComparator);
     BinaryComparator binaryComparator = (BinaryComparator) familyFilter.getComparator();
     assertEquals("qualifier", new String(binaryComparator.getValue()));
@@ -439,7 +440,7 @@ public class TestParseFilter {
     assertEquals(new String(prefix), "realtime");
 
     QualifierFilter qualifierFilter = (QualifierFilter) filterListFilters.get(1);
-    assertEquals(CompareFilter.CompareOp.GREATER_OR_EQUAL, qualifierFilter.getOperator());
+    assertEquals(CompareOperator.GREATER_OR_EQUAL, qualifierFilter.getCompareOperator());
     assertTrue(qualifierFilter.getComparator() instanceof BinaryComparator);
     binaryComparator = (BinaryComparator) qualifierFilter.getComparator();
     assertEquals("e", new String(binaryComparator.getValue()));
@@ -472,7 +473,7 @@ public class TestParseFilter {
     assertTrue(skipFilter.getFilter() instanceof FamilyFilter);
     FamilyFilter familyFilter = (FamilyFilter) skipFilter.getFilter();
 
-    assertEquals(CompareFilter.CompareOp.EQUAL, familyFilter.getOperator());
+    assertEquals(CompareOperator.EQUAL, familyFilter.getCompareOperator());
     assertTrue(familyFilter.getComparator() instanceof SubstringComparator);
     SubstringComparator substringComparator =
       (SubstringComparator) familyFilter.getComparator();
@@ -501,7 +502,7 @@ public class TestParseFilter {
     assertTrue(skipFilter.getFilter() instanceof FamilyFilter);
     FamilyFilter familyFilter = (FamilyFilter) skipFilter.getFilter();
 
-    assertEquals(CompareFilter.CompareOp.EQUAL, familyFilter.getOperator());
+    assertEquals(CompareOperator.EQUAL, familyFilter.getCompareOperator());
     assertTrue(familyFilter.getComparator() instanceof SubstringComparator);
     SubstringComparator substringComparator =
       (SubstringComparator) familyFilter.getComparator();
@@ -670,6 +671,4 @@ public class TestParseFilter {
     assertEquals(clazz, filter.getClass());
     return clazz.cast(filter);
   }
-
 }
-

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e0a839/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestSingleColumnValueExcludeFilter.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestSingleColumnValueExcludeFilter.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestSingleColumnValueExcludeFilter.java
index 0ef3ea7..6e9fef1 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestSingleColumnValueExcludeFilter.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestSingleColumnValueExcludeFilter.java
@@ -20,6 +20,7 @@ package org.apache.hadoop.hbase.filter;
 
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CellComparator;
+import org.apache.hadoop.hbase.CompareOperator;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
 import org.apache.hadoop.hbase.testclassification.FilterTests;
@@ -55,7 +56,7 @@ public class TestSingleColumnValueExcludeFilter {
   @Test
   public void testFilterKeyValue() throws Exception {
     Filter filter = new SingleColumnValueExcludeFilter(COLUMN_FAMILY, COLUMN_QUALIFIER,
-        CompareOp.EQUAL, VAL_1);
+    CompareOperator.EQUAL, VAL_1);
 
     // A 'match' situation
     List<Cell> kvs = new ArrayList<>();

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e0a839/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestSingleColumnValueFilter.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestSingleColumnValueFilter.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestSingleColumnValueFilter.java
index 134e8d2..a2167ce 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestSingleColumnValueFilter.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestSingleColumnValueFilter.java
@@ -27,6 +27,7 @@ import java.util.regex.Pattern;
 import org.apache.hadoop.hbase.ByteBufferKeyValue;
 
 import org.apache.hadoop.hbase.Cell;
+import org.apache.hadoop.hbase.CompareOperator;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
 import org.apache.hadoop.hbase.testclassification.FilterTests;
@@ -73,36 +74,36 @@ public class TestSingleColumnValueFilter {
 
   private Filter basicFilterNew() {
     return new SingleColumnValueFilter(COLUMN_FAMILY, COLUMN_QUALIFIER,
-      CompareOp.GREATER_OR_EQUAL, VAL_2);
+    CompareOperator.GREATER_OR_EQUAL, VAL_2);
   }
 
   private Filter nullFilterNew() {
-    return new SingleColumnValueFilter(COLUMN_FAMILY, COLUMN_QUALIFIER, CompareOp.NOT_EQUAL,
+    return new SingleColumnValueFilter(COLUMN_FAMILY, COLUMN_QUALIFIER, CompareOperator.NOT_EQUAL,
         new NullComparator());
   }
 
   private Filter substrFilterNew() {
     return new SingleColumnValueFilter(COLUMN_FAMILY, COLUMN_QUALIFIER,
-      CompareOp.EQUAL,
+    CompareOperator.EQUAL,
       new SubstringComparator(QUICK_SUBSTR));
   }
 
   private Filter regexFilterNew() {
     return new SingleColumnValueFilter(COLUMN_FAMILY, COLUMN_QUALIFIER,
-      CompareOp.EQUAL,
+    CompareOperator.EQUAL,
       new RegexStringComparator(QUICK_REGEX));
   }
 
   private Filter regexFilterNew(Pattern pattern) {
     return new SingleColumnValueFilter(COLUMN_FAMILY, COLUMN_QUALIFIER,
-        CompareOp.EQUAL,
+    CompareOperator.EQUAL,
         new RegexStringComparator(pattern.pattern(), pattern.flags()));
   }
 
   @Test
   public void testLongComparator() throws IOException {
     Filter filter = new SingleColumnValueFilter(COLUMN_FAMILY,
-        COLUMN_QUALIFIER, CompareOp.GREATER, new LongComparator(100L));
+        COLUMN_QUALIFIER, CompareOperator.GREATER, new LongComparator(100L));
     KeyValue kv = new KeyValue(ROW, COLUMN_FAMILY, COLUMN_QUALIFIER,
       Bytes.toBytes(1L));
     assertTrue("less than", filter.filterKeyValue(kv) == Filter.ReturnCode.NEXT_ROW);

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e0a839/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java
index 44062bb..b577ee4 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java
@@ -27,6 +27,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.commons.collections4.MapUtils;
+import org.apache.hadoop.hbase.CompareOperator;
 import org.apache.hadoop.hbase.HRegionInfo;
 import org.apache.hadoop.hbase.HRegionLocation;
 import org.apache.hadoop.hbase.ServerName;
@@ -570,15 +571,15 @@ public class ThriftUtilities {
     }
   }
 
-  public static CompareOp compareOpFromThrift(TCompareOp tCompareOp) {
+  public static CompareOperator compareOpFromThrift(TCompareOp tCompareOp) {
     switch (tCompareOp.getValue()) {
-      case 0: return CompareOp.LESS;
-      case 1: return CompareOp.LESS_OR_EQUAL;
-      case 2: return CompareOp.EQUAL;
-      case 3: return CompareOp.NOT_EQUAL;
-      case 4: return CompareOp.GREATER_OR_EQUAL;
-      case 5: return CompareOp.GREATER;
-      case 6: return CompareOp.NO_OP;
+      case 0: return CompareOperator.LESS;
+      case 1: return CompareOperator.LESS_OR_EQUAL;
+      case 2: return CompareOperator.EQUAL;
+      case 3: return CompareOperator.NOT_EQUAL;
+      case 4: return CompareOperator.GREATER_OR_EQUAL;
+      case 5: return CompareOperator.GREATER;
+      case 6: return CompareOperator.NO_OP;
       default: return null;
     }
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e0a839/src/main/asciidoc/_chapters/architecture.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/_chapters/architecture.adoc b/src/main/asciidoc/_chapters/architecture.adoc
index 25dbdab..caa17c2 100644
--- a/src/main/asciidoc/_chapters/architecture.adoc
+++ b/src/main/asciidoc/_chapters/architecture.adoc
@@ -286,14 +286,14 @@ FilterList list = new FilterList(FilterList.Operator.MUST_PASS_ONE);
 SingleColumnValueFilter filter1 = new SingleColumnValueFilter(
   cf,
   column,
-  CompareOp.EQUAL,
+  CompareOperator.EQUAL,
   Bytes.toBytes("my value")
   );
 list.add(filter1);
 SingleColumnValueFilter filter2 = new SingleColumnValueFilter(
   cf,
   column,
-  CompareOp.EQUAL,
+  CompareOperator.EQUAL,
   Bytes.toBytes("my other value")
   );
 list.add(filter2);
@@ -308,8 +308,8 @@ scan.setFilter(list);
 
 A SingleColumnValueFilter (see:
 http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/filter/SingleColumnValueFilter.html)
-can be used to test column values for equivalence (`CompareOp.EQUAL`),
-inequality (`CompareOp.NOT_EQUAL`), or ranges (e.g., `CompareOp.GREATER`). The following is an
+can be used to test column values for equivalence (`CompareOperaor.EQUAL`),
+inequality (`CompareOperaor.NOT_EQUAL`), or ranges (e.g., `CompareOperaor.GREATER`). The following is an
 example of testing equivalence of a column to a String value "my value"...
 
 [source,java]
@@ -317,7 +317,7 @@ example of testing equivalence of a column to a String value "my value"...
 SingleColumnValueFilter filter = new SingleColumnValueFilter(
   cf,
   column,
-  CompareOp.EQUAL,
+  CompareOperaor.EQUAL,
   Bytes.toBytes("my value")
   );
 scan.setFilter(filter);
@@ -340,7 +340,7 @@ RegexStringComparator comp = new RegexStringComparator("my.");   // any value th
 SingleColumnValueFilter filter = new SingleColumnValueFilter(
   cf,
   column,
-  CompareOp.EQUAL,
+  CompareOperaor.EQUAL,
   comp
   );
 scan.setFilter(filter);
@@ -361,7 +361,7 @@ SubstringComparator comp = new SubstringComparator("y val");   // looking for 'm
 SingleColumnValueFilter filter = new SingleColumnValueFilter(
   cf,
   column,
-  CompareOp.EQUAL,
+  CompareOperaor.EQUAL,
   comp
   );
 scan.setFilter(filter);


Mime
View raw message