Package org.apache.hadoop.hbase

Examples of org.apache.hadoop.hbase.KeyValue.matchingRow()


    protected boolean nextRow(byte [] currentRow, int offset, short length) throws IOException {
      assert this.joinedContinuationRow == null: "Trying to go to next row during joinedHeap read.";
      KeyValue next;
      while ((next = this.storeHeap.peek()) != null &&
             next.matchingRow(currentRow, offset, length)) {
        this.storeHeap.next(MOCKED_LIST);
      }
      resetFilters();
      // Calling the hook in CP which allows it to do a fast forward
      if (this.region.getCoprocessorHost() != null) {
View Full Code Here


      // Is there a KeyValue in 'snapshot' with the same TS? If so, upgrade the timestamp a bit.
      SortedSet<KeyValue> snSs = snapshot.tailSet(firstKv);
      if (!snSs.isEmpty()) {
        KeyValue snKv = snSs.first();
        // is there a matching KV in the snapshot?
        if (snKv.matchingRow(firstKv) && snKv.matchingQualifier(firstKv)) {
          if (snKv.getTimestamp() == now) {
            // poop,
            now += 1;
          }
        }
View Full Code Here

      Iterator<KeyValue> it = ss.iterator();
      while ( it.hasNext() ) {
        KeyValue kv = it.next();

        // if this isnt the row we are interested in, then bail:
        if (!kv.matchingColumn(family,qualifier) || !kv.matchingRow(firstKv) ) {
          break; // rows dont match, bail.
        }

        // if the qualifier matches and it's a put, just RM it out of the kvset.
        if (kv.getType() == KeyValue.Type.Put.getCode() &&
View Full Code Here

        heap.next(results, limit - results.size());
        if (limit > 0 && results.size() == limit) {
          return KV_LIMIT;
        }
        nextKv = heap.peek();
      } while (nextKv != null && nextKv.matchingRow(currentRow, offset, length));

      return nextKv;
    }

    /*
 
View Full Code Here

          // fetch to (possibly) reduce amount of data loads from disk.
          if (this.joinedHeap != null) {
            KeyValue nextJoinedKv = joinedHeap.peek();
            // If joinedHeap is pointing to some other row, try to seek to a correct one.
            boolean mayHaveData =
              (nextJoinedKv != null && nextJoinedKv.matchingRow(currentRow, offset, length))
              || (this.joinedHeap.requestSeek(KeyValue.createFirstOnRow(currentRow, offset, length),
                true, true)
                && joinedHeap.peek() != null
                && joinedHeap.peek().matchingRow(currentRow, offset, length));
            if (mayHaveData) {
View Full Code Here

    protected boolean nextRow(byte [] currentRow, int offset, short length) throws IOException {
      assert this.joinedContinuationRow == null: "Trying to go to next row during joinedHeap read.";
      KeyValue next;
      while ((next = this.storeHeap.peek()) != null &&
             next.matchingRow(currentRow, offset, length)) {
        this.storeHeap.next(MOCKED_LIST);
      }
      resetFilters();
      // Calling the hook in CP which allows it to do a fast forward
      if (this.region.getCoprocessorHost() != null) {
View Full Code Here

    // Is there a KeyValue in 'snapshot' with the same TS? If so, upgrade the timestamp a bit.
    SortedSet<KeyValue> snSs = snapshot.tailSet(firstKv);
    if (!snSs.isEmpty()) {
      KeyValue snKv = snSs.first();
      // is there a matching KV in the snapshot?
      if (snKv.matchingRow(firstKv) && snKv.matchingQualifier(firstKv)) {
        if (snKv.getTimestamp() == now) {
          // poop,
          now += 1;
        }
      }
View Full Code Here

            // A WALEdit may contain multiple operations (HBASE-3584) and/or
            // multiple rows (HBASE-5229).
            // Aggregate as much as possible into a single Put/Delete
            // operation before writing to the context.
            if (lastKV == null || lastKV.getType() != kv.getType() || !lastKV.matchingRow(kv)) {
              // row or type changed, write out aggregate KVs.
              if (put != null) context.write(tableOut, put);
              if (del != null) context.write(tableOut, del);

              if (kv.isDelete()) {
View Full Code Here

      // Is there a KeyValue in 'snapshot' with the same TS? If so, upgrade the timestamp a bit.
      SortedSet<KeyValue> snSs = snapshot.tailSet(firstKv);
      if (!snSs.isEmpty()) {
        KeyValue snKv = snSs.first();
        // is there a matching KV in the snapshot?
        if (snKv.matchingRow(firstKv) && snKv.matchingQualifier(firstKv)) {
          if (snKv.getTimestamp() == now) {
            // poop,
            now += 1;
          }
        }
View Full Code Here

      Iterator<KeyValue> it = ss.iterator();
      while ( it.hasNext() ) {
        KeyValue kv = it.next();

        // if this isnt the row we are interested in, then bail:
        if (!kv.matchingColumn(family,qualifier) || !kv.matchingRow(firstKv) ) {
          break; // rows dont match, bail.
        }

        // if the qualifier matches and it's a put, just RM it out of the kvset.
        if (kv.getType() == KeyValue.Type.Put.getCode() &&
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.