Package org.apache.pinot.spi.metrics
Class PinotMetricUtils
- java.lang.Object
-
- org.apache.pinot.spi.metrics.PinotMetricUtils
-
public class PinotMetricUtils extends Object
-
-
Method Summary
-
-
-
Method Detail
-
init
public static void init(PinotConfiguration metricsConfiguration)
Initialize the metricsFactory ad registers the metricsRegistry
-
getPinotMetricsRegistry
public static PinotMetricsRegistry getPinotMetricsRegistry()
-
getPinotMetricsRegistry
public static PinotMetricsRegistry getPinotMetricsRegistry(PinotConfiguration metricsConfiguration)
Returns the metricsRegistry from the initialised metricsFactory. If the metricsFactory is null, first creates and initializes the metricsFactory and registers the metrics registry.- Parameters:
metricsConfiguration- metrics configs
-
makePinotMetricName
public static PinotMetricName makePinotMetricName(Class<?> klass, String name)
-
makePinotGauge
public static <T> PinotGauge<T> makePinotGauge(Function<Void,T> condition)
-
makeGauge
public static <T> PinotGauge<T> makeGauge(PinotMetricsRegistry registry, PinotMetricName name, PinotGauge<T> gauge)
-
makePinotTimer
public static PinotTimer makePinotTimer(PinotMetricsRegistry registry, PinotMetricName name, TimeUnit durationUnit, TimeUnit rateUnit)
-
makePinotMeter
public static PinotMeter makePinotMeter(PinotMetricsRegistry registry, PinotMetricName name, String eventType, TimeUnit unit)
-
removeMetric
public static void removeMetric(PinotMetricsRegistry registry, PinotMetricName name)
-
makePinotJmxReporter
public static PinotJmxReporter makePinotJmxReporter(PinotMetricsRegistry metricsRegistry)
-
-