@Test public void testInit() throws AtlasException { File file = Paths.get( "src" + File.separator + "test" + File.separator + "resources" + File.separator + "atlasmapping.json") .toFile(); DefaultAtlasContext ctx = new DefaultAtlasContext(DefaultAtlasContextFactory.getInstance(), file.toURI()); ctx.init(); DataSource dataSource = new DataSource(); dataSource.setUri("URI"); mapping.getDataSource().add(dataSource); dataSource = new DataSource(); dataSource.setUri(null); mapping.getDataSource().add(dataSource); dataSource = new DataSource(); dataSource.setUri("java:source"); dataSource.setDataSourceType(DataSourceType.SOURCE); dataSource.setId("io.atlasmap.core.DefaultAtlasContext.constants.docId"); mapping.getDataSource().add(dataSource); dataSource = new DataSource(); dataSource.setUri("java:target"); dataSource.setDataSourceType(DataSourceType.TARGET); dataSource.setId("io.atlasmap.core.DefaultAtlasContext.constants.docId"); mapping.getDataSource().add(dataSource); dataSource = new DataSource(); dataSource.setUri("java:target"); dataSource.setDataSourceType(DataSourceType.TARGET); dataSource.setId("io.atlasmap.core.DefaultAtlasContext.constants.docId"); mapping.getDataSource().add(dataSource); ctx = new DefaultAtlasContext(DefaultAtlasContextFactory.getInstance(), mapping); ctx.getTargetModules().put("io.atlasmap.core.DefaultAtlasContext.constants.docId", new ConstantModule()); ctx.init(); @SuppressWarnings("unchecked") Map<String, AtlasModule> targetModules = spy(Map.class); when(targetModules.put(any(String.class), any(AtlasModule.class))) .thenThrow(new RuntimeException("mockException")); ctx.setTargetModules(targetModules); ctx.init(); }
protected synchronized void init() throws AtlasException { if (this.initialized) { return; } registerJmx(this); if (this.atlasMappingUri != null) { this.admHandler = new ADMArchiveHandler(factory.getClassLoader()); this.admHandler.setIgnoreLibrary(true); this.admHandler.load(Paths.get(this.atlasMappingUri)); this.dataSourceMetadataMap = this.admHandler.getDataSourceMetadataMap(); } if (this.admHandler == null || this.admHandler.getMappingDefinition() == null) { LOG.warn("AtlasMap context cannot initialize without mapping definition, ignoring:" + " Mapping URI={}" , this.atlasMappingUri); return; } sourceModules.clear(); ConstantModule constant = new ConstantModule(); constant.setConversionService(factory.getConversionService()); constant.setFieldActionService(factory.getFieldActionService()); sourceModules.put(CONSTANTS_DOCUMENT_ID, constant); PropertyModule property = new PropertyModule(factory.getPropertyStrategy()); property.setConversionService(factory.getConversionService()); property.setFieldActionService(factory.getFieldActionService()); property.setMode(AtlasModuleMode.SOURCE); sourceModules.put(PROPERTIES_DOCUMENT_ID, property); targetModules.clear(); property = new PropertyModule(factory.getPropertyStrategy()); property.setConversionService(factory.getConversionService()); property.setFieldActionService(factory.getFieldActionService()); property.setMode(AtlasModuleMode.TARGET); targetModules.put(PROPERTIES_DOCUMENT_ID, property); lookupTables.clear(); if (admHandler.getMappingDefinition().getLookupTables() != null && admHandler.getMappingDefinition().getLookupTables().getLookupTable() != null) { for (LookupTable table : admHandler.getMappingDefinition().getLookupTables().getLookupTable()) { lookupTables.put(table.getName(), table); } } AtlasModuleInfoRegistry moduleInfoRegistry = factory.getModuleInfoRegistry(); for (DataSource ds : admHandler.getMappingDefinition().getDataSource()) { AtlasModuleInfo moduleInfo = moduleInfoRegistry.lookupByUri(ds.getUri()); if (moduleInfo == null) { LOG.error("Cannot find module info for the DataSource uri '{}'", ds.getUri()); continue; } if (ds.getDataSourceType() != DataSourceType.SOURCE && ds.getDataSourceType() != DataSourceType.TARGET) { LOG.error("Unsupported DataSource type '{}'", ds.getDataSourceType()); continue; } String docId = ds.getId(); if (docId == null || docId.isEmpty()) { docId = ds.getDataSourceType() == DataSourceType.SOURCE ? AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID : AtlasConstants.DEFAULT_TARGET_DOCUMENT_ID; } if (ds.getDataSourceType() == DataSourceType.SOURCE && sourceModules.containsKey(docId)) { LOG.error("Duplicated {} DataSource ID '{}' was detected, ignoring...", ds.getDataSourceType(), ds.getId()); continue; } if (ds.getDataSourceType() == DataSourceType.TARGET && targetModules.containsKey(docId)) { LOG.error("Duplicated {} DataSource ID '{}' was detected, ignoring...", ds.getDataSourceType(), docId); continue; } try { AtlasModule module = moduleInfo.getModuleClass().newInstance(); module.setClassLoader(factory.getClassLoader()); module.setConversionService(factory.getConversionService()); module.setFieldActionService(factory.getFieldActionService()); module.setUri(ds.getUri()); if (ds.getDataSourceType() == DataSourceType.SOURCE) { module.setMode(AtlasModuleMode.SOURCE); getSourceModules().put(docId, module); } else if (ds.getDataSourceType() == DataSourceType.TARGET) { module.setMode(AtlasModuleMode.TARGET); getTargetModules().put(docId, module); } module.setDocId(docId); if (this.dataSourceMetadataMap != null) { DataSourceKey dskey = new DataSourceKey(ds.getDataSourceType() == DataSourceType.SOURCE, docId); DataSourceMetadata meta = this.dataSourceMetadataMap.get(dskey); if (meta != null) { module.setDataSourceMetadata(meta); } } module.init(); } catch (Exception t) { LOG.error("Unable to initialize {} module: {}", ds.getDataSourceType(), moduleInfo); LOG.error(t.getMessage(), t); throw new AtlasException(String.format("Unable to initialize %s module: %s", ds.getDataSourceType(), moduleInfo.toString()), t); } } initialized = true; }
DefaultAtlasContext implements AtlasContext, AtlasContextMXBean { protected synchronized void init() throws AtlasException { if (this.initialized) { return; } registerJmx(this); if (this.atlasMappingUri != null) { this.admHandler = new ADMArchiveHandler(factory.getClassLoader()); this.admHandler.setIgnoreLibrary(true); this.admHandler.load(Paths.get(this.atlasMappingUri)); this.dataSourceMetadataMap = this.admHandler.getDataSourceMetadataMap(); } if (this.admHandler == null || this.admHandler.getMappingDefinition() == null) { LOG.warn("AtlasMap context cannot initialize without mapping definition, ignoring:" + " Mapping URI={}" , this.atlasMappingUri); return; } sourceModules.clear(); ConstantModule constant = new ConstantModule(); constant.setConversionService(factory.getConversionService()); constant.setFieldActionService(factory.getFieldActionService()); sourceModules.put(CONSTANTS_DOCUMENT_ID, constant); PropertyModule property = new PropertyModule(factory.getPropertyStrategy()); property.setConversionService(factory.getConversionService()); property.setFieldActionService(factory.getFieldActionService()); property.setMode(AtlasModuleMode.SOURCE); sourceModules.put(PROPERTIES_DOCUMENT_ID, property); targetModules.clear(); property = new PropertyModule(factory.getPropertyStrategy()); property.setConversionService(factory.getConversionService()); property.setFieldActionService(factory.getFieldActionService()); property.setMode(AtlasModuleMode.TARGET); targetModules.put(PROPERTIES_DOCUMENT_ID, property); lookupTables.clear(); if (admHandler.getMappingDefinition().getLookupTables() != null && admHandler.getMappingDefinition().getLookupTables().getLookupTable() != null) { for (LookupTable table : admHandler.getMappingDefinition().getLookupTables().getLookupTable()) { lookupTables.put(table.getName(), table); } } AtlasModuleInfoRegistry moduleInfoRegistry = factory.getModuleInfoRegistry(); for (DataSource ds : admHandler.getMappingDefinition().getDataSource()) { AtlasModuleInfo moduleInfo = moduleInfoRegistry.lookupByUri(ds.getUri()); if (moduleInfo == null) { LOG.error("Cannot find module info for the DataSource uri '{}'", ds.getUri()); continue; } if (ds.getDataSourceType() != DataSourceType.SOURCE && ds.getDataSourceType() != DataSourceType.TARGET) { LOG.error("Unsupported DataSource type '{}'", ds.getDataSourceType()); continue; } String docId = ds.getId(); if (docId == null || docId.isEmpty()) { docId = ds.getDataSourceType() == DataSourceType.SOURCE ? AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID : AtlasConstants.DEFAULT_TARGET_DOCUMENT_ID; } if (ds.getDataSourceType() == DataSourceType.SOURCE && sourceModules.containsKey(docId)) { LOG.error("Duplicated {} DataSource ID '{}' was detected, ignoring...", ds.getDataSourceType(), ds.getId()); continue; } if (ds.getDataSourceType() == DataSourceType.TARGET && targetModules.containsKey(docId)) { LOG.error("Duplicated {} DataSource ID '{}' was detected, ignoring...", ds.getDataSourceType(), docId); continue; } try { AtlasModule module = moduleInfo.getModuleClass().newInstance(); module.setClassLoader(factory.getClassLoader()); module.setConversionService(factory.getConversionService()); module.setFieldActionService(factory.getFieldActionService()); module.setUri(ds.getUri()); if (ds.getDataSourceType() == DataSourceType.SOURCE) { module.setMode(AtlasModuleMode.SOURCE); getSourceModules().put(docId, module); } else if (ds.getDataSourceType() == DataSourceType.TARGET) { module.setMode(AtlasModuleMode.TARGET); getTargetModules().put(docId, module); } module.setDocId(docId); if (this.dataSourceMetadataMap != null) { DataSourceKey dskey = new DataSourceKey(ds.getDataSourceType() == DataSourceType.SOURCE, docId); DataSourceMetadata meta = this.dataSourceMetadataMap.get(dskey); if (meta != null) { module.setDataSourceMetadata(meta); } } module.init(); } catch (Exception t) { LOG.error("Unable to initialize {} module: {}", ds.getDataSourceType(), moduleInfo); LOG.error(t.getMessage(), t); throw new AtlasException(String.format("Unable to initialize %s module: %s", ds.getDataSourceType(), moduleInfo.toString()), t); } } initialized = true; } }
DefaultAtlasContext implements AtlasContext, AtlasContextMXBean { protected synchronized void init() throws AtlasException { if (this.initialized) { return; } registerJmx(this); if (this.atlasMappingUri != null) { this.admHandler = new ADMArchiveHandler(factory.getClassLoader()); this.admHandler.setIgnoreLibrary(true); this.admHandler.load(Paths.get(this.atlasMappingUri)); this.dataSourceMetadataMap = this.admHandler.getDataSourceMetadataMap(); } if (this.admHandler == null || this.admHandler.getMappingDefinition() == null) { LOG.warn("AtlasMap context cannot initialize without mapping definition, ignoring:" + " Mapping URI={}" , this.atlasMappingUri); return; } sourceModules.clear(); ConstantModule constant = new ConstantModule(); constant.setConversionService(factory.getConversionService()); constant.setFieldActionService(factory.getFieldActionService()); sourceModules.put(CONSTANTS_DOCUMENT_ID, constant); PropertyModule property = new PropertyModule(factory.getPropertyStrategy()); property.setConversionService(factory.getConversionService()); property.setFieldActionService(factory.getFieldActionService()); property.setMode(AtlasModuleMode.SOURCE); sourceModules.put(PROPERTIES_DOCUMENT_ID, property); targetModules.clear(); property = new PropertyModule(factory.getPropertyStrategy()); property.setConversionService(factory.getConversionService()); property.setFieldActionService(factory.getFieldActionService()); property.setMode(AtlasModuleMode.TARGET); targetModules.put(PROPERTIES_DOCUMENT_ID, property); lookupTables.clear(); if (admHandler.getMappingDefinition().getLookupTables() != null && admHandler.getMappingDefinition().getLookupTables().getLookupTable() != null) { for (LookupTable table : admHandler.getMappingDefinition().getLookupTables().getLookupTable()) { lookupTables.put(table.getName(), table); } } AtlasModuleInfoRegistry moduleInfoRegistry = factory.getModuleInfoRegistry(); for (DataSource ds : admHandler.getMappingDefinition().getDataSource()) { AtlasModuleInfo moduleInfo = moduleInfoRegistry.lookupByUri(ds.getUri()); if (moduleInfo == null) { LOG.error("Cannot find module info for the DataSource uri '{}'", ds.getUri()); continue; } if (ds.getDataSourceType() != DataSourceType.SOURCE && ds.getDataSourceType() != DataSourceType.TARGET) { LOG.error("Unsupported DataSource type '{}'", ds.getDataSourceType()); continue; } String docId = ds.getId(); if (docId == null || docId.isEmpty()) { docId = ds.getDataSourceType() == DataSourceType.SOURCE ? AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID : AtlasConstants.DEFAULT_TARGET_DOCUMENT_ID; } if (ds.getDataSourceType() == DataSourceType.SOURCE && sourceModules.containsKey(docId)) { LOG.error("Duplicated {} DataSource ID '{}' was detected, ignoring...", ds.getDataSourceType(), ds.getId()); continue; } if (ds.getDataSourceType() == DataSourceType.TARGET && targetModules.containsKey(docId)) { LOG.error("Duplicated {} DataSource ID '{}' was detected, ignoring...", ds.getDataSourceType(), docId); continue; } try { AtlasModule module = moduleInfo.getModuleClass().newInstance(); module.setClassLoader(factory.getClassLoader()); module.setConversionService(factory.getConversionService()); module.setFieldActionService(factory.getFieldActionService()); module.setUri(ds.getUri()); if (ds.getDataSourceType() == DataSourceType.SOURCE) { module.setMode(AtlasModuleMode.SOURCE); getSourceModules().put(docId, module); } else if (ds.getDataSourceType() == DataSourceType.TARGET) { module.setMode(AtlasModuleMode.TARGET); getTargetModules().put(docId, module); } module.setDocId(docId); if (this.dataSourceMetadataMap != null) { DataSourceKey dskey = new DataSourceKey(ds.getDataSourceType() == DataSourceType.SOURCE, docId); DataSourceMetadata meta = this.dataSourceMetadataMap.get(dskey); if (meta != null) { module.setDataSourceMetadata(meta); } } module.init(); } catch (Exception t) { LOG.error("Unable to initialize {} module: {}", ds.getDataSourceType(), moduleInfo); LOG.error(t.getMessage(), t); throw new AtlasException(String.format("Unable to initialize %s module: %s", ds.getDataSourceType(), moduleInfo.toString()), t); } } initialized = true; } DefaultAtlasContext(URI atlasMappingUri);  DefaultAtlasContext(DefaultAtlasContextFactory factory, URI atlasMappingUri);  DefaultAtlasContext(DefaultAtlasContextFactory factory, AtlasMapping mapping);  DefaultAtlasContext(DefaultAtlasContextFactory factory,
            AtlasContextFactory.Format format, InputStream stream); }
DefaultAtlasContext implements AtlasContext, AtlasContextMXBean { protected synchronized void init() throws AtlasException { if (this.initialized) { return; } registerJmx(this); if (this.atlasMappingUri != null) { this.admHandler = new ADMArchiveHandler(factory.getClassLoader()); this.admHandler.setIgnoreLibrary(true); this.admHandler.load(Paths.get(this.atlasMappingUri)); this.dataSourceMetadataMap = this.admHandler.getDataSourceMetadataMap(); } if (this.admHandler == null || this.admHandler.getMappingDefinition() == null) { LOG.warn("AtlasMap context cannot initialize without mapping definition, ignoring:" + " Mapping URI={}" , this.atlasMappingUri); return; } sourceModules.clear(); ConstantModule constant = new ConstantModule(); constant.setConversionService(factory.getConversionService()); constant.setFieldActionService(factory.getFieldActionService()); sourceModules.put(CONSTANTS_DOCUMENT_ID, constant); PropertyModule property = new PropertyModule(factory.getPropertyStrategy()); property.setConversionService(factory.getConversionService()); property.setFieldActionService(factory.getFieldActionService()); property.setMode(AtlasModuleMode.SOURCE); sourceModules.put(PROPERTIES_DOCUMENT_ID, property); targetModules.clear(); property = new PropertyModule(factory.getPropertyStrategy()); property.setConversionService(factory.getConversionService()); property.setFieldActionService(factory.getFieldActionService()); property.setMode(AtlasModuleMode.TARGET); targetModules.put(PROPERTIES_DOCUMENT_ID, property); lookupTables.clear(); if (admHandler.getMappingDefinition().getLookupTables() != null && admHandler.getMappingDefinition().getLookupTables().getLookupTable() != null) { for (LookupTable table : admHandler.getMappingDefinition().getLookupTables().getLookupTable()) { lookupTables.put(table.getName(), table); } } AtlasModuleInfoRegistry moduleInfoRegistry = factory.getModuleInfoRegistry(); for (DataSource ds : admHandler.getMappingDefinition().getDataSource()) { AtlasModuleInfo moduleInfo = moduleInfoRegistry.lookupByUri(ds.getUri()); if (moduleInfo == null) { LOG.error("Cannot find module info for the DataSource uri '{}'", ds.getUri()); continue; } if (ds.getDataSourceType() != DataSourceType.SOURCE && ds.getDataSourceType() != DataSourceType.TARGET) { LOG.error("Unsupported DataSource type '{}'", ds.getDataSourceType()); continue; } String docId = ds.getId(); if (docId == null || docId.isEmpty()) { docId = ds.getDataSourceType() == DataSourceType.SOURCE ? AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID : AtlasConstants.DEFAULT_TARGET_DOCUMENT_ID; } if (ds.getDataSourceType() == DataSourceType.SOURCE && sourceModules.containsKey(docId)) { LOG.error("Duplicated {} DataSource ID '{}' was detected, ignoring...", ds.getDataSourceType(), ds.getId()); continue; } if (ds.getDataSourceType() == DataSourceType.TARGET && targetModules.containsKey(docId)) { LOG.error("Duplicated {} DataSource ID '{}' was detected, ignoring...", ds.getDataSourceType(), docId); continue; } try { AtlasModule module = moduleInfo.getModuleClass().newInstance(); module.setClassLoader(factory.getClassLoader()); module.setConversionService(factory.getConversionService()); module.setFieldActionService(factory.getFieldActionService()); module.setUri(ds.getUri()); if (ds.getDataSourceType() == DataSourceType.SOURCE) { module.setMode(AtlasModuleMode.SOURCE); getSourceModules().put(docId, module); } else if (ds.getDataSourceType() == DataSourceType.TARGET) { module.setMode(AtlasModuleMode.TARGET); getTargetModules().put(docId, module); } module.setDocId(docId); if (this.dataSourceMetadataMap != null) { DataSourceKey dskey = new DataSourceKey(ds.getDataSourceType() == DataSourceType.SOURCE, docId); DataSourceMetadata meta = this.dataSourceMetadataMap.get(dskey); if (meta != null) { module.setDataSourceMetadata(meta); } } module.init(); } catch (Exception t) { LOG.error("Unable to initialize {} module: {}", ds.getDataSourceType(), moduleInfo); LOG.error(t.getMessage(), t); throw new AtlasException(String.format("Unable to initialize %s module: %s", ds.getDataSourceType(), moduleInfo.toString()), t); } } initialized = true; } DefaultAtlasContext(URI atlasMappingUri);  DefaultAtlasContext(DefaultAtlasContextFactory factory, URI atlasMappingUri);  DefaultAtlasContext(DefaultAtlasContextFactory factory, AtlasMapping mapping);  DefaultAtlasContext(DefaultAtlasContextFactory factory,
            AtlasContextFactory.Format format, InputStream stream); @Override Audits processPreview(Mapping mapping); @Override void process(AtlasSession userSession); @Override void processValidation(AtlasSession userSession); @Override AtlasContextFactory getContextFactory(); AtlasMapping getMapping(); @Override AtlasSession createSession(); AtlasSession createSession(AtlasMapping mappingDefinition); Map<String, AtlasModule> getSourceModules(); void setSourceModules(Map<String, AtlasModule> sourceModules); Map<String, AtlasModule> getTargetModules(); void setTargetModules(Map<String, AtlasModule> targetModules); Map<String, LookupTable> getLookupTables(); void setLookupTables(Map<String, LookupTable> lookupTables); ObjectName getJmxObjectName(); @Override String getUuid(); @Override String getVersion(); @Override String getMappingName(); @Override String getMappingUri(); @Override String getClassName(); @Override String getThreadName(); @Override String toString(); ADMArchiveHandler getADMArchiveHandler(); }
DefaultAtlasContext implements AtlasContext, AtlasContextMXBean { protected synchronized void init() throws AtlasException { if (this.initialized) { return; } registerJmx(this); if (this.atlasMappingUri != null) { this.admHandler = new ADMArchiveHandler(factory.getClassLoader()); this.admHandler.setIgnoreLibrary(true); this.admHandler.load(Paths.get(this.atlasMappingUri)); this.dataSourceMetadataMap = this.admHandler.getDataSourceMetadataMap(); } if (this.admHandler == null || this.admHandler.getMappingDefinition() == null) { LOG.warn("AtlasMap context cannot initialize without mapping definition, ignoring:" + " Mapping URI={}" , this.atlasMappingUri); return; } sourceModules.clear(); ConstantModule constant = new ConstantModule(); constant.setConversionService(factory.getConversionService()); constant.setFieldActionService(factory.getFieldActionService()); sourceModules.put(CONSTANTS_DOCUMENT_ID, constant); PropertyModule property = new PropertyModule(factory.getPropertyStrategy()); property.setConversionService(factory.getConversionService()); property.setFieldActionService(factory.getFieldActionService()); property.setMode(AtlasModuleMode.SOURCE); sourceModules.put(PROPERTIES_DOCUMENT_ID, property); targetModules.clear(); property = new PropertyModule(factory.getPropertyStrategy()); property.setConversionService(factory.getConversionService()); property.setFieldActionService(factory.getFieldActionService()); property.setMode(AtlasModuleMode.TARGET); targetModules.put(PROPERTIES_DOCUMENT_ID, property); lookupTables.clear(); if (admHandler.getMappingDefinition().getLookupTables() != null && admHandler.getMappingDefinition().getLookupTables().getLookupTable() != null) { for (LookupTable table : admHandler.getMappingDefinition().getLookupTables().getLookupTable()) { lookupTables.put(table.getName(), table); } } AtlasModuleInfoRegistry moduleInfoRegistry = factory.getModuleInfoRegistry(); for (DataSource ds : admHandler.getMappingDefinition().getDataSource()) { AtlasModuleInfo moduleInfo = moduleInfoRegistry.lookupByUri(ds.getUri()); if (moduleInfo == null) { LOG.error("Cannot find module info for the DataSource uri '{}'", ds.getUri()); continue; } if (ds.getDataSourceType() != DataSourceType.SOURCE && ds.getDataSourceType() != DataSourceType.TARGET) { LOG.error("Unsupported DataSource type '{}'", ds.getDataSourceType()); continue; } String docId = ds.getId(); if (docId == null || docId.isEmpty()) { docId = ds.getDataSourceType() == DataSourceType.SOURCE ? AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID : AtlasConstants.DEFAULT_TARGET_DOCUMENT_ID; } if (ds.getDataSourceType() == DataSourceType.SOURCE && sourceModules.containsKey(docId)) { LOG.error("Duplicated {} DataSource ID '{}' was detected, ignoring...", ds.getDataSourceType(), ds.getId()); continue; } if (ds.getDataSourceType() == DataSourceType.TARGET && targetModules.containsKey(docId)) { LOG.error("Duplicated {} DataSource ID '{}' was detected, ignoring...", ds.getDataSourceType(), docId); continue; } try { AtlasModule module = moduleInfo.getModuleClass().newInstance(); module.setClassLoader(factory.getClassLoader()); module.setConversionService(factory.getConversionService()); module.setFieldActionService(factory.getFieldActionService()); module.setUri(ds.getUri()); if (ds.getDataSourceType() == DataSourceType.SOURCE) { module.setMode(AtlasModuleMode.SOURCE); getSourceModules().put(docId, module); } else if (ds.getDataSourceType() == DataSourceType.TARGET) { module.setMode(AtlasModuleMode.TARGET); getTargetModules().put(docId, module); } module.setDocId(docId); if (this.dataSourceMetadataMap != null) { DataSourceKey dskey = new DataSourceKey(ds.getDataSourceType() == DataSourceType.SOURCE, docId); DataSourceMetadata meta = this.dataSourceMetadataMap.get(dskey); if (meta != null) { module.setDataSourceMetadata(meta); } } module.init(); } catch (Exception t) { LOG.error("Unable to initialize {} module: {}", ds.getDataSourceType(), moduleInfo); LOG.error(t.getMessage(), t); throw new AtlasException(String.format("Unable to initialize %s module: %s", ds.getDataSourceType(), moduleInfo.toString()), t); } } initialized = true; } DefaultAtlasContext(URI atlasMappingUri);  DefaultAtlasContext(DefaultAtlasContextFactory factory, URI atlasMappingUri);  DefaultAtlasContext(DefaultAtlasContextFactory factory, AtlasMapping mapping);  DefaultAtlasContext(DefaultAtlasContextFactory factory,
            AtlasContextFactory.Format format, InputStream stream); @Override Audits processPreview(Mapping mapping); @Override void process(AtlasSession userSession); @Override void processValidation(AtlasSession userSession); @Override AtlasContextFactory getContextFactory(); AtlasMapping getMapping(); @Override AtlasSession createSession(); AtlasSession createSession(AtlasMapping mappingDefinition); Map<String, AtlasModule> getSourceModules(); void setSourceModules(Map<String, AtlasModule> sourceModules); Map<String, AtlasModule> getTargetModules(); void setTargetModules(Map<String, AtlasModule> targetModules); Map<String, LookupTable> getLookupTables(); void setLookupTables(Map<String, LookupTable> lookupTables); ObjectName getJmxObjectName(); @Override String getUuid(); @Override String getVersion(); @Override String getMappingName(); @Override String getMappingUri(); @Override String getClassName(); @Override String getThreadName(); @Override String toString(); ADMArchiveHandler getADMArchiveHandler(); static final String CONSTANTS_DOCUMENT_ID; static final String PROPERTIES_DOCUMENT_ID; }