mirror of https://github.com/apache/druid.git
Merge pull request #347 from metamx/finishJob-metrics
IndexTask: Print metrics even if finishJob fails
This commit is contained in:
commit
6db52c8297
|
@ -368,18 +368,21 @@ public class IndexTask extends AbstractFixedIntervalTask
|
||||||
}
|
}
|
||||||
|
|
||||||
plumber.persist(firehose.commit());
|
plumber.persist(firehose.commit());
|
||||||
plumber.finishJob();
|
|
||||||
|
|
||||||
// Output metrics
|
try {
|
||||||
log.info(
|
plumber.finishJob();
|
||||||
"Task[%s] took in %,d rows (%,d processed, %,d unparseable, %,d thrown away) and output %,d rows",
|
}
|
||||||
getId(),
|
finally {
|
||||||
metrics.processed() + metrics.unparseable() + metrics.thrownAway(),
|
log.info(
|
||||||
metrics.processed(),
|
"Task[%s] took in %,d rows (%,d processed, %,d unparseable, %,d thrown away) and output %,d rows",
|
||||||
metrics.unparseable(),
|
getId(),
|
||||||
metrics.thrownAway(),
|
metrics.processed() + metrics.unparseable() + metrics.thrownAway(),
|
||||||
metrics.rowOutput()
|
metrics.processed(),
|
||||||
);
|
metrics.unparseable(),
|
||||||
|
metrics.thrownAway(),
|
||||||
|
metrics.rowOutput()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// We expect a single segment to have been created.
|
// We expect a single segment to have been created.
|
||||||
return Iterables.getOnlyElement(pushedSegments);
|
return Iterables.getOnlyElement(pushedSegments);
|
||||||
|
|
Loading…
Reference in New Issue