Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not resolve type id 'LongLastAggregatorFactory$1' into a subtype of AggregatorFactory #7599

Open
DockerLive opened this issue May 6, 2019 · 4 comments

Comments

@DockerLive
Copy link

In the latest 0.14 version, where I define the metric as follows: {"type":"longLast","name":"lonlat","fieldName":"lonlat"};I receive a warning as shown below

org.apache.druid.segment.IndexIO - Failed to load metadata for segment [/data/druid/task/index_kafka_courier_position_aeb8afe30127b32_aifpnlal/work/persist/courier_position_2019-05-06T06:00:00.000Z_2019-05-06T07:00:00.000Z_2019-05-06T05:56:41.188Z_2/2]
com.fasterxml.jackson.databind.JsonMappingException: Could not resolve type id 'LongLastAggregatorFactory$1' into a subtype of [simple type, class org.apache.druid.query.aggregation.AggregatorFactory]: known type ids = [AggregatorFactory, cardinality, count, doubleFirst, doubleLast, doubleMax, doubleMin, doubleSum, filtered, floatFirst, floatLast, floatMax, floatMin, floatSum, histogram, hyperUnique, javascript, longFirst, longLast, longMax, longMin, longSum, stringFirst, stringFirstFold, stringLast, stringLastFold]
at [Source: [B@2b89a823; line: 1, column: 33] (through reference chain: org.apache.druid.segment.Metadata["aggregators"]->Object[][0])
at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:148) ~[jackson-databind-2.6.7.jar:2.6.7]
at com.fasterxml.jackson.databind.DeserializationContext.unknownTypeException(DeserializationContext.java:967) ~[jackson-databind-2.6.7.jar:2.6.7]
at com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase._handleUnknownTypeId(TypeDeserializerBase.java:277) ~[jackson-databind-2.6.7.jar:2.6.7]
at com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase._findDeserializer(TypeDeserializerBase.java:159) ~[jackson-databind-2.6.7.jar:2.6.7]
at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:108) ~[jackson-databind-2.6.7.jar:2.6.7]
at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:93) ~[jackson-databind-2.6.7.jar:2.6.7]
at com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:131) ~[jackson-databind-2.6.7.jar:2.6.7]
at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:158) ~[jackson-databind-2.6.7.jar:2.6.7]
at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:17) ~[jackson-databind-2.6.7.jar:2.6.7]
at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:520) ~[jackson-databind-2.6.7.jar:2.6.7]
at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeWithErrorWrapping(BeanDeserializer.java:463) ~[jackson-databind-2.6.7.jar:2.6.7]
at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:378) ~[jackson-databind-2.6.7.jar:2.6.7]
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1099) ~[jackson-databind-2.6.7.jar:2.6.7]
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:296) ~[jackson-databind-2.6.7.jar:2.6.7]
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:133) ~[jackson-databind-2.6.7.jar:2.6.7]
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3736) ~[jackson-databind-2.6.7.jar:2.6.7]
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2819) ~[jackson-databind-2.6.7.jar:2.6.7]
at org.apache.druid.segment.IndexIO$V9IndexLoader.load(IndexIO.java:564) [druid-processing-0.14.0-incubating-iap1.jar:0.14.0-incubating-iap1]
at org.apache.druid.segment.IndexIO.loadIndex(IndexIO.java:188) [druid-processing-0.14.0-incubating-iap1.jar:0.14.0-incubating-iap1]
at org.apache.druid.segment.realtime.appenderator.AppenderatorImpl.persistHydrant(AppenderatorImpl.java:1274) [druid-server-0.14.0-incubating-iap1.jar:0.14.0-incubating-iap1]
at org.apache.druid.segment.realtime.appenderator.AppenderatorImpl.access$100(AppenderatorImpl.java:110) [druid-server-0.14.0-incubating-iap1.jar:0.14.0-incubating-iap1]
at org.apache.druid.segment.realtime.appenderator.AppenderatorImpl$2.doCall(AppenderatorImpl.java:534) [druid-server-0.14.0-incubating-iap1.jar:0.14.0-incubating-iap1]
at org.apache.druid.common.guava.ThreadRenamingCallable.call(ThreadRenamingCallable.java:44) [druid-core-0.14.0-incubating-iap1.jar:0.14.0-incubating-iap1]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_65]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_65]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_65]

@gianm
Copy link
Contributor

gianm commented May 7, 2019

@DockerLive, according to this note on the doc page, this aggregator cannot be used at ingestion time:

(Double/Float/Long) First and Last aggregator cannot be used in ingestion spec, and should only be specified as part of queries.

@gianm gianm closed this as completed May 7, 2019
@DockerLive
Copy link
Author

@DockerLive, according to this note on the doc page, this aggregator cannot be used at ingestion time:

(Double/Float/Long) First and Last aggregator cannot be used in ingestion spec, and should only be specified as part of queries.

Oh, I see that. Thank you~!

@suneet-s
Copy link
Contributor

suneet-s commented Sep 8, 2020

Re-opening as a feature request.

#10332 has an implementation that supports ingestion time aggregation for String first / last aggregators. Similar changes can be made to support Double/Float/Long first last aggregators.

@jpelletier-nydig
Copy link

Re-opening as a feature request.

#10332 has an implementation that supports ingestion time aggregation for String first / last aggregators. Similar changes can be made to support Double/Float/Long first last aggregators.

This would be great for market candle graphs which are,

(∑Price * Volume)/(∑Volume) (aka VWAP), price_open, price_close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants