use of com.hazelcast.internal.metrics.impl.MetricsCompressor in project hazelcast by hazelcast.
the class JobMetricsPublisher method whenComplete.
@Override
public void whenComplete() {
Set<Map.Entry<Long, MetricsCompressor>> compressorEntries = executionIdToCompressor.entrySet();
for (Iterator<Map.Entry<Long, MetricsCompressor>> it = compressorEntries.iterator(); it.hasNext(); ) {
Map.Entry<Long, MetricsCompressor> entry = it.next();
MetricsCompressor compressor = entry.getValue();
// remove compressors that didn't receive any metrics
if (compressor.count() == 0) {
it.remove();
}
Long executionId = entry.getKey();
byte[] blob = compressor.getBlobAndReset();
jobExecutionService.updateMetrics(executionId, RawJobMetrics.of(blob));
}
}
Aggregations