Package org.apache.hadoop.hbase.filter

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


   */
  public HScannerInterface obtainScanner(final Text[] columns,
      final Text startRow, final Text stopRow, final long timestamp)
  throws IOException {
    return obtainScanner(columns, startRow, timestamp,
      new WhileMatchRowFilter(new StopRowFilter(stopRow)));
  }
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

    assertTrue(((byte [])obj)[0] == A);
    // Do 'known' Writable type.
    obj = doType(conf, new Text(""), Text.class);
    assertTrue(obj instanceof Text);
    // Try type that should get transferred old fashion way.
    obj = doType(conf, new StopRowFilter(HConstants.EMPTY_BYTE_ARRAY),
        RowFilterInterface.class);
    assertTrue(obj instanceof StopRowFilter);
  }
View Full Code Here

    public void restart(byte[] firstRow) throws IOException {
      if ((endRow != null) && (endRow.length > 0)) {
        if (trrRowFilter != null) {
          final Set<RowFilterInterface> rowFiltersSet =
            new HashSet<RowFilterInterface>();
          rowFiltersSet.add(new StopRowFilter(endRow));
          rowFiltersSet.add(trrRowFilter);
          this.scanner = this.htable.getScanner(trrInputColumns, startRow,
            new RowFilterSet(RowFilterSet.Operator.MUST_PASS_ALL,
              rowFiltersSet));
        } else {
View Full Code Here

      final byte [] arbitraryStopRow = Bytes.toBytes("c");
      byte [] actualStopRow = null;
      byte [][] columns = {COLFAMILY_NAME1};
      scanner = region.getScanner(columns,
          arbitraryStartRow, HConstants.LATEST_TIMESTAMP,
          new WhileMatchRowFilter(new StopRowFilter(arbitraryStopRow)));
      HStoreKey key = new HStoreKey();
      TreeMap<byte [], Cell> value =
        new TreeMap<byte [], Cell>(Bytes.BYTES_COMPARATOR);
      while (scanner.next(key, value)) {
        if (actualStartRow == null) {
View Full Code Here

   */
  public Scanner getScanner(final byte [][] columns,
    final byte [] startRow, final byte [] stopRow, final long timestamp)
  throws IOException {
    return getScanner(columns, startRow, timestamp,
      new WhileMatchRowFilter(new StopRowFilter(stopRow)));
  }
View Full Code Here

      final Text arbitraryStopRow = new Text("c");
      Text actualStopRow = null;
      Text [] columns = new Text [] {new Text(COLFAMILY_NAME1)};
      scanner = region.getScanner(columns,
          arbitraryStartRow, HConstants.LATEST_TIMESTAMP,
          new WhileMatchRowFilter(new StopRowFilter(arbitraryStopRow)));
      HStoreKey key = new HStoreKey();
      TreeMap<Text, byte[]> value = new TreeMap<Text, byte []>();
      while (scanner.next(key, value)) {
        if (actualStartRow == null) {
          actualStartRow = new Text(key.getRow());
View Full Code Here

   */
  public HScannerInterface obtainScanner(final Text[] columns,
      final Text startRow, final Text stopRow, final long timestamp)
  throws IOException {
    return obtainScanner(columns, startRow, timestamp,
      new WhileMatchRowFilter(new StopRowFilter(stopRow)));
  }
View Full Code Here

* It expects that the whole input string consists of only
* the rowKey that you wish to stop on.
*/
public class StopRowFilterFactory implements FilterFactory {
  public RowFilterInterface getFilterFromJSON(String args) {
    return new StopRowFilter(Bytes.toBytes(args));
  }
View Full Code Here

      return null;
    }
  }

  protected RowFilterInterface getStopRow(byte[] stopRow) {
    return new WhileMatchRowFilter(new StopRowFilter(stopRow));
  }
View Full Code Here

TOP

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

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.