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

[refactor] Move cassandra implementation to internal package #6639

Merged
merged 7 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ updates:
- /docker/base
- /docker/debug
- /examples/hotrod
- /plugin/storage/cassandra
- /internal/storage/cassandra
yurishkuro marked this conversation as resolved.
Show resolved Hide resolved
mahadzaryab1 marked this conversation as resolved.
Show resolved Hide resolved
schedule:
interval: daily
- package-ecosystem: docker
Expand Down
2 changes: 1 addition & 1 deletion cmd/jaeger/internal/extension/jaegerstorage/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ import (
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/confmap"

"github.com/jaegertracing/jaeger/internal/storage/cassandra"
casCfg "github.com/jaegertracing/jaeger/pkg/cassandra/config"
esCfg "github.com/jaegertracing/jaeger/pkg/es/config"
promCfg "github.com/jaegertracing/jaeger/pkg/prometheus/config"
"github.com/jaegertracing/jaeger/plugin/metricstore/prometheus"
"github.com/jaegertracing/jaeger/plugin/storage/badger"
"github.com/jaegertracing/jaeger/plugin/storage/cassandra"
"github.com/jaegertracing/jaeger/plugin/storage/es"
"github.com/jaegertracing/jaeger/plugin/storage/grpc"
"github.com/jaegertracing/jaeger/plugin/storage/memory"
Expand Down
2 changes: 1 addition & 1 deletion cmd/jaeger/internal/extension/jaegerstorage/extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import (
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/extension"

"github.com/jaegertracing/jaeger/internal/storage/cassandra"
"github.com/jaegertracing/jaeger/pkg/metrics"
"github.com/jaegertracing/jaeger/pkg/telemetry"
"github.com/jaegertracing/jaeger/plugin/metricstore/prometheus"
"github.com/jaegertracing/jaeger/plugin/storage/badger"
"github.com/jaegertracing/jaeger/plugin/storage/cassandra"
"github.com/jaegertracing/jaeger/plugin/storage/es"
"github.com/jaegertracing/jaeger/plugin/storage/grpc"
"github.com/jaegertracing/jaeger/plugin/storage/memory"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (
nooptrace "go.opentelemetry.io/otel/trace/noop"
"go.uber.org/zap"

"github.com/jaegertracing/jaeger/internal/storage/cassandra"
esCfg "github.com/jaegertracing/jaeger/pkg/es/config"
"github.com/jaegertracing/jaeger/pkg/metrics"
promCfg "github.com/jaegertracing/jaeger/pkg/prometheus/config"
"github.com/jaegertracing/jaeger/plugin/storage/badger"
"github.com/jaegertracing/jaeger/plugin/storage/cassandra"
"github.com/jaegertracing/jaeger/plugin/storage/grpc"
"github.com/jaegertracing/jaeger/plugin/storage/memory"
"github.com/jaegertracing/jaeger/storage"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ import (
"go.opentelemetry.io/otel/trace"
"go.uber.org/zap"

cDepStore "github.com/jaegertracing/jaeger/internal/storage/cassandra/dependencystore"
cSamplingStore "github.com/jaegertracing/jaeger/internal/storage/cassandra/samplingstore"
"github.com/jaegertracing/jaeger/internal/storage/cassandra/schema"
cSpanStore "github.com/jaegertracing/jaeger/internal/storage/cassandra/spanstore"
"github.com/jaegertracing/jaeger/internal/storage/cassandra/spanstore/dbmodel"
"github.com/jaegertracing/jaeger/pkg/cassandra"
"github.com/jaegertracing/jaeger/pkg/cassandra/config"
gocqlw "github.com/jaegertracing/jaeger/pkg/cassandra/gocql"
Expand All @@ -23,11 +28,6 @@ import (
"github.com/jaegertracing/jaeger/pkg/metrics"
"github.com/jaegertracing/jaeger/plugin"
cLock "github.com/jaegertracing/jaeger/plugin/pkg/distributedlock/cassandra"
cDepStore "github.com/jaegertracing/jaeger/plugin/storage/cassandra/dependencystore"
cSamplingStore "github.com/jaegertracing/jaeger/plugin/storage/cassandra/samplingstore"
"github.com/jaegertracing/jaeger/plugin/storage/cassandra/schema"
cSpanStore "github.com/jaegertracing/jaeger/plugin/storage/cassandra/spanstore"
"github.com/jaegertracing/jaeger/plugin/storage/cassandra/spanstore/dbmodel"
"github.com/jaegertracing/jaeger/storage"
"github.com/jaegertracing/jaeger/storage/dependencystore"
"github.com/jaegertracing/jaeger/storage/samplingstore"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import (
"go.uber.org/zap"

"github.com/jaegertracing/jaeger-idl/model/v1"
"github.com/jaegertracing/jaeger/internal/storage/cassandra"
cSpanStore "github.com/jaegertracing/jaeger/internal/storage/cassandra/spanstore"
cascfg "github.com/jaegertracing/jaeger/pkg/cassandra/config"
"github.com/jaegertracing/jaeger/pkg/jtracer"
"github.com/jaegertracing/jaeger/pkg/metrics"
"github.com/jaegertracing/jaeger/plugin/storage/cassandra"
cSpanStore "github.com/jaegertracing/jaeger/plugin/storage/cassandra/spanstore"
"github.com/jaegertracing/jaeger/storage/spanstore"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ CREATE TABLE IF NOT EXISTS ${keyspace}.dependencies_v2 (
AND default_time_to_live = ${dependencies_ttl};

-- adaptive sampling tables
-- ./plugin/storage/cassandra/samplingstore/storage.go
-- ./internal/storage/cassandra/samplingstore/storage.go
CREATE TABLE IF NOT EXISTS ${keyspace}.operation_throughput (
bucket int,
ts timeuuid,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ CREATE TABLE IF NOT EXISTS {{.Keyspace}}.dependencies_v2 (
AND default_time_to_live = {{.DependenciesTTLInSeconds}};

-- adaptive sampling tables
-- ./plugin/storage/cassandra/samplingstore/storage.go
-- ./internal/storage/cassandra/samplingstore/storage.go
CREATE TABLE IF NOT EXISTS {{.Keyspace}}.operation_throughput (
bucket int,
ts timeuuid,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ CREATE TABLE IF NOT EXISTS ${keyspace}.dependencies_v2 (
AND default_time_to_live = ${dependencies_ttl};

-- adaptive sampling tables
-- ./plugin/storage/cassandra/samplingstore/storage.go
-- ./internal/storage/cassandra/samplingstore/storage.go
CREATE TABLE IF NOT EXISTS ${keyspace}.operation_throughput (
bucket int,
ts timeuuid,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (

"go.uber.org/zap"

"github.com/jaegertracing/jaeger/internal/storage/cassandra/spanstore/dbmodel"
"github.com/jaegertracing/jaeger/pkg/cache"
"github.com/jaegertracing/jaeger/pkg/cassandra"
casMetrics "github.com/jaegertracing/jaeger/pkg/cassandra/metrics"
"github.com/jaegertracing/jaeger/pkg/metrics"
"github.com/jaegertracing/jaeger/plugin/storage/cassandra/spanstore/dbmodel"
"github.com/jaegertracing/jaeger/storage/spanstore"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import (
"go.uber.org/zap"

"github.com/jaegertracing/jaeger/internal/metricstest"
"github.com/jaegertracing/jaeger/internal/storage/cassandra/spanstore/dbmodel"
"github.com/jaegertracing/jaeger/pkg/cassandra/mocks"
"github.com/jaegertracing/jaeger/pkg/testutils"
"github.com/jaegertracing/jaeger/plugin/storage/cassandra/spanstore/dbmodel"
"github.com/jaegertracing/jaeger/storage/spanstore"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import (
"go.uber.org/zap"

"github.com/jaegertracing/jaeger-idl/model/v1"
"github.com/jaegertracing/jaeger/internal/storage/cassandra/spanstore/dbmodel"
"github.com/jaegertracing/jaeger/pkg/cassandra"
casMetrics "github.com/jaegertracing/jaeger/pkg/cassandra/metrics"
"github.com/jaegertracing/jaeger/pkg/metrics"
"github.com/jaegertracing/jaeger/pkg/otelsemconv"
"github.com/jaegertracing/jaeger/plugin/storage/cassandra/spanstore/dbmodel"
"github.com/jaegertracing/jaeger/storage/spanstore"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (

"github.com/jaegertracing/jaeger-idl/model/v1"
"github.com/jaegertracing/jaeger/internal/metricstest"
"github.com/jaegertracing/jaeger/internal/storage/cassandra/spanstore/dbmodel"
"github.com/jaegertracing/jaeger/pkg/cassandra"
"github.com/jaegertracing/jaeger/pkg/cassandra/mocks"
"github.com/jaegertracing/jaeger/pkg/testutils"
"github.com/jaegertracing/jaeger/plugin/storage/cassandra/spanstore/dbmodel"
"github.com/jaegertracing/jaeger/storage/spanstore"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (
"go.uber.org/zap"

"github.com/jaegertracing/jaeger-idl/model/v1"
"github.com/jaegertracing/jaeger/internal/storage/cassandra/spanstore/dbmodel"
"github.com/jaegertracing/jaeger/pkg/cassandra"
casMetrics "github.com/jaegertracing/jaeger/pkg/cassandra/metrics"
"github.com/jaegertracing/jaeger/pkg/metrics"
"github.com/jaegertracing/jaeger/plugin/storage/cassandra/spanstore/dbmodel"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package spanstore

import (
"github.com/jaegertracing/jaeger/plugin/storage/cassandra/spanstore/dbmodel"
"github.com/jaegertracing/jaeger/internal/storage/cassandra/spanstore/dbmodel"
)

// Option is a function that sets some option on the writer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/stretchr/testify/assert"

"github.com/jaegertracing/jaeger/plugin/storage/cassandra/spanstore/dbmodel"
"github.com/jaegertracing/jaeger/internal/storage/cassandra/spanstore/dbmodel"
)

func TestWriterOptions(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (

"github.com/jaegertracing/jaeger-idl/model/v1"
"github.com/jaegertracing/jaeger/internal/metricstest"
"github.com/jaegertracing/jaeger/internal/storage/cassandra/spanstore/dbmodel"
"github.com/jaegertracing/jaeger/pkg/cassandra/mocks"
"github.com/jaegertracing/jaeger/pkg/testutils"
"github.com/jaegertracing/jaeger/plugin/storage/cassandra/spanstore/dbmodel"
"github.com/jaegertracing/jaeger/storage/spanstore"
)

Expand Down
2 changes: 1 addition & 1 deletion plugin/storage/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import (
"go.uber.org/zap"

"github.com/jaegertracing/jaeger/internal/safeexpvar"
"github.com/jaegertracing/jaeger/internal/storage/cassandra"
"github.com/jaegertracing/jaeger/pkg/metrics"
"github.com/jaegertracing/jaeger/plugin"
"github.com/jaegertracing/jaeger/plugin/storage/badger"
"github.com/jaegertracing/jaeger/plugin/storage/blackhole"
"github.com/jaegertracing/jaeger/plugin/storage/cassandra"
"github.com/jaegertracing/jaeger/plugin/storage/es"
"github.com/jaegertracing/jaeger/plugin/storage/grpc"
"github.com/jaegertracing/jaeger/plugin/storage/kafka"
Expand Down
2 changes: 1 addition & 1 deletion plugin/storage/integration/cassandra_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
"go.uber.org/zap"
"go.uber.org/zap/zaptest"

"github.com/jaegertracing/jaeger/internal/storage/cassandra"
"github.com/jaegertracing/jaeger/pkg/config"
"github.com/jaegertracing/jaeger/pkg/metrics"
"github.com/jaegertracing/jaeger/pkg/testutils"
"github.com/jaegertracing/jaeger/plugin/storage/cassandra"
"github.com/jaegertracing/jaeger/storage/dependencystore"
"github.com/jaegertracing/jaeger/storage_v2/v1adapter"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/build/build-upload-docker-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ done

bash scripts/build/build-upload-a-docker-image.sh "${FLAGS[@]}" -b -c jaeger-es-index-cleaner -d cmd/es-index-cleaner -p "${platforms}" -t release
bash scripts/build/build-upload-a-docker-image.sh "${FLAGS[@]}" -b -c jaeger-es-rollover -d cmd/es-rollover -p "${platforms}" -t release
bash scripts/build/build-upload-a-docker-image.sh "${FLAGS[@]}" -c jaeger-cassandra-schema -d plugin/storage/cassandra/ -p "${platforms}"
bash scripts/build/build-upload-a-docker-image.sh "${FLAGS[@]}" -c jaeger-cassandra-schema -d internal/storage/cassandra/ -p "${platforms}"

# build/upload images for jaeger-tracegen and jaeger-anonymizer
for component in tracegen anonymizer
Expand Down
2 changes: 1 addition & 1 deletion scripts/e2e/cassandra.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ teardown_cassandra() {

apply_schema() {
local image=cassandra-schema
local schema_dir=plugin/storage/cassandra/
local schema_dir=internal/storage/cassandra/
local schema_version=$1
local keyspace=$2
local params=(
Expand Down
2 changes: 1 addition & 1 deletion scripts/utils/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ REPO_ROOT="$UTILS_DIR/../.."
# Define list of test files explicitly here , to be dynamic to the location of the test file
TEST_FILES=(
"$UTILS_DIR/compute-tags.test.sh"
"$REPO_ROOT/plugin/storage/cassandra/schema/create.test.sh"
"$REPO_ROOT/internal/storage/cassandra/schema/create.test.sh"
)

run_test_file() {
Expand Down
Loading