Null Pointer Exception while querying broker

Hey ,

I am receiving the following error on historical nodes while querying on broker .

Druid Version : 0.9.1.1

Query : Group By

For some of the intervals it is working fine but for other it is not. Any idea what we are doing wrong.

2016-10-11T23:43:16,214 ERROR [processing-14] io.druid.query.GroupByMergedQueryRunner - Exception with one of the sequences!

java.lang.NullPointerException

at io.druid.query.aggregation.LongSumAggregatorFactory.factorize(LongSumAggregatorFactory.java:61) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at io.druid.segment.incremental.OnheapIncrementalIndex.factorizeAggs(OnheapIncrementalIndex.java:212) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at io.druid.segment.incremental.OnheapIncrementalIndex.addToFacts(OnheapIncrementalIndex.java:176) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at io.druid.segment.incremental.IncrementalIndex.add(IncrementalIndex.java:568) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at io.druid.query.groupby.GroupByQueryHelper$3.accumulate(GroupByQueryHelper.java:123) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at io.druid.query.groupby.GroupByQueryHelper$3.accumulate(GroupByQueryHelper.java:115) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at com.metamx.common.guava.MappingAccumulator.accumulate(MappingAccumulator.java:39) ~[java-util-0.27.9.jar:?]

at com.metamx.common.guava.YieldingAccumulators$1.accumulate(YieldingAccumulators.java:32) ~[java-util-0.27.9.jar:?]

at com.metamx.common.guava.BaseSequence.makeYielder(BaseSequence.java:104) ~[java-util-0.27.9.jar:?]

at com.metamx.common.guava.BaseSequence.toYielder(BaseSequence.java:81) ~[java-util-0.27.9.jar:?]

at com.metamx.common.guava.ConcatSequence.makeYielder(ConcatSequence.java:93) ~[java-util-0.27.9.jar:?]

at com.metamx.common.guava.ConcatSequence.toYielder(ConcatSequence.java:72) ~[java-util-0.27.9.jar:?]

at com.metamx.common.guava.ResourceClosingSequence.toYielder(ResourceClosingSequence.java:41) ~[java-util-0.27.9.jar:?]

at com.metamx.common.guava.YieldingSequenceBase.accumulate(YieldingSequenceBase.java:34) ~[java-util-0.27.9.jar:?]

at io.druid.query.MetricsEmittingQueryRunner$1.accumulate(MetricsEmittingQueryRunner.java:118) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at com.metamx.common.guava.MappedSequence.accumulate(MappedSequence.java:40) ~[java-util-0.27.9.jar:?]

at com.metamx.common.guava.Sequences$1.accumulate(Sequences.java:90) ~[java-util-0.27.9.jar:?]

at io.druid.query.MetricsEmittingQueryRunner$1.accumulate(MetricsEmittingQueryRunner.java:118) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at io.druid.query.spec.SpecificSegmentQueryRunner$2$1.call(SpecificSegmentQueryRunner.java:87) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at io.druid.query.spec.SpecificSegmentQueryRunner.doNamed(SpecificSegmentQueryRunner.java:171) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at io.druid.query.spec.SpecificSegmentQueryRunner.access$400(SpecificSegmentQueryRunner.java:41) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at io.druid.query.spec.SpecificSegmentQueryRunner$2.doItNamed(SpecificSegmentQueryRunner.java:162) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at io.druid.query.spec.SpecificSegmentQueryRunner$2.accumulate(SpecificSegmentQueryRunner.java:80) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at io.druid.query.CPUTimeMetricQueryRunner$1.accumulate(CPUTimeMetricQueryRunner.java:81) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at com.metamx.common.guava.Sequences$1.accumulate(Sequences.java:90) ~[java-util-0.27.9.jar:?]

at io.druid.query.GroupByMergedQueryRunner$1$1.call(GroupByMergedQueryRunner.java:127) [druid-processing-0.9.1.1.jar:0.9.1.1]

at io.druid.query.GroupByMergedQueryRunner$1$1.call(GroupByMergedQueryRunner.java:117) [druid-processing-0.9.1.1.jar:0.9.1.1]

at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_101]

at io.druid.query.PrioritizedListenableFutureTask.run(PrioritizedExecutorService.java:271) [druid-processing-0.9.1.1.jar:0.9.1.1]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_101]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_101]

at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101]

2016-10-11T23:43:16,215 ERROR [processing-14] com.google.common.util.concurrent.Futures$CombinedFuture - input future failed.

java.lang.NullPointerException

at io.druid.query.aggregation.LongSumAggregatorFactory.factorize(LongSumAggregatorFactory.java:61) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at io.druid.segment.incremental.OnheapIncrementalIndex.factorizeAggs(OnheapIncrementalIndex.java:212) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at io.druid.segment.incremental.OnheapIncrementalIndex.addToFacts(OnheapIncrementalIndex.java:176) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at io.druid.segment.incremental.IncrementalIndex.add(IncrementalIndex.java:568) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at io.druid.query.groupby.GroupByQueryHelper$3.accumulate(GroupByQueryHelper.java:123) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at io.druid.query.groupby.GroupByQueryHelper$3.accumulate(GroupByQueryHelper.java:115) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at com.metamx.common.guava.MappingAccumulator.accumulate(MappingAccumulator.java:39) ~[java-util-0.27.9.jar:?]

at com.metamx.common.guava.YieldingAccumulators$1.accumulate(YieldingAccumulators.java:32) ~[java-util-0.27.9.jar:?]

at com.metamx.common.guava.BaseSequence.makeYielder(BaseSequence.java:104) ~[java-util-0.27.9.jar:?]

at com.metamx.common.guava.BaseSequence.toYielder(BaseSequence.java:81) ~[java-util-0.27.9.jar:?]

at com.metamx.common.guava.ConcatSequence.makeYielder(ConcatSequence.java:93) ~[java-util-0.27.9.jar:?]

at com.metamx.common.guava.ConcatSequence.toYielder(ConcatSequence.java:72) ~[java-util-0.27.9.jar:?]

at com.metamx.common.guava.ResourceClosingSequence.toYielder(ResourceClosingSequence.java:41) ~[java-util-0.27.9.jar:?]

at com.metamx.common.guava.YieldingSequenceBase.accumulate(YieldingSequenceBase.java:34) ~[java-util-0.27.9.jar:?]

at io.druid.query.MetricsEmittingQueryRunner$1.accumulate(MetricsEmittingQueryRunner.java:118) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at com.metamx.common.guava.MappedSequence.accumulate(MappedSequence.java:40) ~[java-util-0.27.9.jar:?]

at com.metamx.common.guava.Sequences$1.accumulate(Sequences.java:90) ~[java-util-0.27.9.jar:?]

at io.druid.query.MetricsEmittingQueryRunner$1.accumulate(MetricsEmittingQueryRunner.java:118) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at io.druid.query.spec.SpecificSegmentQueryRunner$2$1.call(SpecificSegmentQueryRunner.java:87) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at io.druid.query.spec.SpecificSegmentQueryRunner.doNamed(SpecificSegmentQueryRunner.java:171) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at io.druid.query.spec.SpecificSegmentQueryRunner.access$400(SpecificSegmentQueryRunner.java:41) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at io.druid.query.spec.SpecificSegmentQueryRunner$2.doItNamed(SpecificSegmentQueryRunner.java:162) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at io.druid.query.spec.SpecificSegmentQueryRunner$2.accumulate(SpecificSegmentQueryRunner.java:80) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at io.druid.query.CPUTimeMetricQueryRunner$1.accumulate(CPUTimeMetricQueryRunner.java:81) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at com.metamx.common.guava.Sequences$1.accumulate(Sequences.java:90) ~[java-util-0.27.9.jar:?]

at io.druid.query.GroupByMergedQueryRunner$1$1.call(GroupByMergedQueryRunner.java:127) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at io.druid.query.GroupByMergedQueryRunner$1$1.call(GroupByMergedQueryRunner.java:117) ~[druid-processing-0.9.1.1.jar:0.9.1.1]

at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_101]

at io.druid.query.PrioritizedListenableFutureTask.run(PrioritizedExecutorService.java:271) [druid-processing-0.9.1.1.jar:0.9.1.1]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_101]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_101]

at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101]

Hi Saurabh, not entirely sure what is happening here. Can you narrow down the error to a certain range and give us some sample data that can reproduce this problem?