HBASE-21815 Make isTrackingMetrics and getMetrics of ScannerContext public

Signed-off-by: Andrew Purtell <apurtell@apache.org>
This commit is contained in:
chfeng 2019-01-31 21:23:10 +08:00 committed by Andrew Purtell
parent c3e490f75c
commit 04b4c9973a
No known key found for this signature in database
GPG Key ID: 8597754DD5365CCD
1 changed files with 2 additions and 2 deletions

View File

@ -124,7 +124,7 @@ public class ScannerContext {
this.metrics = trackMetrics ? new ServerSideScanMetrics() : null; this.metrics = trackMetrics ? new ServerSideScanMetrics() : null;
} }
boolean isTrackingMetrics() { public boolean isTrackingMetrics() {
return this.metrics != null; return this.metrics != null;
} }
@ -133,7 +133,7 @@ public class ScannerContext {
* has been made to confirm that metrics are indeed being tracked. * has been made to confirm that metrics are indeed being tracked.
* @return {@link ServerSideScanMetrics} instance that is tracking metrics for this scan * @return {@link ServerSideScanMetrics} instance that is tracking metrics for this scan
*/ */
ServerSideScanMetrics getMetrics() { public ServerSideScanMetrics getMetrics() {
assert isTrackingMetrics(); assert isTrackingMetrics();
return this.metrics; return this.metrics;
} }