Source:
private synchronized Map<String, ImportConfiguration> loadNewConfigAndBundles(CatalogContext catalogContext) { Map<String, ImportConfiguration> newProcessorConfig; ImportType importElement = catalogContext.getDeployment().getImport(); if (importElement == null || importElement.getConfiguration().isEmpty()) { newProcessorConfig = new HashMap<>(); } else { newProcessorConfig = CatalogUtil.getImportProcessorConfig(importElement); } Iterator<Map.Entry<String, ImportConfiguration>> iter = newProcessorConfig.entrySet().iterator(); while (iter.hasNext()) { String configName = iter.next().getKey(); ImportConfiguration importConfig = newProcessorConfig.get(configName); Properties properties = importConfig.getmoduleProperties(); String importBundleJar = properties.getProperty(ImportDataProcessor.IMPORT_MODULE); Preconditions.checkNotNull(importBundleJar, "Import source is undefined or custom import plugin class missing."); String procedure = properties.getProperty(ImportDataProcessor.IMPORT_PROCEDURE); assert procedure != null; Procedure catProc = catalogContext.procedures.get(procedure); if (catProc == null) { catProc = catalogContext.m_defaultProcs.checkForDefaultProcedure(procedure); } if (catProc == null) { importLog.info("Importer " + configName + " Procedure " + procedure + " is missing will disable this importer until the procedure becomes available."); iter.remove(); continue; } boolean bundlePresent = loadImporterBundle(properties); if (!bundlePresent) { iter.remove(); } } setupFormatterFactoryForConfig(newProcessorConfig); return newProcessorConfig; }

Target:
private synchronized Map<String, ImportConfiguration> loadNewConfigAndBundles(CatalogContext catalogContext) { Map<String, ImportConfiguration> newProcessorConfig; ImportType importElement = catalogContext.getDeployment().getImport(); if (importElement == null || importElement.getConfiguration().isEmpty()) { newProcessorConfig = new HashMap<>(); } else { newProcessorConfig = CatalogUtil.getImportProcessorConfig(importElement); } Iterator<Map.Entry<String, ImportConfiguration>> iter = newProcessorConfig.entrySet().iterator(); while (iter.hasNext()) { String configName = iter.next().getKey(); ImportConfiguration importConfig = newProcessorConfig.get(configName); Properties properties = importConfig.getmoduleProperties(); String importBundleJar = properties.getProperty(ImportDataProcessor.IMPORT_MODULE); Preconditions.checkNotNull(importBundleJar, "Import source is undefined or custom import plugin class missing."); String procedure = properties.getProperty(ImportDataProcessor.IMPORT_PROCEDURE); assert procedure != null; Procedure catProc = catalogContext.procedures.get(procedure); if (catProc == null) { catProc = catalogContext.m_defaultProcs.checkForDefaultProcedure(procedure); } if (catProc == null) { importLog.info("Importer " + configName + " Procedure " + procedure + " is missing will disable this importer until the procedure becomes available."); iter.remove(); continue; } boolean bundlePresent = loadImporterBundle(properties); if (!bundlePresent) { iter.remove(); } } m_formatterFactories.clear(); for (ImportConfiguration config : newProcessorConfig.values()) { Properties prop = config.getformatterProperties(); String module = prop.getProperty(ImportDataProcessor.IMPORT_FORMATTER); try { AbstractFormatterFactory formatterFactory = m_formatterFactories.get(module); if (formatterFactory == null) { URI moduleURI = URI.create(module); formatterFactory = m_moduleManager.getService(moduleURI, AbstractFormatterFactory.class); if (formatterFactory == null) { VoltDB.crashLocalVoltDB("Failed to initialize formatter from: " + module); } m_formatterFactories.put(module, formatterFactory); } config.setFormatterFactory(formatterFactory); } catch(Throwable t) { VoltDB.crashLocalVoltDB("Failed to configure import handler for " + module); } } return newProcessorConfig; }