test_class.declarator: DATA_SOURCE_URL = "jdbc:h2:mem:test_db;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MySQL"
test_class.modifier: private static final
test_class.original_string: private static final String DATA_SOURCE_URL = "jdbc:h2:mem:test_db;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MySQL";
test_class.type: String
test_class.var_name: DATA_SOURCE_URL
test_class.declarator: USERNAME = "root"
test_class.modifier: private static final
test_class.original_string: private static final String USERNAME = "root";
test_class.type: String
test_class.var_name: USERNAME
test_class.declarator: PASSWORD = "password"
test_class.modifier: private static final
test_class.original_string: private static final String PASSWORD = "password";
test_class.type: String
test_class.var_name: PASSWORD
test_class.declarator: syncConfig
test_class.modifier: private
test_class.original_string: private SyncConfiguration syncConfig;
test_class.type: SyncConfiguration
test_class.var_name: syncConfig
test_class.declarator: dataSourceManager
test_class.modifier: private
test_class.original_string: private DataSourceManager dataSourceManager;
test_class.type: DataSourceManager
test_class.var_name: dataSourceManager
test_class.file: shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/job/task/inventory/InventoryDataScalingTaskTest.java
test_class.identifier: InventoryDataScalingTaskTest
test_case.body: @Test(expected = SyncTaskExecuteException.class)
      public void assertStartWithGetEstimatedRowsFailure() {
          InventoryDumperConfiguration inventoryDumperConfig = new InventoryDumperConfiguration(syncConfig.getDumperConfiguration());
          inventoryDumperConfig.setTableName("t_non_exist");
          InventoryDataScalingTask inventoryDataSyncTask = new InventoryDataScalingTask(inventoryDumperConfig, syncConfig.getImporterConfiguration(), dataSourceManager);
          inventoryDataSyncTask.start();
      }
test_case.class_method_signature: InventoryDataScalingTaskTest.assertStartWithGetEstimatedRowsFailure()
test_case.full_signature: @Test(expected = SyncTaskExecuteException.class) public void assertStartWithGetEstimatedRowsFailure()
test_case.identifier: assertStartWithGetEstimatedRowsFailure
test_case.invocations: getDumperConfiguration setTableName getImporterConfiguration start
test_case.modifiers: @Test(expected = SyncTaskExecuteException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertStartWithGetEstimatedRowsFailure()
focal_class.declarator: inventoryDumperConfig
focal_class.modifier: private final
focal_class.original_string: private final InventoryDumperConfiguration inventoryDumperConfig;
focal_class.type: InventoryDumperConfiguration
focal_class.var_name: inventoryDumperConfig
focal_class.declarator: importerConfig
focal_class.modifier: private final
focal_class.original_string: private final ImporterConfiguration importerConfig;
focal_class.type: ImporterConfiguration
focal_class.var_name: importerConfig
focal_class.declarator: dataSourceManager
focal_class.modifier: private final
focal_class.original_string: private final DataSourceManager dataSourceManager;
focal_class.type: DataSourceManager
focal_class.var_name: dataSourceManager
focal_class.declarator: estimatedRows
focal_class.modifier: private
focal_class.original_string: private long estimatedRows;
focal_class.type: long
focal_class.var_name: estimatedRows
focal_class.declarator: syncedRows = new AtomicLong()
focal_class.modifier: private final
focal_class.original_string: private final AtomicLong syncedRows = new AtomicLong();
focal_class.type: AtomicLong
focal_class.var_name: syncedRows
focal_class.declarator: dumper
focal_class.modifier: private
focal_class.original_string: private Dumper dumper;
focal_class.type: Dumper
focal_class.var_name: dumper
focal_class.file: shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/job/task/inventory/InventoryDataScalingTask.java
focal_class.identifier: InventoryDataScalingTask
focal_class.interfaces: implements ScalingTask<InventoryPosition>
focal_class.class_method_signature: InventoryDataScalingTask.InventoryDataScalingTask(final InventoryDumperConfiguration inventoryDumperConfig, final ImporterConfiguration importerConfig)
focal_class.full_signature: public  InventoryDataScalingTask(final InventoryDumperConfiguration inventoryDumperConfig, final ImporterConfiguration importerConfig)
focal_class.identifier: InventoryDataScalingTask
focal_class.modifiers: public
focal_class.parameters: (final InventoryDumperConfiguration inventoryDumperConfig, final ImporterConfiguration importerConfig)
focal_class.signature:  InventoryDataScalingTask(final InventoryDumperConfiguration inventoryDumperConfig, final ImporterConfiguration importerConfig)
focal_class.class_method_signature: InventoryDataScalingTask.InventoryDataScalingTask(final InventoryDumperConfiguration inventoryDumperConfig, final ImporterConfiguration importerConfig, final DataSourceManager dataSourceManager)
focal_class.full_signature: @SuppressWarnings("unchecked") public  InventoryDataScalingTask(final InventoryDumperConfiguration inventoryDumperConfig, final ImporterConfiguration importerConfig, final DataSourceManager dataSourceManager)
focal_class.identifier: InventoryDataScalingTask
focal_class.modifiers: @SuppressWarnings("unchecked") public
focal_class.parameters: (final InventoryDumperConfiguration inventoryDumperConfig, final ImporterConfiguration importerConfig, final DataSourceManager dataSourceManager)
focal_class.signature:  InventoryDataScalingTask(final InventoryDumperConfiguration inventoryDumperConfig, final ImporterConfiguration importerConfig, final DataSourceManager dataSourceManager)
focal_class.class_method_signature: InventoryDataScalingTask.generateSyncTaskId(final InventoryDumperConfiguration inventoryDumperConfig)
focal_class.full_signature: private String generateSyncTaskId(final InventoryDumperConfiguration inventoryDumperConfig)
focal_class.identifier: generateSyncTaskId
focal_class.modifiers: private
focal_class.parameters: (final InventoryDumperConfiguration inventoryDumperConfig)
focal_class.return: String
focal_class.signature: String generateSyncTaskId(final InventoryDumperConfiguration inventoryDumperConfig)
focal_class.class_method_signature: InventoryDataScalingTask.start()
focal_class.full_signature: @Override public void start()
focal_class.identifier: start
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void start()
focal_class.class_method_signature: InventoryDataScalingTask.getEstimatedRows()
focal_class.full_signature: private void getEstimatedRows()
focal_class.identifier: getEstimatedRows
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void getEstimatedRows()
focal_class.class_method_signature: InventoryDataScalingTask.instanceDumper()
focal_class.full_signature: private void instanceDumper()
focal_class.identifier: instanceDumper
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void instanceDumper()
focal_class.class_method_signature: InventoryDataScalingTask.instanceChannel(final Importer importer)
focal_class.full_signature: private void instanceChannel(final Importer importer)
focal_class.identifier: instanceChannel
focal_class.modifiers: private
focal_class.parameters: (final Importer importer)
focal_class.return: void
focal_class.signature: void instanceChannel(final Importer importer)
focal_class.class_method_signature: InventoryDataScalingTask.waitForResult(final Future<?> future)
focal_class.full_signature: private void waitForResult(final Future<?> future)
focal_class.identifier: waitForResult
focal_class.modifiers: private
focal_class.parameters: (final Future<?> future)
focal_class.return: void
focal_class.signature: void waitForResult(final Future<?> future)
focal_class.class_method_signature: InventoryDataScalingTask.stop()
focal_class.full_signature: @Override public void stop()
focal_class.identifier: stop
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void stop()
focal_class.class_method_signature: InventoryDataScalingTask.getProgress()
focal_class.full_signature: @Override public SyncProgress getProgress()
focal_class.identifier: getProgress
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: SyncProgress
focal_class.signature: SyncProgress getProgress()
focal_class.superclass: extends AbstractShardingScalingExecutor<InventoryPosition>
focal_method.body: @Override
      public void start() {
          getEstimatedRows();
          instanceDumper();
          Importer importer = ImporterFactory.newInstance(importerConfig, dataSourceManager);
          instanceChannel(importer);
          Future<?> future = ScalingContext.getInstance().getImporterExecuteEngine().submit(importer, new ExecuteCallback() {
              
              @Override
              public void onSuccess() {
              }
              
              @Override
              public void onFailure(final Throwable throwable) {
                  log.error("get an error when migrating the inventory data", throwable);
                  dumper.stop();
              }
          });
          dumper.start();
          waitForResult(future);
          dataSourceManager.close();
      }
focal_method.class_method_signature: InventoryDataScalingTask.start()
focal_method.full_signature: @Override public void start()
focal_method.identifier: start
focal_method.invocations: getEstimatedRows instanceDumper newInstance instanceChannel submit getImporterExecuteEngine getInstance error stop start waitForResult close
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void start()