Mysql to ScyllaDB Migrator and validator #307
Open
vigneshkumarak wants to merge 4 commits intoscylladb:masterfrom
Open
Mysql to ScyllaDB Migrator and validator #307vigneshkumarak wants to merge 4 commits intoscylladb:masterfrom
vigneshkumarak wants to merge 4 commits intoscylladb:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add MySQL as a migration and validation source
Summary
Adds support for migrating data from MySQL to ScyllaDB and validating the migrated data. This enables using the scylla-migrator for MySQL-to-ScyllaDB migrations with the same Spark-based workflow already supported for Cassandra and DynamoDB sources.
Migration
MySQLsource type that reads tables via Spark JDBC with configurable partitioned parallel reads, cursor-based fetching, and optionalWHEREfilteringMySQLSchemaMapperhandles MySQL-specific type conversions (e.g.,TINYINT(1)/BIT(1)toBoolean, unsignedBIGINTtoDecimal)Migratorto write to ScyllaDB via the existing Spark ScyllaDB connectorValidation
MySQLToScyllaValidatorperforms row-by-row comparison between MySQL source and ScyllaDB target by joining on the configured primary keyhashColumnsconfig option: large text/blob columns are replaced by an MD5 hash computed server-side in MySQL and client-side in Spark for ScyllaDB, dramatically reducing network data transfer during validationBigDecimalvaluesConfiguration
SourceSettings.MySQLwith fields:host,port,database,table,credentials,primaryKey,partitionColumn,numPartitions,lowerBound,upperBound,fetchSize,where,connectionPropertieshashColumnsfield inValidationconfig (backward-compatible — defaults toNone, existing configs are unaffected)mysql-connector-j 8.3.0dependencyTest configs
mysql-to-scylla-basic.yaml— basic MySQL migration with validationmysql-to-scylla-large-blobs.yaml— large BLOB migration with hash-based validation