Fix dead code in IndexTask.collectIntervalsAndShardSpecs() (#7746)

This commit is contained in:
Jonathan Wei 2019-05-25 10:12:15 -07:00 committed by Fangjin Yang
parent 7eac685e47
commit c97eb93e16
1 changed files with 5 additions and 6 deletions

View File

@ -731,8 +731,6 @@ public class IndexTask extends AbstractTask implements ChatHandler
final Map<Interval, Optional<HyperLogLogCollector>> hllCollectors = new TreeMap<>(
Comparators.intervalsByStartThenEnd()
);
int thrownAway = 0;
int unparseable = 0;
final Granularity queryGranularity = granularitySpec.getQueryGranularity();
try (
@ -807,12 +805,13 @@ public class IndexTask extends AbstractTask implements ChatHandler
}
// These metrics are reported in generateAndPublishSegments()
if (thrownAway > 0) {
log.warn("Unable to find a matching interval for [%,d] events", thrownAway);
if (determinePartitionsMeters.getThrownAway() > 0) {
log.warn("Unable to find a matching interval for [%,d] events", determinePartitionsMeters.getThrownAway());
}
if (unparseable > 0) {
log.warn("Unable to parse [%,d] events", unparseable);
if (determinePartitionsMeters.getUnparseable() > 0) {
log.warn("Unable to parse [%,d] events", determinePartitionsMeters.getUnparseable());
}
return hllCollectors;
}