HBASE-22148 Provide a LimitedPrivate(COPROC) API for setting Cell timestamp without copying.

Signed-off-by: Josh Elser <elserj@apache.org>
This commit is contained in:
Sean Busbey 2019-05-14 19:56:17 -05:00
parent e919ca6ca7
commit 6ddf893a34
1 changed files with 6 additions and 4 deletions

View File

@ -1116,25 +1116,27 @@ public final class CellUtil {
/** /**
* Sets the given timestamp to the cell. * Sets the given timestamp to the cell.
*
* Note that this method is a LimitedPrivate API and may change between minor releases.
* @param cell * @param cell
* @param ts * @param ts
* @throws IOException when the passed cell is not of type {@link ExtendedCell} * @throws IOException when the passed cell is not of type {@link ExtendedCell}
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0.
*/ */
@Deprecated @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
public static void setTimestamp(Cell cell, long ts) throws IOException { public static void setTimestamp(Cell cell, long ts) throws IOException {
PrivateCellUtil.setTimestamp(cell, ts); PrivateCellUtil.setTimestamp(cell, ts);
} }
/** /**
* Sets the given timestamp to the cell. * Sets the given timestamp to the cell.
*
* Note that this method is a LimitedPrivate API and may change between minor releases.
* @param cell * @param cell
* @param ts buffer containing the timestamp value * @param ts buffer containing the timestamp value
* @param tsOffset offset to the new timestamp * @param tsOffset offset to the new timestamp
* @throws IOException when the passed cell is not of type {@link ExtendedCell} * @throws IOException when the passed cell is not of type {@link ExtendedCell}
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0.
*/ */
@Deprecated @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
public static void setTimestamp(Cell cell, byte[] ts, int tsOffset) throws IOException { public static void setTimestamp(Cell cell, byte[] ts, int tsOffset) throws IOException {
PrivateCellUtil.setTimestamp(cell, Bytes.toLong(ts, tsOffset)); PrivateCellUtil.setTimestamp(cell, Bytes.toLong(ts, tsOffset));
} }