Skip to content

Commit 1b5d20d

Browse files
SiCheng-ZhengSiCheng-Zheng
authored andcommitted
HBASE-27301 Add Delete addFamilyVersion timestamp verify (#4700)
Co-authored-by: SiCheng-Zheng <[email protected]> Signed-off-by: Duo Zhang <[email protected]> (cherry picked from commit b531e71)
1 parent f36b349 commit 1b5d20d

File tree

1 file changed

+3
-0
lines changed
  • hbase-client/src/main/java/org/apache/hadoop/hbase/client

1 file changed

+3
-0
lines changed

hbase-client/src/main/java/org/apache/hadoop/hbase/client/Delete.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,9 @@ public Delete addFamily(final byte[] family, final long timestamp) {
200200
* @return this for invocation chaining
201201
*/
202202
public Delete addFamilyVersion(final byte[] family, final long timestamp) {
203+
if (timestamp < 0) {
204+
throw new IllegalArgumentException("Timestamp cannot be negative. ts=" + timestamp);
205+
}
203206
List<Cell> list = getCellList(family);
204207
list.add(new KeyValue(row, family, null, timestamp, KeyValue.Type.DeleteFamilyVersion));
205208
return this;

0 commit comments

Comments
 (0)