@ThreadSafe public class CoordinatorRunStats extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
CoordinatorRunStats.StatHandler |
| Constructor and Description |
|---|
CoordinatorRunStats() |
CoordinatorRunStats(Map<Dimension,String> debugDimensions)
Creates a new
CoordinatorRunStats. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(CoordinatorStat stat,
long value) |
void |
add(CoordinatorStat stat,
RowKey rowKey,
long value) |
void |
addToSegmentStat(CoordinatorStat stat,
String tier,
String datasource,
long value) |
String |
buildStatsTable()
Builds a printable table of all the collected error, info and debug level
stats (if there are qualifying debugDimensions) with non-zero values.
|
void |
clear() |
static CoordinatorRunStats |
empty() |
void |
forEachStat(CoordinatorRunStats.StatHandler handler) |
long |
get(CoordinatorStat stat) |
long |
get(CoordinatorStat stat,
RowKey rowKey) |
long |
getSegmentStat(CoordinatorStat stat,
String tier,
String datasource) |
CoordinatorRunStats |
getSnapshotAndReset()
Creates a new
CoordinatorRunStats which represents the snapshot of
the stats collected so far in this instance. |
boolean |
hasStat(CoordinatorStat stat) |
int |
rowCount() |
void |
updateMax(CoordinatorStat stat,
RowKey rowKey,
long value)
Updates the maximum value of the stat for the given RowKey if applicable.
|
public static CoordinatorRunStats empty()
public long getSegmentStat(CoordinatorStat stat, String tier, String datasource)
public long get(CoordinatorStat stat)
public long get(CoordinatorStat stat, RowKey rowKey)
public void forEachStat(CoordinatorRunStats.StatHandler handler)
public String buildStatsTable()
public boolean hasStat(CoordinatorStat stat)
public int rowCount()
public void clear()
public void add(CoordinatorStat stat, long value)
public void add(CoordinatorStat stat, RowKey rowKey, long value)
public void addToSegmentStat(CoordinatorStat stat, String tier, String datasource, long value)
public void updateMax(CoordinatorStat stat, RowKey rowKey, long value)
public CoordinatorRunStats getSnapshotAndReset()
CoordinatorRunStats which represents the snapshot of
the stats collected so far in this instance.
While this method is in progress, any updates made to the stats of this instance by another thread are not guaranteed to be present in the snapshot. But the snapshots are consistent, i.e. stats present in the snapshot created in one invocation of this method are permanently removed from this instance and will not be present in subsequent snapshots.
CoordinatorRunStats.Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.