glasser commented on issue #5789: Add stringLast and stringFirst aggregators 
extension
URL: https://github.com/apache/incubator-druid/pull/5789#issuecomment-469595884
 
 
   Does stringFirst actually work at ingestion time? The doc change made here 
(changing the existing claim that first/last aggregators don't work at 
ingestion time to say that only numeric ones don't) plus the implementation of 
makeAggregateCombiner makes it seem like it should, and when I define a Kafka 
indexing service data source with a stringFirst aggregator, I can properly 
query the metric against data as the indexing task indexes it.
   
   But the indexing task publish stage fails (in 0.13) with errors like:
   
   ```
   2019-03-05T08:26:25,579 WARN [appenderator_merge_0] 
org.apache.druid.segment.realtime.appenderator.AppenderatorImpl - Failed to 
push merged index for 
segment[trace_refs_2019-03-05T07:00:00.000Z_2019-03-05T08:00:00.000Z_2019-03-05T07:00:01.884Z_2].
   java.lang.ClassCastException: 
org.apache.druid.query.aggregation.SerializablePairLongString cannot be cast to 
java.lang.String
        at 
org.apache.druid.query.aggregation.first.StringFirstAggregateCombiner.reset(StringFirstAggregateCombiner.java:35)
 ~[druid-processing-0.13.0-incubating.jar:0.13.0-incubating]
        at 
org.apache.druid.segment.RowCombiningTimeAndDimsIterator.resetCombinedMetrics(RowCombiningTimeAndDimsIterator.java:249)
 ~[druid-processing-0.13.0-incubating.jar:0.13.0-incubating]
        at 
org.apache.druid.segment.RowCombiningTimeAndDimsIterator.combineToCurrentTimeAndDims(RowCombiningTimeAndDimsIterator.java:229)
 ~[druid-processing-0.13.0-incubating.jar:0.13.0-incubating]
        at 
org.apache.druid.segment.RowCombiningTimeAndDimsIterator.moveToNext(RowCombiningTimeAndDimsIterator.java:191)
 ~[druid-processing-0.13.0-incubating.jar:0.13.0-incubating]
        at 
org.apache.druid.segment.IndexMergerV9.mergeIndexesAndWriteColumns(IndexMergerV9.java:492)
 ~[druid-processing-0.13.0-incubating.jar:0.13.0-incubating]
        at 
org.apache.druid.segment.IndexMergerV9.makeIndexFiles(IndexMergerV9.java:191) 
~[druid-processing-0.13.0-incubating.jar:0.13.0-incubating]
        at org.apache.druid.segment.IndexMergerV9.merge(IndexMergerV9.java:914) 
~[druid-processing-0.13.0-incubating.jar:0.13.0-incubating]
        at 
org.apache.druid.segment.IndexMergerV9.mergeQueryableIndex(IndexMergerV9.java:832)
 ~[druid-processing-0.13.0-incubating.jar:0.13.0-incubating]
        at 
org.apache.druid.segment.IndexMergerV9.mergeQueryableIndex(IndexMergerV9.java:810)
 ~[druid-processing-0.13.0-incubating.jar:0.13.0-incubating]
        at 
org.apache.druid.segment.realtime.appenderator.AppenderatorImpl.mergeAndPush(AppenderatorImpl.java:719)
 ~[druid-server-0.13.0-incubating.jar:0.13.0-incubating]
        at 
org.apache.druid.segment.realtime.appenderator.AppenderatorImpl.lambda$push$1(AppenderatorImpl.java:623)
 ~[druid-server-0.13.0-incubating.jar:0.13.0-incubating]
        at com.google.common.util.concurrent.Futures$1.apply(Futures.java:713) 
[guava-16.0.1.jar:?]
        at 
com.google.common.util.concurrent.Futures$ChainingListenableFuture.run(Futures.java:861)
 [guava-16.0.1.jar:?]
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
[?:1.8.0_181]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
[?:1.8.0_181]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
   ```
   
   Has anyone actually successfully used stringFirst at ingestion time?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to