Class CoordinatorStat
java.lang.Object
org.apache.druid.server.coordinator.stats.CoordinatorStat
A coordinator statistic, which may or may not be emitted as a metric.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumLevel of coordinator stat, typically used for logging. -
Method Summary
Modifier and TypeMethodDescriptiongetLevel()Level of this stat, typically used for logging.Unique name used while logging this stat.booleanWhether this statistic should be emitted as a metric.static CoordinatorStattoDebugAndEmit(String shortName, String metricName) Creates a new DEBUG level stat which is also emitted as a metric.static CoordinatorStattoDebugOnly(String shortName) Creates a new DEBUG level stat which is not emitted as a metric.static CoordinatorStattoLogAndEmit(String shortName, String metricName, CoordinatorStat.Level level) Creates a new stat of the specified level, which is also emitted as a metric.toString()
-
Method Details
-
toDebugOnly
Creates a new DEBUG level stat which is not emitted as a metric.- Parameters:
shortName- Unique name used while logging the stat
-
toDebugAndEmit
Creates a new DEBUG level stat which is also emitted as a metric.- Parameters:
shortName- Unique name used while logging the statmetricName- Name to be used when emitting this stat as a metric
-
toLogAndEmit
public 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.- Parameters:
shortName- Unique name used while logging the statmetricName- Name to be used when emitting this stat as a metriclevel- Logging level for this stat
-
getMetricName
- Returns:
- Metric name to be used when emitting this stat.
nullif this stat should not be emitted.
-
getShortName
Unique name used while logging this stat. -
getLevel
Level of this stat, typically used for logging. -
shouldEmit
public boolean shouldEmit()Whether this statistic should be emitted as a metric. -
toString
-