本文整理匯總了Java中org.apache.hadoop.hbase.filter.SingleColumnValueFilter.getOperator方法的典型用法代碼示例。如果您正苦於以下問題:Java SingleColumnValueFilter.getOperator方法的具體用法?Java SingleColumnValueFilter.getOperator怎麽用?Java SingleColumnValueFilter.getOperator使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.hadoop.hbase.filter.SingleColumnValueFilter
的用法示例。
在下文中一共展示了SingleColumnValueFilter.getOperator方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: fromFilter
import org.apache.hadoop.hbase.filter.SingleColumnValueFilter; //導入方法依賴的package包/類
public static Range[] fromFilter(SingleColumnValueFilter filter) {
if (!(filter.getComparator() instanceof BinaryComparator)) {
return new Range[0];
}
byte[] column = KeyValue.makeColumn(filter.getFamily(), filter.getQualifier());
CompareOp compareOp = filter.getOperator();
byte[] value = filter.getComparator().getValue();
if (compareOp == CompareOp.NOT_EQUAL) {
return new Range[] { new Range(column, null, CompareOp.NO_OP, value, CompareOp.LESS),
new Range(column, value, CompareOp.GREATER, null, CompareOp.NO_OP) };
} else {
switch (compareOp) {
case EQUAL:
case GREATER_OR_EQUAL:
case GREATER:
return new Range[] { new Range(column, value, compareOp, null, CompareOp.NO_OP) };
case LESS:
case LESS_OR_EQUAL:
return new Range[] { new Range(column, null, CompareOp.NO_OP, value, compareOp) };
default:
return new Range[0];
}
}
}
示例2: doFiltersRestruct
import org.apache.hadoop.hbase.filter.SingleColumnValueFilter; //導入方法依賴的package包/類
Filter doFiltersRestruct(Filter filter) {
if (filter instanceof SingleColumnValueFilter) {
ValuePartition vp = null;
if (filter instanceof SingleColumnValuePartitionFilter) {
vp = ((SingleColumnValuePartitionFilter) filter).getValuePartition();
}
SingleColumnValueFilter scvf = (SingleColumnValueFilter) filter;
if (scvf.getOperator().equals(CompareOp.LESS)
|| scvf.getOperator().equals(CompareOp.LESS_OR_EQUAL)
|| scvf.getOperator().equals(CompareOp.GREATER)
|| scvf.getOperator().equals(CompareOp.GREATER_OR_EQUAL)) {
return new SingleColumnRangeFilter(scvf.getFamily(), scvf.getQualifier(), vp, scvf
.getComparator().getValue(), scvf.getOperator(), null, null);
}
}
FilterGroupingWorker groupWorker = new FilterGroupingWorker();
return groupWorker.group(filter);
}
示例3: selectBestFitAndPossibleIndicesForSCVF
import org.apache.hadoop.hbase.filter.SingleColumnValueFilter; //導入方法依賴的package包/類
private FilterNode selectBestFitAndPossibleIndicesForSCVF(List<IndexSpecification> indices,
SingleColumnValueFilter filter) {
if (CompareOp.NOT_EQUAL == filter.getOperator() || CompareOp.NO_OP == filter.getOperator()) {
return new NoIndexFilterNode();
}
FilterColumnValueDetail detail = null;
if (filter instanceof SingleColumnValuePartitionFilter) {
SingleColumnValuePartitionFilter escvf = (SingleColumnValuePartitionFilter) filter;
detail =
new FilterColumnValueDetail(escvf.getFamily(), escvf.getQualifier(), escvf
.getComparator().getValue(), escvf.getValuePartition(), escvf.getOperator());
} else {
detail =
new FilterColumnValueDetail(filter.getFamily(), filter.getQualifier(), filter
.getComparator().getValue(), filter.getOperator());
}
return selectBestFitIndexForColumn(indices, detail);
}
示例4: createValueFilter
import org.apache.hadoop.hbase.filter.SingleColumnValueFilter; //導入方法依賴的package包/類
/**
* Construct a ValueFilter for a SingleColumnValueFilter.
*/
private ValueFilter createValueFilter(SingleColumnValueFilter filter) {
return new ValueFilter(filter.getOperator(), filter.getComparator());
}