本文整理汇总了Java中org.apache.hadoop.hbase.index.client.NoIndexExpression类的典型用法代码示例。如果您正苦于以下问题:Java NoIndexExpression类的具体用法?Java NoIndexExpression怎么用?Java NoIndexExpression使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NoIndexExpression类属于org.apache.hadoop.hbase.index.client包,在下文中一共展示了NoIndexExpression类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testNoIndexExpression
import org.apache.hadoop.hbase.index.client.NoIndexExpression; //导入依赖的package包/类
@Test
public void testNoIndexExpression() throws Exception {
IndexExpression exp = new NoIndexExpression();
Scan scan = new Scan();
scan.setAttribute(Constants.INDEX_EXPRESSION, IndexUtils.toBytes(exp));
byte[] value1 = Bytes.toBytes("asdf");
scan.setFilter(new SingleColumnValueFilter(FAMILY1, QUALIFIER1, CompareOp.EQUAL, value1));
List<IndexSpecification> indices = new ArrayList<IndexSpecification>();
IndexSpecification is1 = new IndexSpecification("idx1");
HColumnDescriptor colDesc = new HColumnDescriptor(FAMILY1);
is1.addIndexColumn(colDesc, COL1, ValueType.String, 15);
indices.add(is1);
ScanFilterEvaluator evaluator = new ScanFilterEvaluator();
HRegion region =
initHRegion(tableName.getBytes(), null, null, "testNoIndexExpression",
TEST_UTIL.getConfiguration(), FAMILY1);
IndexRegionScanner scanner = evaluator.evaluate(scan, indices, new byte[0], region, tableName);
assertNull(scanner);
}