HBASE-27301 Add Delete addFamilyVersion timestamp verify (#4700)
Co-authored-by: SiCheng-Zheng <zhengsicheng@jd.com>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit b531e71455
)
This commit is contained in:
parent
da472aac06
commit
0ceb3577fc
|
@ -200,6 +200,9 @@ public class Delete extends Mutation {
|
||||||
* @return this for invocation chaining
|
* @return this for invocation chaining
|
||||||
*/
|
*/
|
||||||
public Delete addFamilyVersion(final byte[] family, final long timestamp) {
|
public Delete addFamilyVersion(final byte[] family, final long timestamp) {
|
||||||
|
if (timestamp < 0) {
|
||||||
|
throw new IllegalArgumentException("Timestamp cannot be negative. ts=" + timestamp);
|
||||||
|
}
|
||||||
List<Cell> list = getCellList(family);
|
List<Cell> list = getCellList(family);
|
||||||
list.add(new KeyValue(row, family, null, timestamp, KeyValue.Type.DeleteFamilyVersion));
|
list.add(new KeyValue(row, family, null, timestamp, KeyValue.Type.DeleteFamilyVersion));
|
||||||
return this;
|
return this;
|
||||||
|
|
Loading…
Reference in New Issue