Tranquility 0.8.3 fails to start with JSON Flatten Spec

36 views
Skip to first unread message

Sowmya Dixit

unread,
Dec 18, 2018, 4:06:46 AM12/18/18
to Druid User
Hi,

I am using Tranquility 0.8.3 to push real-time streams. I need to push nested JSON objects and I have implemented 
using JSON Flatten Spec. Tranquility fails to start when root type field is specified. Stacktrace below.

Caused by: com.fasterxml.jackson.databind.JsonMappingException: Instantiation of [simple type, class io.druid.data.input.impl.StringInputRowParser] value failed: json can not be null or empty
        at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.wrapException(StdValueInstantiator.java:405)
        at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromObjectWith(StdValueInstantiator.java:234)
        at com.fasterxml.jackson.databind.deser.impl.PropertyBasedCreator.build(PropertyBasedCreator.java:167)
        at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:398)
        at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1064)
        at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:264)
        at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:156)
        at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:126)
        at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:113)
        at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:84)
        at com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:132)
        at com.fasterxml.jackson.databind.deser.impl.TypeWrappedDeserializer.deserialize(TypeWrappedDeserializer.java:41)
        at com.fasterxml.jackson.databind.ObjectMapper._convert(ObjectMapper.java:2769)
        ... 29 more

Jonathan Wei

unread,
Dec 19, 2018, 9:59:15 PM12/19/18
to druid...@googlegroups.com
Can you provide your tranquility spec?

--
You received this message because you are subscribed to the Google Groups "Druid User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to druid-user+...@googlegroups.com.
To post to this group, send email to druid...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/druid-user/4f16489f-ea26-4695-bba5-281fc262433d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sowmya Dixit

unread,
Dec 20, 2018, 1:03:44 AM12/20/18
to Druid User
Hi,

Here is the tranquility spec I am using.
telemetry-tranquility-server.json

Jonathan Wei

unread,
Dec 20, 2018, 9:44:17 PM12/20/18
to druid...@googlegroups.com
There was a bug in JSONPathParser that was fixed in Druid 0.10.0, where even for "root" fields it tries to compile a path from the "expr" field: https://github.com/apache/incubator-druid/commit/151ff6d064d5ff36141f4ac5741111773ca2514b#diff-331c0b9aed8bb0b36ddd1f9801a1fc25

However, Tranquility is still built against an older version of Druid without that fix, so you'll need to put a non-empty dummy value for "expr" on all of the "root" type fields.



Sowmya Dixit

unread,
Jan 10, 2019, 2:15:31 AM1/10/19
to Druid User

Thanks Jonathan Wei. It worked after adding non-empty dummy value for "expr" on all of the "root" type fields.
Reply all
Reply to author
Forward
0 new messages