Search in sources :

Example 26 with IDynamicPluginConfiguration

use of org.talend.core.runtime.dynamic.IDynamicPluginConfiguration in project tbd-studio-se by Talend.

the class DynamicMapReduceModuleGroupTemplate 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();
    buildNodeModuleGroups4MapReduce(pluginAdapter, nodeModuleGroups, distribution, version);
    return nodeModuleGroups;
}
Also used : Set(java.util.Set) DynamicPluginAdapter(org.talend.hadoop.distribution.dynamic.adapter.DynamicPluginAdapter) NodeComponentTypeBean(org.talend.hadoop.distribution.NodeComponentTypeBean) IDynamicPluginConfiguration(org.talend.core.runtime.dynamic.IDynamicPluginConfiguration)

Example 27 with IDynamicPluginConfiguration

use of org.talend.core.runtime.dynamic.IDynamicPluginConfiguration in project tbd-studio-se by Talend.

the class DynamicSparkStreamingModuleGroupTemplate 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();
    buildNodeModuleGroups4SparkStreaming(pluginAdapter, nodeModuleGroups, distribution, version);
    return nodeModuleGroups;
}
Also used : Set(java.util.Set) DynamicPluginAdapter(org.talend.hadoop.distribution.dynamic.adapter.DynamicPluginAdapter) NodeComponentTypeBean(org.talend.hadoop.distribution.NodeComponentTypeBean) IDynamicPluginConfiguration(org.talend.core.runtime.dynamic.IDynamicPluginConfiguration)

Example 28 with IDynamicPluginConfiguration

use of org.talend.core.runtime.dynamic.IDynamicPluginConfiguration in project tbd-studio-se by Talend.

the class AbstractDynamicDistributionTemplate method getSparkVersions.

@Override
public Set<ESparkVersion> getSparkVersions() {
    Set<ESparkVersion> version = new HashSet<>();
    IDynamicPluginConfiguration pluginConfiguration = pluginAdapter.getPluginConfiguration();
    List<String> selectedSparkVersions = (List<String>) pluginConfiguration.getAttribute(DynamicConstants.ATTR_SELECTED_SPARK_VERSIONS);
    if (selectedSparkVersions != null) {
        List<ESparkVersion> sparkVersions = DynamicDistributionUtils.convert2ESparkVersions(selectedSparkVersions);
        version.addAll(sparkVersions);
    }
    return version;
}
Also used : ESparkVersion(org.talend.hadoop.distribution.ESparkVersion) ArrayList(java.util.ArrayList) List(java.util.List) IDynamicPluginConfiguration(org.talend.core.runtime.dynamic.IDynamicPluginConfiguration) HashSet(java.util.HashSet)

Example 29 with IDynamicPluginConfiguration

use of org.talend.core.runtime.dynamic.IDynamicPluginConfiguration in project tbd-studio-se by Talend.

the class AbstractModuleGroup method getModuleGroups.

public Set<DistributionModuleGroup> getModuleGroups() throws Exception {
    IDynamicPluginConfiguration configuration = getPluginAdapter().getPluginConfiguration();
    String distribution = configuration.getDistribution();
    String version = configuration.getId();
    return getModuleGroups(distribution, version);
}
Also used : IDynamicPluginConfiguration(org.talend.core.runtime.dynamic.IDynamicPluginConfiguration)

Example 30 with IDynamicPluginConfiguration

use of org.talend.core.runtime.dynamic.IDynamicPluginConfiguration in project tbd-studio-se by Talend.

the class DynamicPluginComparator method compare.

@Override
public int compare(IDynamicPlugin o1, IDynamicPlugin o2) {
    IDynamicPluginConfiguration config1 = o1.getPluginConfiguration();
    IDynamicPluginConfiguration config2 = o2.getPluginConfiguration();
    return config1.getName().compareTo(config2.getName());
}
Also used : IDynamicPluginConfiguration(org.talend.core.runtime.dynamic.IDynamicPluginConfiguration)

Aggregations

IDynamicPluginConfiguration (org.talend.core.runtime.dynamic.IDynamicPluginConfiguration)38 IDynamicPlugin (org.talend.core.runtime.dynamic.IDynamicPlugin)16 DynamicPluginAdapter (org.talend.hadoop.distribution.dynamic.adapter.DynamicPluginAdapter)10 Set (java.util.Set)6 NodeComponentTypeBean (org.talend.hadoop.distribution.NodeComponentTypeBean)6 File (java.io.File)5 InvocationTargetException (java.lang.reflect.InvocationTargetException)5 DummyDynamicMonitor (org.talend.designer.maven.aether.DummyDynamicMonitor)5 IDynamicMonitor (org.talend.designer.maven.aether.IDynamicMonitor)5 IDynamicDistributionTemplate (org.talend.hadoop.distribution.dynamic.template.IDynamicDistributionTemplate)4 ArrayList (java.util.ArrayList)3 Project (org.talend.core.model.general.Project)3 DynamicConfiguration (org.talend.hadoop.distribution.dynamic.DynamicConfiguration)3 DynamicDistributionSetupData (org.talend.repository.hadoopcluster.ui.dynamic.DynamicDistributionSetupData)3 IFolder (org.eclipse.core.resources.IFolder)2 IProject (org.eclipse.core.resources.IProject)2 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)2 Bundle (org.osgi.framework.Bundle)2 LoginException (org.talend.commons.exception.LoginException)2 PersistenceException (org.talend.commons.exception.PersistenceException)2