Java Code Examples for org.apache.hadoop.hbase.CompareOperator#NO_OP
The following examples show how to use
org.apache.hadoop.hbase.CompareOperator#NO_OP .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ThriftUtilities.java From hbase with Apache License 2.0 | 5 votes |
public static CompareOperator compareOpFromThrift(TCompareOperator tCompareOp) { switch (tCompareOp.getValue()) { 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; } }
Example 2
Source File: TestFilterSerialization.java From hbase with Apache License 2.0 | 5 votes |
@Test public void testValueFilter() throws Exception { ValueFilter valueFilter = new ValueFilter(CompareOperator.NO_OP, new BinaryComparator(Bytes.toBytes("testValueOne"))); assertTrue(valueFilter.areSerializedFieldsEqual( ProtobufUtil.toFilter(ProtobufUtil.toFilter(valueFilter)))); }
Example 3
Source File: CompareFilter.java From hbase with Apache License 2.0 | 5 votes |
protected boolean compareRow(final CompareOperator op, final ByteArrayComparable comparator, final Cell cell) { if (op == CompareOperator.NO_OP) { return true; } int compareResult = PrivateCellUtil.compareRow(cell, comparator); return compare(op, compareResult); }
Example 4
Source File: CompareFilter.java From hbase with Apache License 2.0 | 5 votes |
protected boolean compareFamily(final CompareOperator op, final ByteArrayComparable comparator, final Cell cell) { if (op == CompareOperator.NO_OP) { return true; } int compareResult = PrivateCellUtil.compareFamily(cell, comparator); return compare(op, compareResult); }
Example 5
Source File: CompareFilter.java From hbase with Apache License 2.0 | 5 votes |
protected boolean compareQualifier(final CompareOperator op, final ByteArrayComparable comparator, final Cell cell) { // We do not call through to the non-deprecated method for perf reasons. if (op == CompareOperator.NO_OP) { return true; } int compareResult = PrivateCellUtil.compareQualifier(cell, comparator); return compare(op, compareResult); }
Example 6
Source File: CompareFilter.java From hbase with Apache License 2.0 | 5 votes |
protected boolean compareValue(final CompareOperator op, final ByteArrayComparable comparator, final Cell cell) { if (op == CompareOperator.NO_OP) { return true; } int compareResult = PrivateCellUtil.compareValue(cell, comparator); return compare(op, compareResult); }
Example 7
Source File: ColumnValueFilter.java From hbase with Apache License 2.0 | 5 votes |
/** * This method is used to determine a cell should be included or filtered out. * @param op one of operators {@link CompareOperator} * @param comparator comparator used to compare cells. * @param cell cell to be compared. * @return true means cell should be filtered out, included otherwise. */ private boolean compareValue(final CompareOperator op, final ByteArrayComparable comparator, final Cell cell) { if (op == CompareOperator.NO_OP) { return true; } int compareResult = PrivateCellUtil.compareValue(cell, comparator); return CompareFilter.compare(op, compareResult); }
Example 8
Source File: DependentColumnFilter.java From hbase with Apache License 2.0 | 2 votes |
/** * Constructor for DependentColumn filter. * Cells where a Cell from target column * with the same timestamp do not exist will be dropped. * * @param family name of dependent column family * @param qualifier name of dependent qualifier * @param dropDependentColumn whether the dependent columns Cells should be discarded */ public DependentColumnFilter(final byte [] family, final byte [] qualifier, final boolean dropDependentColumn) { this(family, qualifier, dropDependentColumn, CompareOperator.NO_OP, null); }