frankgh commented on code in PR #19:
URL:
https://github.com/apache/cassandra-analytics/pull/19#discussion_r1414295872
##########
cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/data/CassandraDataLayer.java:
##########
@@ -239,12 +241,23 @@ public void initialize(@NotNull ClientConfig options)
LOGGER.info("Initialized Cassandra Bulk Reader with
effectiveNumberOfCores={}", effectiveNumberOfCores);
}
- private int initBulkReader(@NotNull ClientConfig options,
- CompletableFuture<NodeSettings>
nodeSettingsFuture,
- CompletableFuture<RingResponse> ringFuture)
throws ExecutionException, InterruptedException
+ private int initBulkReader(@NotNull ClientConfig options) throws
ExecutionException, InterruptedException
{
Preconditions.checkArgument(keyspace != null, "Keyspace must be
non-null for Cassandra Bulk Reader");
Preconditions.checkArgument(table != null, "Table must be non-null for
Cassandra Bulk Reader");
+
ShutdownHookManager.addShutdownHook(org.apache.spark.util.ShutdownHookManager.TEMP_DIR_SHUTDOWN_PRIORITY(),
+ ScalaFunctions.wrapLambda(() ->
shutdownHook(options)));
+
+ NodeSettings nodeSettings = sidecar.nodeSettings().get();
+ String cassandraVersion =
getEffectiveCassandraVersionForRead(clusterConfig, nodeSettings);
+ Partitioner partitioner = Partitioner.from(nodeSettings.partitioner());
+ bridge = CassandraBridgeFactory.get(cassandraVersion);
+ // optionally quote identifiers if the option has been set, we need an
instance for the bridge
+ maybeQuoteKeyspaceAndTable();
Review Comment:
yeah, the constructor that calls this method is only called in the
executors. For the driver, it will use this method to initialize the keyspace
and table
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]