Interface ClusterInfo

    • Method Detail

      • refreshClusterInfo

        void refreshClusterInfo()
      • getLowestCassandraVersion

        java.lang.String getLowestCassandraVersion()
      • clusterWriteAvailability

        java.util.Map<RingInstance,​WriteAvailability> clusterWriteAvailability()
        Returns:
        WriteAvailability per RingInstance in the cluster
      • getPartitioner

        org.apache.cassandra.spark.data.partitioner.Partitioner getPartitioner()
      • checkBulkWriterIsEnabledOrThrow

        void checkBulkWriterIsEnabledOrThrow()
      • validateTimeSkew

        void validateTimeSkew​(com.google.common.collect.Range<java.math.BigInteger> range)
                       throws org.apache.cassandra.spark.exception.SidecarApiCallException,
                              org.apache.cassandra.spark.exception.TimeSkewTooLargeException
        Validate whether the time skew of the replicas of the range is acceptable
        Parameters:
        range - token range used to look up the relevant replicas
        Throws:
        org.apache.cassandra.spark.exception.SidecarApiCallException - when fails to retrieve time skew information
        org.apache.cassandra.spark.exception.TimeSkewTooLargeException - when the time skew has exceeded the allowance
      • getKeyspaceSchema

        java.lang.String getKeyspaceSchema​(boolean cached)
        Return the keyspace schema string of the enclosing keyspace for bulk write in the cluster
        Parameters:
        cached - whether using the cached schema information
        Returns:
        keyspace schema string
      • replicationFactor

        org.apache.cassandra.spark.data.ReplicationFactor replicationFactor()
        Returns:
        ReplicationFactor of the enclosing keyspace for bulk write in the cluster
      • clusterId

        @Nullable
        default java.lang.String clusterId()
        ID string that can uniquely identify a cluster

        Implementor note: the method is optional. When writing to a single cluster, there is no requirement of assigning an ID for bulk write to proceed. When in the coordinated write mode, i.e. writing to multiple clusters, the method must be implemented and return unique string for clusters.

        Returns:
        cluster id string, null if absent
      • close

        default void close()