Class CassandraJobInfo
- java.lang.Object
-
- org.apache.cassandra.spark.bulkwriter.CassandraJobInfo
-
-
Field Summary
Fields Modifier and Type Field Description protected BulkSparkConfconfprotected MultiClusterContainer<java.util.UUID>restoreJobIdsprotected TokenPartitionertokenPartitioner
-
Constructor Summary
Constructors Constructor Description CassandraJobInfo(BroadcastableJobInfo broadcastable)Reconstruct from BroadcastableJobInfo on executor.CassandraJobInfo(BulkSparkConf conf, MultiClusterContainer<java.util.UUID> restoreJobIds, TokenPartitioner tokenPartitioner)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CoordinatedWriteConfcoordinatedWriteConf()DigestAlgorithmSupplierdigestAlgorithmSupplier()inteffectiveSidecarPort()intgetCommitBatchSize()intgetCommitThreadsPerInstance()java.lang.StringgetConfiguredJobId()An optional unique identified supplied in spark configurationConsistencyLevelgetConsistencyLevel()java.lang.StringgetLocalDC()java.util.UUIDgetRestoreJobId()return the identifier of the restore job created on Cassandra Sidecarjava.util.UUIDgetRestoreJobId(java.lang.String clusterId)Returns the restore job identifier on Cassandra Sidecar of the cluster identified by the clusterId The method should be called in the coordinated write code path.booleangetSkipClean()TokenPartitionergetTokenPartitioner()doubleimportCoordinatorTimeoutMultiplier()intjobKeepAliveMinutes()longjobTimeoutSeconds()org.apache.cassandra.spark.data.QualifiedTableNamequalifiedTableName()booleanskipExtendedVerify()intsstableDataSizeInMiB()DataTransportInfotransportInfo()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.spark.bulkwriter.JobInfo
getId, isCoordinatedWriteEnabled
-
-
-
-
Field Detail
-
conf
protected final BulkSparkConf conf
-
restoreJobIds
protected final MultiClusterContainer<java.util.UUID> restoreJobIds
-
tokenPartitioner
protected final TokenPartitioner tokenPartitioner
-
-
Constructor Detail
-
CassandraJobInfo
public CassandraJobInfo(BulkSparkConf conf, MultiClusterContainer<java.util.UUID> restoreJobIds, TokenPartitioner tokenPartitioner)
-
CassandraJobInfo
public CassandraJobInfo(BroadcastableJobInfo broadcastable)
Reconstruct from BroadcastableJobInfo on executor. Reuses conf and restoreJobIds from broadcast, and reconstructs TokenPartitioner from broadcastable partition mappings.- Parameters:
broadcastable- the broadcastable job info from broadcast
-
-
Method Detail
-
getConsistencyLevel
public ConsistencyLevel getConsistencyLevel()
- Specified by:
getConsistencyLevelin interfaceJobInfo
-
getLocalDC
public java.lang.String getLocalDC()
- Specified by:
getLocalDCin interfaceJobInfo
-
sstableDataSizeInMiB
public int sstableDataSizeInMiB()
- Specified by:
sstableDataSizeInMiBin interfaceJobInfo- Returns:
- the max sstable data file size in mebibytes
-
getCommitBatchSize
public int getCommitBatchSize()
- Specified by:
getCommitBatchSizein interfaceJobInfo
-
skipExtendedVerify
public boolean skipExtendedVerify()
- Specified by:
skipExtendedVerifyin interfaceJobInfo
-
getSkipClean
public boolean getSkipClean()
- Specified by:
getSkipCleanin interfaceJobInfo
-
transportInfo
public DataTransportInfo transportInfo()
- Specified by:
transportInfoin interfaceJobInfo
-
jobKeepAliveMinutes
public int jobKeepAliveMinutes()
- Specified by:
jobKeepAliveMinutesin interfaceJobInfo- Returns:
- job keep alive time in minutes
-
jobTimeoutSeconds
public long jobTimeoutSeconds()
- Specified by:
jobTimeoutSecondsin interfaceJobInfo- Returns:
- job timeout in seconds; see
WriterOptions.JOB_TIMEOUT_SECONDS
-
effectiveSidecarPort
public int effectiveSidecarPort()
- Specified by:
effectiveSidecarPortin interfaceJobInfo- Returns:
- sidecar service port
-
importCoordinatorTimeoutMultiplier
public double importCoordinatorTimeoutMultiplier()
- Specified by:
importCoordinatorTimeoutMultiplierin interfaceJobInfo- Returns:
- multiplier to calculate the final timeout for import coordinator
-
coordinatedWriteConf
@Nullable public CoordinatedWriteConf coordinatedWriteConf()
- Specified by:
coordinatedWriteConfin interfaceJobInfo- Returns:
- CoordinatedWriteConf if configured, null otherwise
-
getCommitThreadsPerInstance
public int getCommitThreadsPerInstance()
- Specified by:
getCommitThreadsPerInstancein interfaceJobInfo
-
getRestoreJobId
public java.util.UUID getRestoreJobId()
Description copied from interface:JobInforeturn the identifier of the restore job created on Cassandra Sidecar- Specified by:
getRestoreJobIdin interfaceJobInfo- Returns:
- time-based uuid
-
getRestoreJobId
public java.util.UUID getRestoreJobId(@Nullable java.lang.String clusterId)Description copied from interface:JobInfoReturns the restore job identifier on Cassandra Sidecar of the cluster identified by the clusterId The method should be called in the coordinated write code path.- Specified by:
getRestoreJobIdin interfaceJobInfo- Parameters:
clusterId- identifies the Cassandra cluster- Returns:
- restore job identifier, a time-based uuid
-
getConfiguredJobId
public java.lang.String getConfiguredJobId()
Description copied from interface:JobInfoAn optional unique identified supplied in spark configuration- Specified by:
getConfiguredJobIdin interfaceJobInfo- Returns:
- a id string or null
-
getTokenPartitioner
public TokenPartitioner getTokenPartitioner()
- Specified by:
getTokenPartitionerin interfaceJobInfo
-
digestAlgorithmSupplier
@NotNull public DigestAlgorithmSupplier digestAlgorithmSupplier()
- Specified by:
digestAlgorithmSupplierin interfaceJobInfo- Returns:
- the digest type provider for the bulk job, and used to calculate digests for SSTable components
-
qualifiedTableName
@NotNull public org.apache.cassandra.spark.data.QualifiedTableName qualifiedTableName()
- Specified by:
qualifiedTableNamein interfaceJobInfo
-
-