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 Details

    • list

      List<JobInfo> list()
      List all jobs.
      Returns:
      job infos
    • start

      Start scaling job by config.
      Parameters:
      jobConfig - job config
      Returns:
      job id
    • getProgress

      Map<Integer,JobProgress> getProgress(String jobId)
      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

      void stopClusterWriteDB(String jobId)
      Stop cluster writing.
      Parameters:
      jobId - job id
    • stopClusterWriteDB

      void stopClusterWriteDB(String databaseName, String jobId)
      Stop cluster writing.
      Parameters:
      databaseName - database name
      jobId - job id
    • restoreClusterWriteDB

      void restoreClusterWriteDB(String jobId)
      Restore cluster writing.
      Parameters:
      jobId - job id
    • restoreClusterWriteDB

      void restoreClusterWriteDB(String databaseName, String jobId)
      Restore cluster writing.
      Parameters:
      databaseName - database name
      jobId - job id
    • listDataConsistencyCheckAlgorithms

      Collection<DataConsistencyCheckAlgorithmInfo> listDataConsistencyCheckAlgorithms()
      List all data consistency check algorithms from SPI.
      Returns:
      data consistency check algorithms
    • isDataConsistencyCheckNeeded

      boolean isDataConsistencyCheckNeeded(String jobId)
      Is data consistency check needed.
      Parameters:
      jobId - job id
      Returns:
      data consistency check needed or not
    • isDataConsistencyCheckNeeded

      boolean isDataConsistencyCheckNeeded(RuleAlteredJobConfiguration jobConfig)
      Is data consistency check needed.
      Parameters:
      jobConfig - job configuration
      Returns:
      data consistency check needed or not
    • dataConsistencyCheck

      Map<String,DataConsistencyCheckResult> dataConsistencyCheck(String jobId)
      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 id
      algorithmType - algorithm type
      algorithmProps - 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 id
      checkResults - check results
      Returns:
      check success or not
    • switchClusterConfiguration

      void switchClusterConfiguration(String jobId)
      Switch cluster configuration.
      Parameters:
      jobId - job id
    • switchClusterConfiguration

      void switchClusterConfiguration(RuleAlteredJobConfiguration jobConfig)
      Switch cluster configuration.
      Parameters:
      jobConfig - job configuration
    • reset

      void reset(String jobId)
      Reset scaling job.
      Parameters:
      jobId - job id
    • getJobConfig

      RuleAlteredJobConfiguration getJobConfig(String jobId)
      Get job configuration.
      Parameters:
      jobId - job id
      Returns:
      job configuration