@InterfaceAudience.Public public class ServerSideScanMetrics extends Object
Modifier and Type | Field and Description |
---|---|
static String |
COUNT_OF_ROWS_FILTERED_KEY
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
(HBASE-17886). Use
COUNT_OF_ROWS_FILTERED_KEY_METRIC_NAME . |
static String |
COUNT_OF_ROWS_FILTERED_KEY_METRIC_NAME |
static String |
COUNT_OF_ROWS_SCANNED_KEY
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
(HBASE-17886). Use
COUNT_OF_ROWS_SCANNED_KEY_METRIC_NAME . |
static String |
COUNT_OF_ROWS_SCANNED_KEY_METRIC_NAME |
private Map<String,AtomicLong> |
counters
Hash to hold the String -> Atomic Long mappings for each metric
|
AtomicLong |
countOfRowsFiltered
number of rows filtered during scan RPC
|
AtomicLong |
countOfRowsScanned
number of rows scanned during scan RPC.
|
Constructor and Description |
---|
ServerSideScanMetrics() |
Modifier and Type | Method and Description |
---|---|
void |
addToCounter(String counterName,
long delta)
nn
|
protected AtomicLong |
createCounter(String counterName)
Create a new counter with the specified name n * @return
AtomicLong instance for the
counter with counterName |
AtomicLong |
getCounter(String counterName)
n * @return
AtomicLong instance for this counter name, null if counter does not exist. |
Map<String,Long> |
getMetricsMap()
Get all of the values since the last time this function was called.
|
Map<String,Long> |
getMetricsMap(boolean reset)
Get all of the values.
|
boolean |
hasCounter(String counterName)
n * @return true if a counter exists with the counterName
|
void |
setCounter(String counterName,
long value)
nn
|
private final Map<String,AtomicLong> counters
public static final String COUNT_OF_ROWS_SCANNED_KEY_METRIC_NAME
public static final String COUNT_OF_ROWS_FILTERED_KEY_METRIC_NAME
@Deprecated public static final String COUNT_OF_ROWS_SCANNED_KEY
COUNT_OF_ROWS_SCANNED_KEY_METRIC_NAME
.@Deprecated public static final String COUNT_OF_ROWS_FILTERED_KEY
COUNT_OF_ROWS_FILTERED_KEY_METRIC_NAME
.public final AtomicLong countOfRowsFiltered
public final AtomicLong countOfRowsScanned
public ServerSideScanMetrics()
protected AtomicLong createCounter(String counterName)
AtomicLong
instance for the
counter with counterNamepublic void setCounter(String counterName, long value)
public boolean hasCounter(String counterName)
public AtomicLong getCounter(String counterName)
AtomicLong
instance for this counter name, null if counter does not exist.public void addToCounter(String counterName, long delta)
public Map<String,Long> getMetricsMap()
public Map<String,Long> getMetricsMap(boolean reset)
reset
- whether to reset the AtomicLongs to 0.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.