org.apache.hadoop.hbase.filter.RowFilter.getCompareOperator()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.3k)|赞(0)|评价(0)|浏览(93)

本文整理了Java中org.apache.hadoop.hbase.filter.RowFilter.getCompareOperator方法的一些代码示例,展示了RowFilter.getCompareOperator的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RowFilter.getCompareOperator方法的具体详情如下:
包路径:org.apache.hadoop.hbase.filter.RowFilter
类名称:RowFilter
方法名:getCompareOperator

RowFilter.getCompareOperator介绍

暂无

代码示例

代码示例来源:origin: apache/hbase

@Override
public boolean filterRowKey(Cell firstRowCell) {
 if (compareRow(getCompareOperator(), this.comparator, firstRowCell)) {
  this.filterOutRow = true;
 }
 return this.filterOutRow;
}

代码示例来源:origin: apache/hbase

@Test
public void testRowFilter() throws IOException {
 String filterString = "RowFilter ( =,   'binary:regionse')";
 RowFilter rowFilter =
  doTestFilter(filterString, RowFilter.class);
 assertEquals(CompareOperator.EQUAL, rowFilter.getCompareOperator());
 assertTrue(rowFilter.getComparator() instanceof BinaryComparator);
 BinaryComparator binaryComparator = (BinaryComparator) rowFilter.getComparator();
 assertEquals("regionse", new String(binaryComparator.getValue(), StandardCharsets.UTF_8));
}

代码示例来源:origin: apache/hbase

@Test
public void testWhileFilter() throws IOException {
 String filterString = " WHILE   RowFilter ( !=, 'binary:row1')";
 WhileMatchFilter whileMatchFilter =
  doTestFilter(filterString, WhileMatchFilter.class);
 assertTrue(whileMatchFilter.getFilter() instanceof RowFilter);
 RowFilter rowFilter = (RowFilter) whileMatchFilter.getFilter();
 assertEquals(CompareOperator.NOT_EQUAL, rowFilter.getCompareOperator());
 assertTrue(rowFilter.getComparator() instanceof BinaryComparator);
 BinaryComparator binaryComparator = (BinaryComparator) rowFilter.getComparator();
 assertEquals("row1", new String(binaryComparator.getValue(), StandardCharsets.UTF_8));
}

代码示例来源:origin: org.apache.hbase/hbase-client

@Override
public boolean filterRowKey(Cell firstRowCell) {
 if (compareRow(getCompareOperator(), this.comparator, firstRowCell)) {
  this.filterOutRow = true;
 }
 return this.filterOutRow;
}

代码示例来源:origin: com.aliyun.hbase/alihbase-client

@Override
public boolean filterRowKey(Cell firstRowCell) {
 if (compareRow(getCompareOperator(), this.comparator, firstRowCell)) {
  this.filterOutRow = true;
 }
 return this.filterOutRow;
}

代码示例来源:origin: org.apache.hbase/hbase-server

@Test
public void testRowFilter() throws IOException {
 String filterString = "RowFilter ( =,   'binary:regionse')";
 RowFilter rowFilter =
  doTestFilter(filterString, RowFilter.class);
 assertEquals(CompareOperator.EQUAL, rowFilter.getCompareOperator());
 assertTrue(rowFilter.getComparator() instanceof BinaryComparator);
 BinaryComparator binaryComparator = (BinaryComparator) rowFilter.getComparator();
 assertEquals("regionse", new String(binaryComparator.getValue(), StandardCharsets.UTF_8));
}

代码示例来源:origin: org.apache.hbase/hbase-server

@Test
public void testWhileFilter() throws IOException {
 String filterString = " WHILE   RowFilter ( !=, 'binary:row1')";
 WhileMatchFilter whileMatchFilter =
  doTestFilter(filterString, WhileMatchFilter.class);
 assertTrue(whileMatchFilter.getFilter() instanceof RowFilter);
 RowFilter rowFilter = (RowFilter) whileMatchFilter.getFilter();
 assertEquals(CompareOperator.NOT_EQUAL, rowFilter.getCompareOperator());
 assertTrue(rowFilter.getComparator() instanceof BinaryComparator);
 BinaryComparator binaryComparator = (BinaryComparator) rowFilter.getComparator();
 assertEquals("row1", new String(binaryComparator.getValue(), StandardCharsets.UTF_8));
}

相关文章