Question

For Apache Phoenix, I am trying to understand what the metrics SCAN_BYTES and MUTATED_BYTES are actually measuring. In particular, do they strictly measure:

  • For SCAN_BYTES, the bytes from the rows of data needed to execute the query? Or are other bytes (such as any overhead data or data read in other operations such as reading from secondary indexes or metadata tables) included in the metric?
  • For MUTATED_BYTES, the bytes actually mutated (inserted, deleted, updated) the Phoenix primary data table(s) against which the query was executed? Or are there other bytes (overhead, ancillary operations, updating indexes, etc.) also included in this metric?

Investigation thus far

The Phoenix website is not very specific, and simply says:

  • MUTATION_BYTES - Size of mutations in bytes
  • SCAN_BYTES - Number of bytes read by scans

It gives an example of the use case that I am interested in, but does not give specifics:

Monitor the amount of bytes being written to or read from HBase for a SQL statement. Metrics to use: MUTATION_BYTES and SCAN_BYTES

I started exploring the GitHub for the Apache Phoenix project. In MetricType.java, the metrics are defined identically as in the Phoenix site, but there is no code to show how those metrics are computed. In ScanMetricsHolder.java, related to SCAN_BYTES, I saw the line:

import org.apache.hadoop.hbase.client.Scan;

So I started looking into the Apache HBase classes Scan, ScanMetrics, and ServerSideScanMetrics. It is not clear to me how any of the fields in these HBase classes are connected to the Phoenix metric SCAN_BYTES (and similarly for MUTATED_BYTES).

Where could I find how the Phoenix metrics SCAN_BYTES and MUTATED_BYTES are connected to HBase metrics so I can determine what the Phoenix metrics are actually measuring?

0

There are 0 best solutions below