jaegertracing / jaeger

CNCF Jaeger, a Distributed Tracing Platform
https://www.jaegertracing.io/
Apache License 2.0
20.18k stars 2.4k forks source link

Create database scheme in Cassandra automatically #5797

Open yurishkuro opened 1 month ago

yurishkuro commented 1 month ago

Historically, Jaeger's integration with different databases was not consistent in how the database initialization happens. For example, when using Cassandra the user first needs to run a "create schema" script [1]. But running with Elasticsearch does not require a script, it's done automatically in the code on collector startup.

We want to add similar initialization to Cassandra implementation. This will be especially helpful in Jaeger v2 when it's deployed by K8s Operator from OTEL Collector, which does not have the built-in ability to run pre-initialization steps.

[1] /plugin/storage/cassandra/schema/create.sh

kairveeehh commented 1 month ago

hiii @yurishkuro I would like to take up this issue under LFX , could you assign it to me and let me know any further resources if there?

hellspawn679 commented 1 month ago

so basically we need to remove the schema folder dependency and initialize with similar to es

Ali-Alnosairi commented 1 month ago

/assign

Spraveen8-chary commented 1 month ago
akstron commented 2 weeks ago

Hi @yurishkuro , I am working on it and wanted some suggestions. For this task we have to create keyspace, types and tables after cassandra session initialization. Do you recommend extracting the queries from *.tmpl files (which is how it is done currently by running create.sh script) or should we write the queries in the code itself?

yurishkuro commented 2 weeks ago

It's fine to read from template files, we just need to embed them into the binary.