apache kafka - druid schema concept - using multiple datasources or parsers in same spec file -


i have following scenario, 1 apache kafka topic multiple types of events pushed in. druid pick form topic , aggregate based on timestamp.

say example below messages in kafka topic,

type 1,

{"timestamp" : "07-08-2016", "service" : "signup", "no_of_events" : 8}

{"timestamp" : "08-08-2016", "service" : "signup", "no_of_events" : 10}

type 2,

{"timestamp" : "08-08-2016", "user" : "xyz", "no_of_events" : 3}

{"timestamp" : "08-08-2016", "user" : "abc", "no_of_events" : 2}

q1: can write 2 parsers within same spec file pointing events same topic? if yes, structure of spec file?

any other suggestion on design welcome :)

q2: understand better, possible have multiple datasources within in spec file?

thanks in advance!!

q2: yes can have 2 datasources within same spec file. can list them out in spec file array under "datasources" attribute:

"datasources" : [   {   "spec" : {     "dataschema" : {       "datasource" : "data souce1"       ...other stuff       }     }   },   {   "spec" : {     "dataschema" : {       "datasource" : "data source 2"       ...other stuff     }   }, 

q1: wan't 2 different datasources pointing same kafka topic? haven't tried i'm pretty sure - specified within "properties" section of data source spec:

"datasources" : [   {   "spec" : {     "dataschema" : {       "datasource" : "data souce1"       ...other stuff       }     }     "properties" : {         "topicpattern.priority" : "1",         "topicpattern" : "kafka_topic"     }   }, {   "spec" : {     "dataschema" : {       "datasource" : "data souce1"       ...other stuff       }     }     "properties" : {         "topicpattern.priority" : "1",         "topicpattern" : "kafka_topic"     } } 

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -