public class CoordinatorStat extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CoordinatorStat.Level
Level of coordinator stat, typically used for logging.
|
| Modifier and Type | Method and Description |
|---|---|
CoordinatorStat.Level |
getLevel()
Level of this stat, typically used for logging.
|
String |
getMetricName() |
String |
getShortName()
Unique name used while logging this stat.
|
boolean |
shouldEmit()
Whether this statistic should be emitted as a metric.
|
static CoordinatorStat |
toDebugAndEmit(String shortName,
String metricName)
Creates a new DEBUG level stat which is also emitted as a metric.
|
static CoordinatorStat |
toDebugOnly(String shortName)
Creates a new DEBUG level stat which is not emitted as a metric.
|
static CoordinatorStat |
toLogAndEmit(String shortName,
String metricName,
CoordinatorStat.Level level)
Creates a new stat of the specified level, which is also emitted as a metric.
|
String |
toString() |
public static CoordinatorStat toDebugOnly(String shortName)
shortName - Unique name used while logging the statpublic static CoordinatorStat toDebugAndEmit(String shortName, String metricName)
shortName - Unique name used while logging the statmetricName - Name to be used when emitting this stat as a metricpublic static CoordinatorStat toLogAndEmit(String shortName, String metricName, CoordinatorStat.Level level)
shortName - Unique name used while logging the statmetricName - Name to be used when emitting this stat as a metriclevel - Logging level for this statpublic String getMetricName()
null if
this stat should not be emitted.public String getShortName()
public CoordinatorStat.Level getLevel()
public boolean shouldEmit()
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.