public static byte[] cloneValue(Cell cell) { byte[] output = new byte[cell.getValueLength()]; copyValueTo(cell, output, 0); return output; }
/** * Copy the Cell content into the passed buf in KeyValue serialization format. */ public static int appendTo(Cell cell, ByteBuffer buf, int offset, boolean withTags) { offset = ByteBufferUtils.putInt(buf, offset, keyLength(cell));// Key length offset = ByteBufferUtils.putInt(buf, offset, cell.getValueLength());// Value length offset = appendKeyTo(cell, buf, offset); offset = CellUtil.copyValueTo(cell, buf, offset);// Value bytes int tagsLength = cell.getTagsLength(); if (withTags && (tagsLength > 0)) { offset = ByteBufferUtils.putAsShort(buf, offset, tagsLength);// Tags length offset = PrivateCellUtil.copyTagsTo(cell, buf, offset);// Tags bytes } return offset; }
/**************** copy key and value *********************/ public static int appendToByteArray(Cell cell, byte[] output, int offset, boolean withTags) { int pos = offset; pos = Bytes.putInt(output, pos, keyLength(cell)); pos = Bytes.putInt(output, pos, cell.getValueLength()); pos = appendKeyTo(cell, output, pos); pos = CellUtil.copyValueTo(cell, output, pos); if (withTags && (cell.getTagsLength() > 0)) { pos = Bytes.putAsShort(output, pos, cell.getTagsLength()); pos = PrivateCellUtil.copyTagsTo(cell, output, pos); } return pos; }
public static byte[] cloneValue(Cell cell) { byte[] output = new byte[cell.getValueLength()]; copyValueTo(cell, output, 0); return output; }
public static byte[] cloneValue(Cell cell) { byte[] output = new byte[cell.getValueLength()]; copyValueTo(cell, output, 0); return output; }
public static byte[] cloneValue(Cell cell){ byte[] output = new byte[cell.getValueLength()]; copyValueTo(cell, output, 0); return output; }
/** * Copy the Cell content into the passed buf in KeyValue serialization format. */ public static int appendTo(Cell cell, ByteBuffer buf, int offset, boolean withTags) { offset = ByteBufferUtils.putInt(buf, offset, keyLength(cell));// Key length offset = ByteBufferUtils.putInt(buf, offset, cell.getValueLength());// Value length offset = appendKeyTo(cell, buf, offset); offset = CellUtil.copyValueTo(cell, buf, offset);// Value bytes int tagsLength = cell.getTagsLength(); if (withTags && (tagsLength > 0)) { offset = ByteBufferUtils.putAsShort(buf, offset, tagsLength);// Tags length offset = PrivateCellUtil.copyTagsTo(cell, buf, offset);// Tags bytes } return offset; }
/**************** copy key and value *********************/ public static int appendToByteArray(Cell cell, byte[] output, int offset, boolean withTags) { int pos = offset; pos = Bytes.putInt(output, pos, keyLength(cell)); pos = Bytes.putInt(output, pos, cell.getValueLength()); pos = appendKeyTo(cell, output, pos); pos = CellUtil.copyValueTo(cell, output, pos); if (withTags && (cell.getTagsLength() > 0)) { pos = Bytes.putAsShort(output, pos, cell.getTagsLength()); pos = PrivateCellUtil.copyTagsTo(cell, output, pos); } return pos; }
/**************** copy key and value *********************/ public static int appendToByteArray(Cell cell, byte[] output, int offset, boolean withTags) { int pos = offset; pos = Bytes.putInt(output, pos, keyLength(cell)); pos = Bytes.putInt(output, pos, cell.getValueLength()); pos = appendKeyTo(cell, output, pos); pos = CellUtil.copyValueTo(cell, output, pos); if (withTags && (cell.getTagsLength() > 0)) { pos = Bytes.putAsShort(output, pos, cell.getTagsLength()); pos = PrivateCellUtil.copyTagsTo(cell, output, pos); } return pos; }
/** * Copy the Cell content into the passed buf in KeyValue serialization format. */ public static int appendTo(Cell cell, ByteBuffer buf, int offset, boolean withTags) { offset = ByteBufferUtils.putInt(buf, offset, keyLength(cell));// Key length offset = ByteBufferUtils.putInt(buf, offset, cell.getValueLength());// Value length offset = appendKeyTo(cell, buf, offset); offset = CellUtil.copyValueTo(cell, buf, offset);// Value bytes int tagsLength = cell.getTagsLength(); if (withTags && (tagsLength > 0)) { offset = ByteBufferUtils.putAsShort(buf, offset, tagsLength);// Tags length offset = PrivateCellUtil.copyTagsTo(cell, buf, offset);// Tags bytes } return offset; }
/**************** copy key and value *********************/ public static int appendToByteArray(final Cell cell, final byte[] output, final int offset) { // TODO when cell instance of KV we can bypass all steps and just do backing single array // copy(?) int pos = offset; pos = Bytes.putInt(output, pos, keyLength(cell)); pos = Bytes.putInt(output, pos, cell.getValueLength()); pos = appendKeyTo(cell, output, pos); pos = CellUtil.copyValueTo(cell, output, pos); if ((cell.getTagsLength() > 0)) { pos = Bytes.putAsShort(output, pos, cell.getTagsLength()); pos = CellUtil.copyTagTo(cell, output, pos); } return pos; }
CellUtil.copyValueTo(cell, values, valueOffsets[totalCells]); if (cell.getValueLength() > maxValueLength) { maxValueLength = cell.getValueLength();
CellUtil.copyValueTo(cell, values, valueOffsets[totalCells]); if (cell.getValueLength() > maxValueLength) { maxValueLength = cell.getValueLength();