/** * Fetch the write timestamp from the payload table row key. * * @param payloadTableRowKey byte array containing payload table row key * @param offset start of the row key in the byte array * @param rowKeyLength length of the row key byte array * @return write timestamp */ public static long getWriteTimestamp(byte[] payloadTableRowKey, int offset, int rowKeyLength) { return Bytes.toLong(payloadTableRowKey, offset + getTopicLengthPayloadEntry(rowKeyLength) + Bytes.SIZEOF_LONG); }
/** * Fetch the write timestamp from the payload table row key. * * @param payloadTableRowKey byte array containing payload table row key * @param offset start of the row key in the byte array * @param rowKeyLength length of the row key byte array * @return write timestamp */ public static long getWriteTimestamp(byte[] payloadTableRowKey, int offset, int rowKeyLength) { return Bytes.toLong(payloadTableRowKey, offset + getTopicLengthPayloadEntry(rowKeyLength) + Bytes.SIZEOF_LONG); }
int sizeOfRowKey = cell.getRowLength() - prefixLength; long writeTimestamp = MessagingUtils.getWriteTimestamp(cell.getRowArray(), rowKeyOffset, sizeOfRowKey); int topicIdLength = MessagingUtils.getTopicLengthPayloadEntry(sizeOfRowKey) - Bytes.SIZEOF_INT; int generationId = Bytes.toInt(cell.getRowArray(), rowKeyOffset + topicIdLength);
int sizeOfRowKey = cell.getRowLength() - prefixLength; long writeTimestamp = MessagingUtils.getWriteTimestamp(cell.getRowArray(), rowKeyOffset, sizeOfRowKey); int topicIdLength = MessagingUtils.getTopicLengthPayloadEntry(sizeOfRowKey) - Bytes.SIZEOF_INT; int generationId = Bytes.toInt(cell.getRowArray(), rowKeyOffset + topicIdLength);
int sizeOfRowKey = cell.getRowLength() - prefixLength; long writeTimestamp = MessagingUtils.getWriteTimestamp(cell.getRowArray(), rowKeyOffset, sizeOfRowKey); int topicIdLength = MessagingUtils.getTopicLengthPayloadEntry(sizeOfRowKey) - Bytes.SIZEOF_INT; int generationId = Bytes.toInt(cell.getRowArray(), rowKeyOffset + topicIdLength);
int sizeOfRowKey = cell.getRowLength() - prefixLength; long writeTimestamp = MessagingUtils.getWriteTimestamp(cell.getRowArray(), rowKeyOffset, sizeOfRowKey); int topicIdLength = MessagingUtils.getTopicLengthPayloadEntry(sizeOfRowKey) - Bytes.SIZEOF_INT; int generationId = Bytes.toInt(cell.getRowArray(), rowKeyOffset + topicIdLength);
int sizeOfRowKey = cell.getRowLength() - prefixLength; long writeTimestamp = MessagingUtils.getWriteTimestamp(cell.getRowArray(), rowKeyOffset, sizeOfRowKey); int topicIdLength = MessagingUtils.getTopicLengthPayloadEntry(sizeOfRowKey) - Bytes.SIZEOF_INT; int generationId = Bytes.toInt(cell.getRowArray(), rowKeyOffset + topicIdLength);
int sizeOfRowKey = cell.getRowLength() - prefixLength; long writeTimestamp = MessagingUtils.getWriteTimestamp(cell.getRowArray(), rowKeyOffset, sizeOfRowKey); int topicIdLength = MessagingUtils.getTopicLengthPayloadEntry(sizeOfRowKey) - Bytes.SIZEOF_INT; int generationId = Bytes.toInt(cell.getRowArray(), rowKeyOffset + topicIdLength);
int sizeOfRowKey = cell.getRowLength() - prefixLength; long writeTimestamp = MessagingUtils.getWriteTimestamp(cell.getRowArray(), rowKeyOffset, sizeOfRowKey); int topicIdLength = MessagingUtils.getTopicLengthPayloadEntry(sizeOfRowKey) - Bytes.SIZEOF_INT; int generationId = Bytes.toInt(cell.getRowArray(), rowKeyOffset + topicIdLength);