jaegertracing / jaeger

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

Create database schema in Cassandra automatically #5797

Open yurishkuro opened 3 months ago

yurishkuro commented 3 months 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 3 months 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 3 months ago

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

Ali-Alnosairi commented 3 months ago

/assign

Spraveen8-chary commented 3 months ago
akstron commented 2 months 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 months ago

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

Manask322 commented 1 month ago

@yurishkuro - can you confirm is this issue being worked upon ? would like to take it up.

akstron commented 1 month ago

Hi @Manask322 , you can go ahead with taking this up. I am caught up in some other work and can't work on my PR.