public final class LocalMetricsCollectionService extends AggregatedMetricsCollectionService
MetricsCollectionService that writes to MetricsTable directly.
It also has a scheduling job that clean up old metrics periodically.| Modifier and Type | Field and Description |
|---|---|
static com.google.common.collect.ImmutableMap<String,String> |
METRICS_PROCESSOR_CONTEXT |
| Constructor and Description |
|---|
LocalMetricsCollectionService(CConfiguration cConf,
MetricStore metricStore) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
publish(Iterator<MetricValues> metrics)
Publishes the given collection of
MetricValues. |
protected void |
shutDown() |
protected void |
startUp() |
executor, getContext, runOneIteration, scheduleraddListener, isRunning, start, startAndWait, state, stop, stopAndWait, toString@Inject public LocalMetricsCollectionService(CConfiguration cConf, MetricStore metricStore)
protected void publish(Iterator<MetricValues> metrics) throws Exception
AggregatedMetricsCollectionServiceMetricValues. When this method returns, the
given Iterator will no longer be valid. This method should process the input
iterator and returns quickly. Any long operations should be run in a separated thread.
This method is guaranteed not to get concurrent calls.publish in class AggregatedMetricsCollectionServicemetrics - collection of MetricValues to publish.Exception - if there is error raised during publish.protected void startUp()
throws Exception
startUp in class com.google.common.util.concurrent.AbstractScheduledServiceExceptionprotected void shutDown()
throws Exception
shutDown in class AggregatedMetricsCollectionServiceExceptionCopyright © 2015 Cask Data, Inc. Licensed under the Apache License, Version 2.0.