Class CassandraBulkWriterContext
- java.lang.Object
-
- org.apache.cassandra.spark.bulkwriter.AbstractBulkWriterContext
-
- org.apache.cassandra.spark.bulkwriter.CassandraBulkWriterContext
-
- All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable,BulkWriterContext
public class CassandraBulkWriterContext extends AbstractBulkWriterContext
BulkWriterContext implementation for single cluster write operations.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 Modifier Constructor Description protectedCassandraBulkWriterContext(BulkSparkConf conf, org.apache.spark.sql.types.StructType structType, int sparkDefaultParallelism)protectedCassandraBulkWriterContext(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 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
-
CassandraBulkWriterContext
protected CassandraBulkWriterContext(@NotNull BulkSparkConf conf, @NotNull org.apache.spark.sql.types.StructType structType, int sparkDefaultParallelism)
-
CassandraBulkWriterContext
protected CassandraBulkWriterContext(@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
-
-