lukasz-antoniak commented on code in PR #131: URL: https://github.com/apache/cassandra-analytics/pull/131#discussion_r2273346450
########## cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/BulkSparkConf.java: ########## @@ -98,6 +98,7 @@ public class BulkSparkConf implements Serializable // which will throw a configuration exception for each setting with that prefix it does not recognize public static final String SETTING_PREFIX = "spark.cassandra_analytics."; + public static final String CASSANDRA_VERSION = SETTING_PREFIX + "cassandra.version"; Review Comment: Configuration parameter is used in `SparkTestUtils`, line 199. `KryoRegister` needs to know what is the C* version and initialisation happens in static block, so before it can be discovered via sidecar. Previous code hardcoded 4.0 bridge: ``` @Override public void registerClasses(@NotNull Kryo kryo) { LOGGER.info("Initializing KryoRegister"); // TODO: Implicitly defaulting to Cassandra version 4.0 is a part of a previously published API. // We might want to persist the version of Cassandra into the Spark configuration instead. CassandraBridgeFactory.get(CassandraVersion.FOURZERO).kryoRegister(kryo); LOGGER.info("Initializing KryoRegister for Cassandra bridge {}", cassandraVersion); CassandraBridgeFactory.get(cassandraVersion).kryoRegister(kryo); KRYO_SERIALIZERS.forEach(kryo::register); } ``` I could not think of a better name than generic `spark.cassandra_analytics.cassandra.version`, as many static initialisations can depend on it. What do you think? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org