Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void write(final DataOutput out)
- throws IOException {
- out.writeByte(PUT_VERSION);
- Bytes.writeByteArray(out, this.row);
- out.writeLong(this.timestamp);
- out.writeLong(this.lockId);
- out.writeBoolean(this.writeToWAL);
- out.writeInt(familyMap.size());
- for (Map.Entry<byte [], List<KeyValue>> entry : familyMap.entrySet()) {
- Bytes.writeByteArray(out, entry.getKey());
- List<KeyValue> keys = entry.getValue();
- out.writeInt(keys.size());
- int totalLen = 0;
- for(KeyValue kv : keys) {
- totalLen += kv.getLength();
- }
- out.writeInt(totalLen);
- for(KeyValue kv : keys) {
- out.writeInt(kv.getLength());
- out.write(kv.getBuffer(), kv.getOffset(), kv.getLength());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement