use of io.cdap.cdap.metrics.process.DefaultMetricsWriterContext in project cdap by caskdata.
the class MetricsWritersMetricsPublisher method initializeMetricWriters.
private void initializeMetricWriters(Map<String, MetricsWriter> metricsWriters, CConfiguration cConf) {
for (Map.Entry<String, MetricsWriter> entry : metricsWriters.entrySet()) {
MetricsWriter writer = entry.getValue();
// Metrics context used by MetricsStoreMetricsWriter only, which we don't use here
// So we can pass no-op context
DefaultMetricsWriterContext metricsWriterContext = new DefaultMetricsWriterContext(new NoopMetricsContext(), cConf, writer.getID());
writer.initialize(metricsWriterContext);
}
}
Aggregations