HBASE-26545 Implement tracing of scan
authorNick Dimiduk <ndimiduk@apache.org>
Thu, 20 Jan 2022 20:39:20 +0000 (12:39 -0800)
committerNick Dimiduk <ndimiduk@gmail.com>
Mon, 28 Mar 2022 10:46:59 +0000 (12:46 +0200)
commit620e5c6d0af57ddb67e18bb97725e1d87ffb5fe5
tree4c9232ea3e8a429df2e4290b9135b45c231c8647
parent4f491fd5e40c0986dc92f8b231d419a2b07e5a0e
HBASE-26545 Implement tracing of scan

* on `AsyncTable`, both `scan` and `scanAll` methods should result in `SCAN` table operations.
* the span of the `SCAN` table operation should have children representing all the RPC calls
  involved in servicing the scan.
* when a user provides custom implementation of `AdvancedScanResultConsumer`, any spans emitted
  from the callback methods should also be tied to the span that represents the `SCAN` table
  operation. This is easily done because these callbacks are executed on the RPC thread.
* when a user provides a custom implementation of `ScanResultConsumer`, any spans emitted from the
  callback methods should be also be tied to the span that represents the `SCAN` table
  operation. This accomplished by carefully passing the span instance around after it is created.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
20 files changed:
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncClientScanner.java
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncScanSingleRegionRpcRetryingCaller.java
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncTableImpl.java
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncTableResultScanner.java
hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncTableImpl.java
hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableTracing.java
hbase-client/src/test/java/org/apache/hadoop/hbase/client/trace/hamcrest/SpanDataMatchers.java
hbase-server/src/test/java/org/apache/hadoop/hbase/StartTestingClusterOption.java
hbase-server/src/test/java/org/apache/hadoop/hbase/client/AbstractTestAsyncTableScan.java
hbase-server/src/test/java/org/apache/hadoop/hbase/client/LimitedScanResultConsumer.java [new file with mode: 0644]
hbase-server/src/test/java/org/apache/hadoop/hbase/client/SimpleScanResultConsumer.java
hbase-server/src/test/java/org/apache/hadoop/hbase/client/SimpleScanResultConsumerImpl.java [new file with mode: 0644]
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableScan.java
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableScanAll.java
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableScanMetrics.java
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableScanner.java
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestRawAsyncTableScan.java
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TracedAdvancedScanResultConsumer.java [new file with mode: 0644]
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TracedScanResultConsumer.java [new file with mode: 0644]
pom.xml