Interface IBroadcastableClusterInfo
-
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
BroadcastableClusterInfo,BroadcastableClusterInfoGroup
public interface IBroadcastableClusterInfo extends java.io.SerializableMinimal interface for cluster information that can be safely broadcast to Spark executors. This interface contains only the essential methods that broadcastable cluster info implementations (BroadcastableClusterInfo,BroadcastableClusterInfoGroup) need to provide.Unlike
ClusterInfo, this interface doesn't include methods that require fresh data from Cassandra Sidecar or runtime operations. These implementations are designed to be broadcast and then reconstructed to fullClusterInfoinstances on executors.Methods in this interface:
getPartitioner()- static cluster partitioner configurationgetLowestCassandraVersion()- pre-computed version stringclusterId()- cluster identifier (optional)getConf()- BulkSparkConf needed for reconstruction on executorsreconstruct()- reconstructs full ClusterInfo instance on executors
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringclusterId()ID string that can uniquely identify a cluster.BulkSparkConfgetConf()java.lang.StringgetLowestCassandraVersion()org.apache.cassandra.spark.data.partitioner.PartitionergetPartitioner()ClusterInforeconstruct()Reconstructs a full ClusterInfo instance from this broadcastable data on executors.
-
-
-
Method Detail
-
getPartitioner
org.apache.cassandra.spark.data.partitioner.Partitioner getPartitioner()
- Returns:
- the partitioner used by the cluster
-
getLowestCassandraVersion
java.lang.String getLowestCassandraVersion()
- Returns:
- the lowest Cassandra version in the cluster
-
clusterId
@Nullable java.lang.String clusterId()
ID string that can uniquely identify a cluster. When writing to a single cluster, this may be null. When in coordinated write mode (writing to multiple clusters), this must return a unique string.- Returns:
- cluster id string, null if absent
-
getConf
@NotNull BulkSparkConf getConf()
- Returns:
- the BulkSparkConf configuration needed to reconstruct ClusterInfo on executors
-
reconstruct
ClusterInfo reconstruct()
Reconstructs a full ClusterInfo instance from this broadcastable data on executors. Each implementation knows how to reconstruct itself into the appropriate ClusterInfo type. This allows adding new broadcastable types without modifying the reconstruction logic inAbstractBulkWriterContext.- Returns:
- reconstructed ClusterInfo (CassandraClusterInfo or CassandraClusterInfoGroup)
-
-