mirror of https://github.com/apache/druid.git
Merger: Emit indexer/segment/bytes once per segment. No longer emit indexer/segment/count.
This commit is contained in:
parent
9e88197845
commit
4ec67f612e
|
@ -230,23 +230,17 @@ public class TaskConsumer implements Runnable
|
||||||
|
|
||||||
// Emit event and log, if the task is done
|
// Emit event and log, if the task is done
|
||||||
if (statusFromRunner.isComplete()) {
|
if (statusFromRunner.isComplete()) {
|
||||||
int segmentBytes = 0;
|
|
||||||
for (DataSegment segment : statusFromRunner.getSegments()) {
|
|
||||||
segmentBytes += segment.getSize();
|
|
||||||
}
|
|
||||||
|
|
||||||
int segmentNukedBytes = 0;
|
|
||||||
for (DataSegment segment : statusFromRunner.getSegmentsNuked()) {
|
|
||||||
segmentNukedBytes += segment.getSize();
|
|
||||||
}
|
|
||||||
|
|
||||||
builder.setUser3(statusFromRunner.getStatusCode().toString());
|
builder.setUser3(statusFromRunner.getStatusCode().toString());
|
||||||
|
|
||||||
|
for (DataSegment segment : statusFromRunner.getSegments()) {
|
||||||
|
emitter.emit(builder.build("indexer/segment/bytes", segment.getSize()));
|
||||||
|
}
|
||||||
|
|
||||||
|
for (DataSegment segmentNuked : statusFromRunner.getSegmentsNuked()) {
|
||||||
|
emitter.emit(builder.build("indexer/segmentNuked/bytes", segmentNuked.getSize()));
|
||||||
|
}
|
||||||
|
|
||||||
emitter.emit(builder.build("indexer/time/run/millis", statusFromRunner.getDuration()));
|
emitter.emit(builder.build("indexer/time/run/millis", statusFromRunner.getDuration()));
|
||||||
emitter.emit(builder.build("indexer/segment/count", statusFromRunner.getSegments().size()));
|
|
||||||
emitter.emit(builder.build("indexer/segment/bytes", segmentBytes));
|
|
||||||
emitter.emit(builder.build("indexer/segmentNuked/count", statusFromRunner.getSegmentsNuked().size()));
|
|
||||||
emitter.emit(builder.build("indexer/segmentNuked/bytes", segmentNukedBytes));
|
|
||||||
|
|
||||||
if (statusFromRunner.isFailure()) {
|
if (statusFromRunner.isFailure()) {
|
||||||
log.makeAlert("Failed to index")
|
log.makeAlert("Failed to index")
|
||||||
|
|
Loading…
Reference in New Issue