當前位置: 首頁>>代碼示例>>Java>>正文


Java SingleColumnValueFilter.getOperator方法代碼示例

本文整理匯總了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];
    }
  }
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:27,代碼來源:Range.java

示例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);
}
 
開發者ID:tenggyut,項目名稱:HIndex,代碼行數:19,代碼來源:ScanFilterEvaluator.java

示例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);
}
 
開發者ID:tenggyut,項目名稱:HIndex,代碼行數:19,代碼來源:ScanFilterEvaluator.java

示例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());
}
 
開發者ID:dmmcerlean,項目名稱:cloud-bigtable-client,代碼行數:7,代碼來源:SingleColumnValueFilterAdapter.java


注:本文中的org.apache.hadoop.hbase.filter.SingleColumnValueFilter.getOperator方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。