use of org.talend.core.runtime.dynamic.IDynamicPluginConfiguration in project tbd-studio-se by Talend.
the class DynamicCDPSparkStreamingModuleGroupTemplate method getNodeModuleGroups.
@Override
public Map<NodeComponentTypeBean, Set<DistributionModuleGroup>> getNodeModuleGroups() throws Exception {
Map<NodeComponentTypeBean, Set<DistributionModuleGroup>> nodeModuleGroups = super.getNodeModuleGroups();
DynamicPluginAdapter pluginAdapter = getPluginAdapter();
IDynamicPluginConfiguration configuration = pluginAdapter.getPluginConfiguration();
String distribution = ICDPDistribution.DISTRIBUTION_NAME;
String version = configuration.getId();
buildNodeModuleGroups4SparkStreaming(pluginAdapter, nodeModuleGroups, distribution, version);
return nodeModuleGroups;
}
use of org.talend.core.runtime.dynamic.IDynamicPluginConfiguration in project tbd-studio-se by Talend.
the class AbstractDynamicDistributionTemplate method registPluginExtensions.
@Override
public boolean registPluginExtensions() {
if (registedPluginAdapter == null) {
synchronized (registedPluginAdapterLock) {
if (registedPluginAdapter == null) {
DynamicPluginAdapter plugAdapter = getPluginAdapter();
IDynamicPlugin plugin = plugAdapter.getPlugin();
IDynamicPluginConfiguration pConfiguration = plugin.getPluginConfiguration();
try {
plugin.setPluginConfiguration(null);
DynamicServiceUtil.addContribution(plugAdapter.getBundle(), plugin);
registedPluginAdapter = plugAdapter;
ILibrariesService libService = ILibrariesService.get();
if (libService != null) {
libService.resetModulesNeeded();
}
HadoopDistributionsHelper.updatePluginExtensionCacheVersion();
return true;
} catch (Exception e) {
ExceptionHandler.process(e);
} finally {
plugin.setPluginConfiguration(pConfiguration);
}
}
}
}
return false;
}
use of org.talend.core.runtime.dynamic.IDynamicPluginConfiguration in project tbd-studio-se by Talend.
the class DynamicHDFSModuleGroupTemplate method getNodeModuleGroups.
@Override
public Map<NodeComponentTypeBean, Set<DistributionModuleGroup>> getNodeModuleGroups() throws Exception {
Map<NodeComponentTypeBean, Set<DistributionModuleGroup>> nodeModuleGroups = super.getNodeModuleGroups();
DynamicPluginAdapter pluginAdapter = getPluginAdapter();
IDynamicPluginConfiguration configuration = pluginAdapter.getPluginConfiguration();
String distribution = configuration.getDistribution();
String version = configuration.getId();
buildNodeModuleGroups4HDFS(pluginAdapter, nodeModuleGroups, distribution, version);
return nodeModuleGroups;
}
use of org.talend.core.runtime.dynamic.IDynamicPluginConfiguration in project tbd-studio-se by Talend.
the class DynamicDistribConfigAdapter method adapt.
public IDynamicPluginConfiguration adapt(IDynamicMonitor monitor) throws Exception {
DynamicDistributionUtils.checkCancelOrNot(monitor);
resolve();
IDynamicPluginConfiguration pluginConfiguration = DynamicFactory.getInstance().createDynamicPluginConfiguration();
TemplateBean templateBean = getTemplateBean();
DynamicConfiguration configuration = getConfiguration();
String distribution = templateBean.getDistribution();
String templateId = templateBean.getTemplateId();
if (!StringUtils.equals(distribution, configuration.getDistribution())) {
throw new Exception(// $NON-NLS-1$
Messages.getString("DynamicDistriConfigAdapter.diffDistri", distribution, configuration.getDistribution()));
}
String projectTechnicalName = ProjectManager.getInstance().getCurrentProject().getTechnicalLabel();
// String id = projectTechnicalName + "_" + configuration.getId(); //$NON-NLS-1$
String id = configuration.getId();
pluginConfiguration.setId(id);
pluginConfiguration.setName(configuration.getName());
pluginConfiguration.setVersion(configuration.getVersion());
pluginConfiguration.setDescription(configuration.getDescription());
pluginConfiguration.setDistribution(distribution);
pluginConfiguration.setTemplateId(templateId);
pluginConfiguration.setRepository(configuration.getRemoteRepositoryUrl());
pluginConfiguration.setAttribute(DynamicConstants.ATTR_PROJECT_TECHNICAL_NAME, projectTechnicalName);
pluginConfiguration.setAttribute(DynamicConstants.ATTR_SELECTED_SPARK_VERSIONS, DynamicDistributionUtils.convert2SparkVersions(configuration.getSelectedSparkVersions()));
return pluginConfiguration;
}
use of org.talend.core.runtime.dynamic.IDynamicPluginConfiguration in project tbd-studio-se by Talend.
the class DynamicCDPSparkBatchModuleGroupTemplate method getNodeModuleGroups.
@Override
public Map<NodeComponentTypeBean, Set<DistributionModuleGroup>> getNodeModuleGroups() throws Exception {
Map<NodeComponentTypeBean, Set<DistributionModuleGroup>> nodeModuleGroups = super.getNodeModuleGroups();
DynamicPluginAdapter pluginAdapter = getPluginAdapter();
IDynamicPluginConfiguration configuration = pluginAdapter.getPluginConfiguration();
String distribution = ICDPDistribution.DISTRIBUTION_NAME;
String version = configuration.getId();
buildNodeModuleGroups4SparkBatch(pluginAdapter, nodeModuleGroups, distribution, version);
buildNodeModuleGroups4SparkStreaming(pluginAdapter, nodeModuleGroups, distribution, version);
return nodeModuleGroups;
}
Aggregations