Package org.apache.hadoop.hbase

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


      for (int idx = 0; idx < numEdits; idx++) {
        if (compressionContext != null) {
          this.add(KeyValueCompression.readKV(in, compressionContext));
        } else {
          KeyValue kv = new KeyValue();
          kv.readFields(in);
          this.add(kv);
        }
      }
      int numFamilies = in.readInt();
      if (numFamilies > 0) {
View Full Code Here


      }
    } else {
      // this is an old style HLog entry. The int that we just
      // read is actually the length of a single KeyValue
      KeyValue kv = new KeyValue();
      kv.readFields(versionOrLength, in);
      this.add(kv);
    }

  }
View Full Code Here

    int length = in.readInt();
    KeyValue kv;
    // its a special IndexedKeyValue
    if (length == INDEX_TYPE_LENGTH_MARKER) {
      kv = new IndexedKeyValue();
      kv.readFields(in);
    } else {
      kv = new KeyValue();
      kv.readFields(length, in);
    }
    return kv;
View Full Code Here

    if (length == INDEX_TYPE_LENGTH_MARKER) {
      kv = new IndexedKeyValue();
      kv.readFields(in);
    } else {
      kv = new KeyValue();
      kv.readFields(length, in);
    }
    return kv;
  }

  /**
 
View Full Code Here

    byte[] data = out.getData();
    // read it back in
    KeyValue read = new KeyValue();
    DataInputBuffer in = new DataInputBuffer();
    in.reset(data, data.length);
    read.readFields(in);
    in.close();

    // validate that its the same
    assertTrue("Row didn't match!", Bytes.equals(row, read.getRow()));
    assertTrue("Family didn't match!", Bytes.equals(family, read.getFamily()));
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.