Package org.apache.hadoop.hbase.filter

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


      byte [] prefix = Bytes.toBytes("ab");
      Filter newFilter = new PrefixFilter(prefix);
      Scan scan = new Scan();
      scan.setFilter(newFilter);
      rowPrefixFilter(scan);
      RowFilterInterface oldFilter = new PrefixRowFilter(Bytes.toBytes("ab"));
      scan = new Scan();
      scan.setOldFilter(oldFilter);
      rowPrefixFilter(scan);
     
      byte[] stopRow = Bytes.toBytes("bbc");
View Full Code Here


          long id = inc.startBatchUpdate(new Text("bbb"));
          inc.put(id, families[0], "bbb".getBytes());
          inc.commit(id);
        }
      }
      RowFilterInterface f =
        new WhileMatchRowFilter(new StopRowFilter(new Text("aad")));
      scanner = table.obtainScanner(families, HConstants.EMPTY_START_ROW,
        HConstants.LATEST_TIMESTAMP, f);
      int count = 0;
      for (Map.Entry<HStoreKey, SortedMap<Text, byte []>> e: scanner) {
View Full Code Here

    // Get the filter.  The RegExpRowFilter used should filter out vowels.
    Map<Text, byte[]> colCriteria = new TreeMap<Text, byte[]>();
    for (int i = 0; i < colKeys.length; i++) {
      colCriteria.put(colKeys[i], GOOD_BYTES);
    }
    RowFilterInterface filter = new RegExpRowFilter("[^aeiou]", colCriteria);

    // Create the scanner from the filter.
    HScannerInterface scanner = table.obtainScanner(colKeys, new Text(new
      String(new char[] { FIRST_ROWKEY })), filter);
View Full Code Here

    // the WhileMatchRowFilter(StopRowFilter) should filter out all rows
    // greater than or equal to 'r'.
    Set<RowFilterInterface> filterSet = new HashSet<RowFilterInterface>();
    filterSet.add(new RegExpRowFilter("[^aeiou]"));
    filterSet.add(new WhileMatchRowFilter(new StopRowFilter(new Text("r"))));
    RowFilterInterface filter =
      new RowFilterSet(RowFilterSet.Operator.MUST_PASS_ALL, filterSet);
   
    // Create the scanner from the filter.
    HScannerInterface scanner = table.obtainScanner(colKeys, new Text(new
        String(new char[] { FIRST_ROWKEY })), filter);
View Full Code Here

      } else {
        scan = table.obtainScanner(cols, rowKey, timestamp);
      }

      if (this.stopRow.toString().length() > 0) {
        RowFilterInterface filter = new WhileMatchRowFilter(new StopRowFilter(
            stopRow));
        scan = table.obtainScanner(cols, rowKey, filter);
      }

      HStoreKey key = new HStoreKey();
View Full Code Here

                stores[i].getFamily().getName())) {
              columns.add(cols[j]);
            }
          }

          RowFilterInterface f = filter;
          if (f != null) {
            // Need to replicate filters.
            // At least WhileMatchRowFilter will mess up the scan if only
            // one shared across many rows. See HADOOP-2467.
            f = (RowFilterInterface)WritableUtils.clone(filter, conf);
View Full Code Here

                stores[i].getFamily().getName())) {
              columns.add(cols[j]);
            }
          }

          RowFilterInterface f = filter;
          if (f != null) {
            // Need to replicate filters.
            // At least WhileMatchRowFilter will mess up the scan if only
            // one shared across many rows. See HADOOP-2467.
            f = (RowFilterInterface)WritableUtils.clone(filter, conf);
View Full Code Here

  protected ScannerIdentifier createScanner(ScannerModel innerModel,
      byte[] tableName, ScannerDescriptor scannerDescriptor)
      throws HBaseRestException {

    RowFilterInterface filterSet = null;

    // Might want to change this. I am doing this so that I can use
    // a switch statement that is more efficient.
    int switchInt = 0;
    if (scannerDescriptor.getColumns() != null
View Full Code Here

      byte [] prefix = Bytes.toBytes("ab");
      Filter newFilter = new PrefixFilter(prefix);
      Scan scan = new Scan();
      scan.setFilter(newFilter);
      rowPrefixFilter(scan);
      RowFilterInterface oldFilter = new PrefixRowFilter(Bytes.toBytes("ab"));
      scan = new Scan();
      scan.setOldFilter(oldFilter);
      rowPrefixFilter(scan);
     
      byte[] stopRow = Bytes.toBytes("bbc");
View Full Code Here

                stores[i].getFamily().getName())) {
              columns.add(cols[j]);
            }
          }

          RowFilterInterface f = filter;
          if (f != null) {
            // Need to replicate filters.
            // At least WhileMatchRowFilter will mess up the scan if only
            // one shared across many rows. See HADOOP-2467.
            f = WritableUtils.clone(filter, conf);
View Full Code Here

TOP

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

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.