@Test public void testExecuteDMLUpdates() throws Exception { Method updateStormConfigs = UpgradeCatalog220.class.getDeclaredMethod("updateStormConfigs"); Method updateAMSConfigs = UpgradeCatalog220.class.getDeclaredMethod("updateAMSConfigs"); Method updateHDFSConfigs = UpgradeCatalog220.class.getDeclaredMethod("updateHDFSConfigs"); Method updateKafkaConfigs = UpgradeCatalog220.class.getDeclaredMethod("updateKafkaConfigs"); Method addNewConfigurationsFromXml = AbstractUpgradeCatalog.class.getDeclaredMethod("addNewConfigurationsFromXml"); Method updateHbaseEnvConfig = UpgradeCatalog220.class.getDeclaredMethod("updateHbaseEnvConfig"); Method updateFlumeEnvConfig = UpgradeCatalog220.class.getDeclaredMethod("updateFlumeEnvConfig"); Method updateZookeeperLog4j = UpgradeCatalog220.class.getDeclaredMethod("updateZookeeperLog4j"); Method updateHadoopEnvConfig = UpgradeCatalog220.class.getDeclaredMethod("updateHadoopEnv"); Method updateAlertDefinitions = UpgradeCatalog220.class.getDeclaredMethod("updateAlertDefinitions"); Method updateRangerEnvConfig = UpgradeCatalog220.class.getDeclaredMethod("updateRangerEnvConfig"); Method updateRangerUgsyncSiteConfig = UpgradeCatalog220.class.getDeclaredMethod("updateRangerUgsyncSiteConfig"); Method updateHiveConfig = UpgradeCatalog220.class.getDeclaredMethod("updateHiveConfig"); Method updateAccumuloConfigs = UpgradeCatalog220.class.getDeclaredMethod("updateAccumuloConfigs"); Method updateKerberosDescriptorArtifacts = AbstractUpgradeCatalog.class.getDeclaredMethod("updateKerberosDescriptorArtifacts"); Method updateKnoxTopology = UpgradeCatalog220.class.getDeclaredMethod("updateKnoxTopology"); UpgradeCatalog220 upgradeCatalog220 = createMockBuilder(UpgradeCatalog220.class) .addMockedMethod(updateAMSConfigs) .addMockedMethod(updateHDFSConfigs) .addMockedMethod(updateStormConfigs) .addMockedMethod(addNewConfigurationsFromXml) .addMockedMethod(updateHbaseEnvConfig) .addMockedMethod(updateFlumeEnvConfig) .addMockedMethod(updateAlertDefinitions) .addMockedMethod(updateKafkaConfigs) .addMockedMethod(updateZookeeperLog4j) .addMockedMethod(updateHadoopEnvConfig) .addMockedMethod(updateRangerEnvConfig) .addMockedMethod(updateRangerUgsyncSiteConfig) .addMockedMethod(updateHiveConfig) .addMockedMethod(updateAccumuloConfigs) .addMockedMethod(updateKerberosDescriptorArtifacts) .addMockedMethod(updateKnoxTopology) .createMock(); upgradeCatalog220.updateHbaseEnvConfig(); expectLastCall().once(); upgradeCatalog220.updateFlumeEnvConfig(); upgradeCatalog220.addNewConfigurationsFromXml(); expectLastCall().once(); upgradeCatalog220.updateStormConfigs(); expectLastCall().once(); upgradeCatalog220.updateHadoopEnv(); expectLastCall().once(); upgradeCatalog220.updateAMSConfigs(); expectLastCall().once(); upgradeCatalog220.updateAlertDefinitions(); expectLastCall().once(); upgradeCatalog220.updateKafkaConfigs(); expectLastCall().once(); upgradeCatalog220.updateHDFSConfigs(); expectLastCall().once(); upgradeCatalog220.updateZookeeperLog4j(); expectLastCall().once(); upgradeCatalog220.updateRangerEnvConfig(); expectLastCall().once(); upgradeCatalog220.updateRangerUgsyncSiteConfig(); expectLastCall().once(); upgradeCatalog220.updateHiveConfig(); expectLastCall().once(); upgradeCatalog220.updateAccumuloConfigs(); expectLastCall().once(); upgradeCatalog220.updateKnoxTopology(); expectLastCall().once(); upgradeCatalog220.updateKerberosDescriptorArtifacts(); expectLastCall().once(); replay(upgradeCatalog220); upgradeCatalog220.executeDMLUpdates(); verify(upgradeCatalog220); }
@Override protected void executeDMLUpdates() throws AmbariException, SQLException { addNewConfigurationsFromXml(); updateAlertDefinitions(); updateStormConfigs(); updateAMSConfigs(); updateHDFSConfigs(); updateHbaseEnvConfig(); updateFlumeEnvConfig(); updateHadoopEnv(); updateKafkaConfigs(); updateRangerEnvConfig(); updateRangerUgsyncSiteConfig(); updateZookeeperLog4j(); updateHiveConfig(); updateAccumuloConfigs(); updateKerberosDescriptorArtifacts(); updateKnoxTopology(); }
UpgradeCatalog220 extends AbstractUpgradeCatalog { @Override protected void executeDMLUpdates() throws AmbariException, SQLException { addNewConfigurationsFromXml(); updateAlertDefinitions(); updateStormConfigs(); updateAMSConfigs(); updateHDFSConfigs(); updateHbaseEnvConfig(); updateFlumeEnvConfig(); updateHadoopEnv(); updateKafkaConfigs(); updateRangerEnvConfig(); updateRangerUgsyncSiteConfig(); updateZookeeperLog4j(); updateHiveConfig(); updateAccumuloConfigs(); updateKerberosDescriptorArtifacts(); updateKnoxTopology(); } }
UpgradeCatalog220 extends AbstractUpgradeCatalog { @Override protected void executeDMLUpdates() throws AmbariException, SQLException { addNewConfigurationsFromXml(); updateAlertDefinitions(); updateStormConfigs(); updateAMSConfigs(); updateHDFSConfigs(); updateHbaseEnvConfig(); updateFlumeEnvConfig(); updateHadoopEnv(); updateKafkaConfigs(); updateRangerEnvConfig(); updateRangerUgsyncSiteConfig(); updateZookeeperLog4j(); updateHiveConfig(); updateAccumuloConfigs(); updateKerberosDescriptorArtifacts(); updateKnoxTopology(); } @Inject  UpgradeCatalog220(Injector injector); }
UpgradeCatalog220 extends AbstractUpgradeCatalog { @Override protected void executeDMLUpdates() throws AmbariException, SQLException { addNewConfigurationsFromXml(); updateAlertDefinitions(); updateStormConfigs(); updateAMSConfigs(); updateHDFSConfigs(); updateHbaseEnvConfig(); updateFlumeEnvConfig(); updateHadoopEnv(); updateKafkaConfigs(); updateRangerEnvConfig(); updateRangerUgsyncSiteConfig(); updateZookeeperLog4j(); updateHiveConfig(); updateAccumuloConfigs(); updateKerberosDescriptorArtifacts(); updateKnoxTopology(); } @Inject  UpgradeCatalog220(Injector injector); @Override String getTargetVersion(); @Override String getSourceVersion(); @Transactional void bootstrapRepoVersionForHDP21(); }
UpgradeCatalog220 extends AbstractUpgradeCatalog { @Override protected void executeDMLUpdates() throws AmbariException, SQLException { addNewConfigurationsFromXml(); updateAlertDefinitions(); updateStormConfigs(); updateAMSConfigs(); updateHDFSConfigs(); updateHbaseEnvConfig(); updateFlumeEnvConfig(); updateHadoopEnv(); updateKafkaConfigs(); updateRangerEnvConfig(); updateRangerUgsyncSiteConfig(); updateZookeeperLog4j(); updateHiveConfig(); updateAccumuloConfigs(); updateKerberosDescriptorArtifacts(); updateKnoxTopology(); } @Inject  UpgradeCatalog220(Injector injector); @Override String getTargetVersion(); @Override String getSourceVersion(); @Transactional void bootstrapRepoVersionForHDP21(); static final String UPGRADE_PACKAGE_COL; static final String UPGRADE_TYPE_COL; static final String REPO_VERSION_TABLE; }