示例#1
0
 public static ByteBuffer serializeForSSTable(ColumnFamily cf) {
   try {
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     DataOutputStream dos = new DataOutputStream(baos);
     DeletionInfo.serializer().serializeForSSTable(cf.deletionInfo(), dos);
     dos.writeInt(cf.getColumnCount());
     new ColumnIndex.Builder(cf, ByteBufferUtil.EMPTY_BYTE_BUFFER, dos).build(cf);
     return ByteBuffer.wrap(baos.toByteArray());
   } catch (IOException e) {
     throw new RuntimeException(e);
   }
 }