/** * Calculates the serialized key size. We always serialize in the KeyValue's serialization * format. * @param cell the cell for which the key size has to be calculated. * @return the key size * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0. */ @Deprecated public static int estimatedSerializedSizeOfKey(final Cell cell) { return PrivateCellUtil.estimatedSerializedSizeOfKey(cell); }
@Override public void write(DataOutput out) throws IOException { out.writeInt(PrivateCellUtil.estimatedSerializedSizeOfKey(kv)); out.writeInt(0); PrivateCellUtil.writeFlatKey(kv, out); }
return ((ExtendedCell) cell).write(out, withTags); } else { ByteBufferUtils.putInt(out, estimatedSerializedSizeOfKey(cell)); ByteBufferUtils.putInt(out, cell.getValueLength()); writeFlatKey(cell, out); int lenWritten = (2 * Bytes.SIZEOF_INT) + estimatedSerializedSizeOfKey(cell) + cell.getValueLength(); if (withTags) {
totalKeyLength += PrivateCellUtil.estimatedSerializedSizeOfKey(cell); totalValueLength += cell.getValueLength();
@Override public void write(DataOutput out) throws IOException { out.writeInt(PrivateCellUtil.estimatedSerializedSizeOfKey(kv)); out.writeInt(0); PrivateCellUtil.writeFlatKey(kv, out); }
@Override public void write(DataOutput out) throws IOException { out.writeInt(PrivateCellUtil.estimatedSerializedSizeOfKey(kv)); out.writeInt(0); PrivateCellUtil.writeFlatKey(kv, out); }
return ((ExtendedCell) cell).write(out, withTags); } else { ByteBufferUtils.putInt(out, estimatedSerializedSizeOfKey(cell)); ByteBufferUtils.putInt(out, cell.getValueLength()); writeFlatKey(cell, out); int lenWritten = (2 * Bytes.SIZEOF_INT) + estimatedSerializedSizeOfKey(cell) + cell.getValueLength(); if (withTags) {
return ((ExtendedCell) cell).write(out, withTags); } else { ByteBufferUtils.putInt(out, estimatedSerializedSizeOfKey(cell)); ByteBufferUtils.putInt(out, cell.getValueLength()); writeFlatKey(cell, out); int lenWritten = (2 * Bytes.SIZEOF_INT) + estimatedSerializedSizeOfKey(cell) + cell.getValueLength(); if (withTags) {