Package org.apache.hadoop.hbase.filter

Examples of org.apache.hadoop.hbase.filter.ColumnPrefixFilter


                // each column family filter consists of a FamilyFilter AND a PrefixFilter
                FilterList thisColumnFilter = new FilterList(FilterList.Operator.MUST_PASS_ALL);
                thisColumnFilter.addFilter(new FamilyFilter(CompareOp.EQUAL,
                        new BinaryComparator(colInfo.getColumnFamily())));
                thisColumnFilter.addFilter(new ColumnPrefixFilter(
                        colInfo.getColumnPrefix()));

                allColumnFilters.addFilter(thisColumnFilter);
            }
        }
View Full Code Here


      // Get all latest entry row key of all existing instances
      // Consumer state column is named as "<groupId><instanceId>"
      Get get = new Get(rowKey);
      get.addFamily(QueueEntryRow.COLUMN_FAMILY);
      get.setFilter(new ColumnPrefixFilter(Bytes.toBytes(groupId)));
      List<HBaseConsumerState> consumerStates = HBaseConsumerState.create(hTable.get(get));

      int oldInstances = consumerStates.size();

      // Nothing to do if size doesn't change
View Full Code Here

      // Get all latest entry row key of all existing instances
      // Consumer state column is named as "<groupId><instanceId>"
      Get get = new Get(rowKey);
      get.addFamily(QueueEntryRow.COLUMN_FAMILY);
      get.setFilter(new ColumnPrefixFilter(Bytes.toBytes(groupId)));
      List<HBaseConsumerState> consumerStates = HBaseConsumerState.create(hTable.get(get));

      int oldInstances = consumerStates.size();

      // Nothing to do if size doesn't change
View Full Code Here

  protected void fetchAll(byte[] row, byte[] columnPrefix, Map<byte[], byte[]> result) throws IOException {
    Get get = new Get(row);
    get.addFamily(QueueEntryRow.COLUMN_FAMILY);
    get.setMaxVersions(1);
    if (columnPrefix != null) {
      get.setFilter(new ColumnPrefixFilter(columnPrefix));
    }
    Result hTableResult = hTable.get(get);

    if (hTableResult.isEmpty()) {
      return;
View Full Code Here

                                Bytes.toString(colInfo.getColumnPrefix()));
                    }

                    // add a PrefixFilter to the list of column filters
                    if (colInfo.getColumnPrefix() != null) {
                        columnFilters.addFilter(new ColumnPrefixFilter(
                            colInfo.getColumnPrefix()));
                    }
                }
                else {
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.filter.ColumnPrefixFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.