ndimiduk commented on a change in pull request #3906:
URL: https://github.com/apache/hbase/pull/3906#discussion_r762327178
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncTableImpl.java
##########
@@ -329,43 +348,52 @@ private void preCheck() {
public CompletableFuture<Boolean> thenPut(Put put) {
validatePut(put, conn.connConf.getMaxKeyValueSize());
preCheck();
+ final Supplier<Span> supplier = new TableOperationSpanBuilder()
+ .setTableName(tableName)
+ .setOperation(HBaseSemanticAttributes.Operation.CHECK_AND_MUTATE);
return tracedFuture(
() -> RawAsyncTableImpl.this.<Boolean> newCaller(row,
put.getPriority(), rpcTimeoutNs)
.action((controller, loc, stub) ->
RawAsyncTableImpl.mutate(controller, loc, stub, put,
(rn, p) -> RequestConverter.buildMutateRequest(rn, row, family,
qualifier, op, value,
null, timeRange, p, HConstants.NO_NONCE, HConstants.NO_NONCE),
(c, r) -> r.getProcessed()))
.call(),
- "AsyncTable.CheckAndMutateBuilder.thenPut", tableName);
+ supplier);
}
@Override
public CompletableFuture<Boolean> thenDelete(Delete delete) {
preCheck();
+ final Supplier<Span> supplier = new TableOperationSpanBuilder()
+ .setTableName(tableName)
+ .setOperation(HBaseSemanticAttributes.Operation.CHECK_AND_MUTATE);
return tracedFuture(
() -> RawAsyncTableImpl.this.<Boolean> newCaller(row,
delete.getPriority(), rpcTimeoutNs)
.action((controller, loc, stub) ->
RawAsyncTableImpl.mutate(controller, loc, stub, delete,
(rn, d) -> RequestConverter.buildMutateRequest(rn, row, family,
qualifier, op, value,
null, timeRange, d, HConstants.NO_NONCE, HConstants.NO_NONCE),
(c, r) -> r.getProcessed()))
.call(),
- "AsyncTable.CheckAndMutateBuilder.thenDelete", tableName);
+ supplier);
}
@Override
- public CompletableFuture<Boolean> thenMutate(RowMutations mutation) {
+ public CompletableFuture<Boolean> thenMutate(RowMutations mutations) {
preCheck();
- validatePutsInRowMutations(mutation, conn.connConf.getMaxKeyValueSize());
+ validatePutsInRowMutations(mutations,
conn.connConf.getMaxKeyValueSize());
+ final Supplier<Span> supplier = new TableOperationSpanBuilder()
+ .setTableName(tableName)
+ .setOperation(HBaseSemanticAttributes.Operation.BATCH);
Review comment:
Latest patch corrects the operation type for the checkandmutate cases
@taklwu pointed out. thanks for noticing!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]