Examples of ColumnPrefixFilter


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

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

      // 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

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

      // 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

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

  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

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

                                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

Examples of org.hbase.async.ColumnPrefixFilter

                   Deferred.group(client.put(put3), client.put(put4))).join();
    final Scanner scanner = client.newScanner(table);
    scanner.setFamily(family);
    scanner.setStartKey("cpf1");
    scanner.setStopKey("cpf3");
    scanner.setFilter(new ColumnPrefixFilter("qa"));
    final ArrayList<ArrayList<KeyValue>> rows = scanner.nextRows().join();
    assertSizeIs(2, rows);
    ArrayList<KeyValue> kvs = rows.get(0);
    assertSizeIs(2, kvs);
    assertEq("v1", kvs.get(0).value());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.