@Test public void testToConfig() { MToConfig originalConfigs = new MToConfig(ConfigUtils.toConfigs(ToJobConfiguration.class)); MToConfig newConfigs = new MToConfig(ConfigUtils.toConfigs(ToJobConfiguration.class)); originalConfigs.getInput("toJobConfig.schemaName").setValue("test-schema"); originalConfigs.getInput("toJobConfig.tableName").setValue("test-tableName"); originalConfigs.getInput("toJobConfig.sql").setValue("test-sql"); originalConfigs.getInput("toJobConfig.columns").setValue("test-columns"); originalConfigs.getInput("toJobConfig.stageTableName").setValue("test-stageTableName"); originalConfigs.getInput("toJobConfig.shouldClearStageTable").setValue("test-shouldClearStageTable"); upgrader.upgradeToJobConfig(originalConfigs, newConfigs); assertEquals(originalConfigs, newConfigs); assertEquals("test-schema", newConfigs.getInput("toJobConfig.schemaName").getValue()); assertEquals("test-tableName", newConfigs.getInput("toJobConfig.tableName").getValue()); assertEquals("test-sql", newConfigs.getInput("toJobConfig.sql").getValue()); assertEquals("test-columns", newConfigs.getInput("toJobConfig.columns").getValue()); assertEquals("test-stageTableName", newConfigs.getInput("toJobConfig.stageTableName").getValue()); assertEquals("test-shouldClearStageTable", newConfigs.getInput("toJobConfig.shouldClearStageTable").getValue()); }
@Override public void upgradeToJobConfig(MToConfig original, MToConfig upgradeTarget) { ConfigurableUpgradeUtil.doUpgrade(original.getConfigs(), upgradeTarget.getConfigs()); }
GenericJdbcConnectorUpgrader extends ConnectorConfigurableUpgrader { @Override public void upgradeToJobConfig(MToConfig original, MToConfig upgradeTarget) { ConfigurableUpgradeUtil.doUpgrade(original.getConfigs(), upgradeTarget.getConfigs()); } }
GenericJdbcConnectorUpgrader extends ConnectorConfigurableUpgrader { @Override public void upgradeToJobConfig(MToConfig original, MToConfig upgradeTarget) { ConfigurableUpgradeUtil.doUpgrade(original.getConfigs(), upgradeTarget.getConfigs()); }  }
GenericJdbcConnectorUpgrader extends ConnectorConfigurableUpgrader { @Override public void upgradeToJobConfig(MToConfig original, MToConfig upgradeTarget) { ConfigurableUpgradeUtil.doUpgrade(original.getConfigs(), upgradeTarget.getConfigs()); }  @Override void upgradeLinkConfig(MLinkConfig original, MLinkConfig upgradeTarget); @Override void upgradeFromJobConfig(MFromConfig original, MFromConfig upgradeTarget); @Override void upgradeToJobConfig(MToConfig original, MToConfig upgradeTarget); }
GenericJdbcConnectorUpgrader extends ConnectorConfigurableUpgrader { @Override public void upgradeToJobConfig(MToConfig original, MToConfig upgradeTarget) { ConfigurableUpgradeUtil.doUpgrade(original.getConfigs(), upgradeTarget.getConfigs()); }  @Override void upgradeLinkConfig(MLinkConfig original, MLinkConfig upgradeTarget); @Override void upgradeFromJobConfig(MFromConfig original, MFromConfig upgradeTarget); @Override void upgradeToJobConfig(MToConfig original, MToConfig upgradeTarget);  }