Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Apache9 committed Jul 6, 2024
1 parent 9b3c880 commit 36ba5ca
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 410 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public Delete addFamily(final byte[] family) {
* @return this for invocation chaining
*/
public Delete addFamily(final byte[] family, final long timestamp) {
checkTimestamp(ts);
checkTimestamp(timestamp);
List<ExtendedCell> list = getCellList(family);
if (!list.isEmpty()) {
list.clear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import java.util.List;
import java.util.Map;
import java.util.NavigableMap;
import java.util.Objects;
import java.util.TreeMap;
import java.util.UUID;
import org.apache.hadoop.hbase.Cell;
Expand All @@ -37,6 +36,8 @@
import org.apache.hadoop.hbase.util.ClassSize;
import org.apache.yetus.audience.InterfaceAudience;

import org.apache.hbase.thirdparty.com.google.common.base.Preconditions;

/**
* Used to perform Increment operations on a single row.
* <p>
Expand Down Expand Up @@ -116,7 +117,7 @@ public Increment add(Cell cell) throws IOException {
* @return the Increment object
*/
public Increment addColumn(byte[] family, byte[] qualifier, long amount) {
Objects.requireNonNull(family, "family cannot be null");
Preconditions.checkArgument(family != null, "family cannot be null");
List<ExtendedCell> list = getCellList(family);
KeyValue kv = createPutKeyValue(family, qualifier, ts, Bytes.toBytes(amount));
list.add(kv);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ protected long extraHeapSize() {
* Set the timestamp of the delete.
*/
public Mutation setTimestamp(long timestamp) {
checkTimestamp(ts);
checkTimestamp(timestamp);
this.ts = timestamp;
return this;
}
Expand Down
Loading

0 comments on commit 36ba5ca

Please sign in to comment.