Interface IBroadcastableClusterInfo

  • All Superinterfaces:
    java.io.Serializable
    All Known Implementing Classes:
    BroadcastableClusterInfo, BroadcastableClusterInfoGroup

    public interface IBroadcastableClusterInfo
    extends java.io.Serializable
    Minimal 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 full ClusterInfo instances on executors.

    Methods in this interface:

    • 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 in AbstractBulkWriterContext.
        Returns:
        reconstructed ClusterInfo (CassandraClusterInfo or CassandraClusterInfoGroup)