Class CassandraCoordinatedBulkWriterContext
- java.lang.Object
-
- org.apache.cassandra.spark.bulkwriter.AbstractBulkWriterContext
-
- org.apache.cassandra.spark.bulkwriter.cloudstorage.coordinated.CassandraCoordinatedBulkWriterContext
-
- All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable,BulkWriterContext
public class CassandraCoordinatedBulkWriterContext extends AbstractBulkWriterContext
BulkWriterContext for coordinated write to multiple clusters. The context requires the coordinated-write configuration to be present.This class does NOT have a serialVersionUID because it is never directly serialized. See
AbstractBulkWriterContextfor details on the serialization architecture.
-
-
Field Summary
-
Fields inherited from class org.apache.cassandra.spark.bulkwriter.AbstractBulkWriterContext
KRYO_REGISTRATION_WARNING
-
-
Constructor Summary
Constructors Constructor Description CassandraCoordinatedBulkWriterContext(BulkSparkConf conf, org.apache.spark.sql.types.StructType structType, int sparkDefaultParallelism)CassandraCoordinatedBulkWriterContext(BulkWriterConfig config)Constructor used byBulkWriterContext.from(BulkWriterConfig)factory method.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ClusterInfobuildClusterInfo()protected CassandraClusterInfoGroupclusterInfoGroup()protected MultiClusterContainer<java.util.UUID>generateRestoreJobIds()Generate the restore job IDs used in the receiving Cassandra Sidecar clusters.protected voidvalidateKeyspaceReplication()-
Methods inherited from class org.apache.cassandra.spark.bulkwriter.AbstractBulkWriterContext
bridge, buildCassandraBridge, buildJobInfo, buildJobStatsPublisher, buildSchemaInfo, buildTransportContext, bulkSparkConf, cluster, createTransportContext, findLowestCassandraVersion, initializeTableSchema, job, jobStats, lowestCassandraVersion, read, reconstructClusterInfoOnExecutor, reconstructJobInfoOnExecutor, reconstructSchemaInfoOnExecutor, schema, shutdown, sparkDefaultParallelism, transportContext, write
-
-
-
-
Constructor Detail
-
CassandraCoordinatedBulkWriterContext
public CassandraCoordinatedBulkWriterContext(@NotNull BulkSparkConf conf, @NotNull org.apache.spark.sql.types.StructType structType, int sparkDefaultParallelism)
-
CassandraCoordinatedBulkWriterContext
public CassandraCoordinatedBulkWriterContext(@NotNull BulkWriterConfig config)Constructor used byBulkWriterContext.from(BulkWriterConfig)factory method. This constructor is only used on executors to reconstruct context from broadcast config.- Parameters:
config- immutable configuration for the bulk writer
-
-
Method Detail
-
buildClusterInfo
protected ClusterInfo buildClusterInfo()
- Specified by:
buildClusterInfoin classAbstractBulkWriterContext
-
validateKeyspaceReplication
protected void validateKeyspaceReplication()
- Specified by:
validateKeyspaceReplicationin classAbstractBulkWriterContext
-
generateRestoreJobIds
protected MultiClusterContainer<java.util.UUID> generateRestoreJobIds()
Description copied from class:AbstractBulkWriterContextGenerate the restore job IDs used in the receiving Cassandra Sidecar clusters. In the coordinated write mode, there should be a unique uuid per cluster; In the single cluster write mode, the MultiClusterContainer would contain one single entry.- Specified by:
generateRestoreJobIdsin classAbstractBulkWriterContext- Returns:
- restore job ids that are unique per cluster
-
clusterInfoGroup
protected CassandraClusterInfoGroup clusterInfoGroup()
-
-