Esempio n. 1
0
 @Override
 public void write(final DataOutput out) throws IOException {
   ProtobufUtil.toMutationNoData(MutationType.PUT, put)
       .writeDelimitedTo(DataOutputOutputStream.from(out));
   out.writeInt(put.size());
   CellScanner scanner = put.cellScanner();
   while (scanner.advance()) {
     KeyValue kv = KeyValueUtil.ensureKeyValue(scanner.current());
     KeyValue.write(kv, out);
   }
 }
Esempio n. 2
0
 public void write(final DataOutput out) throws IOException {
   out.writeByte(DELETE_VERSION);
   Bytes.writeByteArray(out, this.row);
   out.writeLong(this.ts);
   out.writeLong(this.lockId);
   out.writeInt(familyMap.size());
   for (Map.Entry<byte[], List<KeyValue>> entry : familyMap.entrySet()) {
     Bytes.writeByteArray(out, entry.getKey());
     List<KeyValue> list = entry.getValue();
     out.writeInt(list.size());
     for (KeyValue kv : list) {
       kv.write(out);
     }
   }
 }