Interface RuleAlteredJobAPI
- All Superinterfaces:
PipelineJobAPI,org.apache.shardingsphere.spi.type.required.RequiredSPI
public interface RuleAlteredJobAPI
extends PipelineJobAPI, org.apache.shardingsphere.spi.type.required.RequiredSPI
Rule altered job API.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaggregateDataConsistencyCheckResults(String jobId, Map<String, DataConsistencyCheckResult> checkResults) Aggregate data consistency check results.dataConsistencyCheck(String jobId) Do data consistency check.dataConsistencyCheck(String jobId, String algorithmType, Properties algorithmProps) Do data consistency check.dataConsistencyCheck(RuleAlteredJobConfiguration jobConfig) Do data consistency check.getJobConfig(String jobId) Get job configuration.getProgress(String jobId) Get job progress.getProgress(RuleAlteredJobConfiguration jobConfig) Get job progress.booleanIs data consistency check needed.booleanIs data consistency check needed.list()List all jobs.List all data consistency check algorithms from SPI.voidReset scaling job.voidrestoreClusterWriteDB(String jobId) Restore cluster writing.voidrestoreClusterWriteDB(String databaseName, String jobId) Restore cluster writing.start(RuleAlteredJobConfiguration jobConfig) Start scaling job by config.voidstopClusterWriteDB(String jobId) Stop cluster writing.voidstopClusterWriteDB(String databaseName, String jobId) Stop cluster writing.voidswitchClusterConfiguration(String jobId) Switch cluster configuration.voidSwitch cluster configuration.Methods inherited from interface org.apache.shardingsphere.data.pipeline.api.PipelineJobAPI
remove, startDisabledJob, stopMethods inherited from interface org.apache.shardingsphere.spi.type.required.RequiredSPI
isDefault
-
Method Details
-
list
List all jobs.- Returns:
- job infos
-
start
Start scaling job by config.- Parameters:
jobConfig- job config- Returns:
- job id
-
getProgress
Get job progress.- Parameters:
jobId- job id- Returns:
- each sharding item progress
-
getProgress
Get job progress.- Parameters:
jobConfig- job configuration- Returns:
- each sharding item progress
-
stopClusterWriteDB
Stop cluster writing.- Parameters:
jobId- job id
-
stopClusterWriteDB
Stop cluster writing.- Parameters:
databaseName- database namejobId- job id
-
restoreClusterWriteDB
Restore cluster writing.- Parameters:
jobId- job id
-
restoreClusterWriteDB
Restore cluster writing.- Parameters:
databaseName- database namejobId- job id
-
listDataConsistencyCheckAlgorithms
Collection<DataConsistencyCheckAlgorithmInfo> listDataConsistencyCheckAlgorithms()List all data consistency check algorithms from SPI.- Returns:
- data consistency check algorithms
-
isDataConsistencyCheckNeeded
Is data consistency check needed.- Parameters:
jobId- job id- Returns:
- data consistency check needed or not
-
isDataConsistencyCheckNeeded
Is data consistency check needed.- Parameters:
jobConfig- job configuration- Returns:
- data consistency check needed or not
-
dataConsistencyCheck
Do data consistency check.- Parameters:
jobId- job id- Returns:
- each logic table check result
-
dataConsistencyCheck
Do data consistency check.- Parameters:
jobConfig- job configuration- Returns:
- each logic table check result
-
dataConsistencyCheck
Map<String,DataConsistencyCheckResult> dataConsistencyCheck(String jobId, String algorithmType, Properties algorithmProps) Do data consistency check.- Parameters:
jobId- job idalgorithmType- algorithm typealgorithmProps- algorithm props. Nullable- Returns:
- each logic table check result
-
aggregateDataConsistencyCheckResults
boolean aggregateDataConsistencyCheckResults(String jobId, Map<String, DataConsistencyCheckResult> checkResults) Aggregate data consistency check results.- Parameters:
jobId- job idcheckResults- check results- Returns:
- check success or not
-
switchClusterConfiguration
Switch cluster configuration.- Parameters:
jobId- job id
-
switchClusterConfiguration
Switch cluster configuration.- Parameters:
jobConfig- job configuration
-
reset
Reset scaling job.- Parameters:
jobId- job id
-
getJobConfig
Get job configuration.- Parameters:
jobId- job id- Returns:
- job configuration
-