Search in sources :

Example 1 with MRComponent

use of org.talend.hadoop.distribution.component.MRComponent in project tbd-studio-se by Talend.

the class AbstractDynamicDistributionTemplate method buildModuleGroupsTemplateMap.

protected Map<ComponentType, IDynamicModuleGroupTemplate> buildModuleGroupsTemplateMap() {
    Map<ComponentType, IDynamicModuleGroupTemplate> moduleGroupsTemplateMap = new HashMap<>();
    DynamicPluginAdapter pluginAdapter = getPluginAdapter();
    if (this instanceof HDFSComponent) {
        moduleGroupsTemplateMap.put(ComponentType.HDFS, new DynamicHDFSModuleGroupTemplate(pluginAdapter));
    }
    if (this instanceof HBaseComponent) {
        moduleGroupsTemplateMap.put(ComponentType.HBASE, new DynamicHBaseModuleGroupTemplate(pluginAdapter));
    }
    if (this instanceof HCatalogComponent) {
        moduleGroupsTemplateMap.put(ComponentType.HCATALOG, new DynamicHCatalogModuleGroupTemplate(pluginAdapter));
    }
    if (this instanceof HiveComponent) {
        moduleGroupsTemplateMap.put(ComponentType.HIVE, new DynamicHiveModuleGroupTemplate(pluginAdapter));
    }
    if (this instanceof HiveOnSparkComponent) {
        moduleGroupsTemplateMap.put(ComponentType.HIVEONSPARK, new DynamicHiveOnSparkModuleGroupTemplate(pluginAdapter));
    }
    if (this instanceof MapRDBComponent) {
        moduleGroupsTemplateMap.put(ComponentType.MAPRDB, new DynamicMapRDBModuleGroupTemplate(pluginAdapter));
    }
    if (this instanceof MRComponent) {
        moduleGroupsTemplateMap.put(ComponentType.MAPREDUCE, new DynamicMapReduceModuleGroupTemplate(pluginAdapter));
    }
    if (this instanceof SparkBatchComponent) {
        moduleGroupsTemplateMap.put(ComponentType.SPARKBATCH, new DynamicSparkBatchModuleGroupTemplate(pluginAdapter));
    }
    if (this instanceof SparkStreamingComponent) {
        moduleGroupsTemplateMap.put(ComponentType.SPARKSTREAMING, new DynamicSparkStreamingModuleGroupTemplate(pluginAdapter));
    }
    if (this instanceof SqoopComponent) {
        moduleGroupsTemplateMap.put(ComponentType.SQOOP, new DynamicSqoopModuleGroupTemplate(pluginAdapter));
    }
    if (this instanceof ImpalaComponent) {
        moduleGroupsTemplateMap.put(ComponentType.IMPALA, new DynamicImpalaModuleGroupTemplate(pluginAdapter));
    }
    return moduleGroupsTemplateMap;
}
Also used : ImpalaComponent(org.talend.hadoop.distribution.component.ImpalaComponent) HashMap(java.util.HashMap) HiveOnSparkComponent(org.talend.hadoop.distribution.component.HiveOnSparkComponent) MRComponent(org.talend.hadoop.distribution.component.MRComponent) HiveComponent(org.talend.hadoop.distribution.component.HiveComponent) HDFSComponent(org.talend.hadoop.distribution.component.HDFSComponent) SqoopComponent(org.talend.hadoop.distribution.component.SqoopComponent) ComponentType(org.talend.hadoop.distribution.ComponentType) DynamicPluginAdapter(org.talend.hadoop.distribution.dynamic.adapter.DynamicPluginAdapter) HCatalogComponent(org.talend.hadoop.distribution.component.HCatalogComponent) HBaseComponent(org.talend.hadoop.distribution.component.HBaseComponent) SparkBatchComponent(org.talend.hadoop.distribution.component.SparkBatchComponent) SparkStreamingComponent(org.talend.hadoop.distribution.component.SparkStreamingComponent) MapRDBComponent(org.talend.hadoop.distribution.component.MapRDBComponent)

Example 2 with MRComponent

use of org.talend.hadoop.distribution.component.MRComponent in project tbd-studio-se by Talend.

the class AbstractDynamicCDHDistributionTemplate method buildModuleGroupsTemplateMap.

@Override
protected Map<ComponentType, IDynamicModuleGroupTemplate> buildModuleGroupsTemplateMap() {
    Map<ComponentType, IDynamicModuleGroupTemplate> groupTemplateMap = super.buildModuleGroupsTemplateMap();
    DynamicPluginAdapter pluginAdapter = getPluginAdapter();
    if (this instanceof HiveOnSparkComponent) {
        groupTemplateMap.put(ComponentType.HIVEONSPARK, new DynamicCDHHiveOnSparkModuleGroupTemplate(pluginAdapter));
    }
    if (this instanceof MRComponent) {
        groupTemplateMap.put(ComponentType.MAPREDUCE, new DynamicCDHMapReduceModuleGroupTemplate(pluginAdapter));
    }
    if (this instanceof SparkBatchComponent) {
        groupTemplateMap.put(ComponentType.SPARKBATCH, new DynamicCDHSparkBatchModuleGroupTemplate(pluginAdapter));
    }
    if (this instanceof SparkStreamingComponent) {
        groupTemplateMap.put(ComponentType.SPARKSTREAMING, new DynamicCDHSparkStreamingModuleGroupTemplate(pluginAdapter));
    }
    if (this instanceof SqoopComponent) {
        groupTemplateMap.put(ComponentType.SQOOP, new DynamicCDHSqoopModuleGroupTemplate(pluginAdapter));
    }
    if (this instanceof ImpalaComponent) {
        groupTemplateMap.put(ComponentType.IMPALA, new DynamicImpalaModuleGroupTemplate(pluginAdapter));
    }
    return groupTemplateMap;
}
Also used : ImpalaComponent(org.talend.hadoop.distribution.component.ImpalaComponent) ComponentType(org.talend.hadoop.distribution.ComponentType) DynamicPluginAdapter(org.talend.hadoop.distribution.dynamic.adapter.DynamicPluginAdapter) HiveOnSparkComponent(org.talend.hadoop.distribution.component.HiveOnSparkComponent) MRComponent(org.talend.hadoop.distribution.component.MRComponent) DynamicImpalaModuleGroupTemplate(org.talend.hadoop.distribution.dynamic.template.DynamicImpalaModuleGroupTemplate) SparkBatchComponent(org.talend.hadoop.distribution.component.SparkBatchComponent) IDynamicModuleGroupTemplate(org.talend.hadoop.distribution.dynamic.template.IDynamicModuleGroupTemplate) SparkStreamingComponent(org.talend.hadoop.distribution.component.SparkStreamingComponent) SqoopComponent(org.talend.hadoop.distribution.component.SqoopComponent)

Example 3 with MRComponent

use of org.talend.hadoop.distribution.component.MRComponent in project tbd-studio-se by Talend.

the class AbstractDynamicHDPDistributionTemplate method buildModuleGroupsTemplateMap.

@Override
protected Map<ComponentType, IDynamicModuleGroupTemplate> buildModuleGroupsTemplateMap() {
    Map<ComponentType, IDynamicModuleGroupTemplate> groupTemplateMap = super.buildModuleGroupsTemplateMap();
    DynamicPluginAdapter pluginAdapter = getPluginAdapter();
    if (this instanceof HDFSComponent) {
        groupTemplateMap.put(ComponentType.HDFS, new DynamicHDPHDFSModuleGroupTemplate(pluginAdapter));
    }
    if (this instanceof MRComponent) {
        groupTemplateMap.put(ComponentType.MAPREDUCE, new DynamicHDPMapReduceModuleGroupTemplate(pluginAdapter));
    }
    if (this instanceof SparkBatchComponent) {
        groupTemplateMap.put(ComponentType.SPARKBATCH, new DynamicHDPSparkBatchModuleGroupTemplate(pluginAdapter));
    }
    if (this instanceof SparkStreamingComponent) {
        groupTemplateMap.put(ComponentType.SPARKSTREAMING, new DynamicHDPSparkStreamingModuleGroupTemplate(pluginAdapter));
    }
    if (this instanceof HiveOnSparkComponent) {
        groupTemplateMap.put(ComponentType.HIVEONSPARK, new DynamicHDPHiveOnSparkModuleGroupTemplate(pluginAdapter));
    }
    if (this instanceof SqoopComponent) {
        groupTemplateMap.put(ComponentType.SQOOP, new DynamicHDPSqoopModuleGroupTemplate(pluginAdapter));
    }
    return groupTemplateMap;
}
Also used : ComponentType(org.talend.hadoop.distribution.ComponentType) DynamicPluginAdapter(org.talend.hadoop.distribution.dynamic.adapter.DynamicPluginAdapter) HiveOnSparkComponent(org.talend.hadoop.distribution.component.HiveOnSparkComponent) MRComponent(org.talend.hadoop.distribution.component.MRComponent) SparkBatchComponent(org.talend.hadoop.distribution.component.SparkBatchComponent) HDFSComponent(org.talend.hadoop.distribution.component.HDFSComponent) IDynamicModuleGroupTemplate(org.talend.hadoop.distribution.dynamic.template.IDynamicModuleGroupTemplate) SparkStreamingComponent(org.talend.hadoop.distribution.component.SparkStreamingComponent) SqoopComponent(org.talend.hadoop.distribution.component.SqoopComponent)

Example 4 with MRComponent

use of org.talend.hadoop.distribution.component.MRComponent in project tbd-studio-se by Talend.

the class StandardHCInfoForm method addNavigatorFields.

private void addNavigatorFields() {
    DistributionBean distriBean = getDistribution();
    MRComponent currentDistribution;
    boolean isShow = false;
    try {
        currentDistribution = (MRComponent) DistributionFactory.buildDistribution(distriBean.getName(), hadoopVersison.getVersion());
        isShow = !getDistribution().useCustom() && currentDistribution.doSupportClouderaNavigator();
    } catch (Exception e) {
        ExceptionHandler.process(e);
    }
    if (!isShow) {
        return;
    }
    Composite clouderaNaviComposite = new Composite(propertiesComposite, SWT.NONE);
    GridLayout hadoopConfsCompLayout = new GridLayout(3, false);
    hadoopConfsCompLayout.marginWidth = 5;
    hadoopConfsCompLayout.marginHeight = 5;
    clouderaNaviComposite.setLayout(hadoopConfsCompLayout);
    clouderaNaviComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    useClouderaNaviBtn = new Button(clouderaNaviComposite, SWT.CHECK);
    // $NON-NLS-1$
    useClouderaNaviBtn.setText(Messages.getString("HadoopClusterForm.button.use_cloudera_navigator"));
    useClouderaNaviBtn.setLayoutData(new GridData());
    clouderaNaviButton = new Button(clouderaNaviComposite, SWT.NONE);
    clouderaNaviButton.setImage(ImageProvider.getImage(EImage.THREE_DOTS_ICON));
    clouderaNaviButton.setLayoutData(new GridData(30, 25));
    clouderaNaviButton.setEnabled(false);
    Label displayLabel = new Label(clouderaNaviComposite, SWT.NONE);
    displayLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) ScrolledComposite(org.eclipse.swt.custom.ScrolledComposite) Button(org.eclipse.swt.widgets.Button) UtilsButton(org.talend.commons.ui.swt.formtools.UtilsButton) GridData(org.eclipse.swt.layout.GridData) Label(org.eclipse.swt.widgets.Label) MRComponent(org.talend.hadoop.distribution.component.MRComponent) DistributionBean(org.talend.hadoop.distribution.model.DistributionBean)

Aggregations

MRComponent (org.talend.hadoop.distribution.component.MRComponent)4 ComponentType (org.talend.hadoop.distribution.ComponentType)3 HiveOnSparkComponent (org.talend.hadoop.distribution.component.HiveOnSparkComponent)3 SparkBatchComponent (org.talend.hadoop.distribution.component.SparkBatchComponent)3 SparkStreamingComponent (org.talend.hadoop.distribution.component.SparkStreamingComponent)3 SqoopComponent (org.talend.hadoop.distribution.component.SqoopComponent)3 DynamicPluginAdapter (org.talend.hadoop.distribution.dynamic.adapter.DynamicPluginAdapter)3 HDFSComponent (org.talend.hadoop.distribution.component.HDFSComponent)2 ImpalaComponent (org.talend.hadoop.distribution.component.ImpalaComponent)2 IDynamicModuleGroupTemplate (org.talend.hadoop.distribution.dynamic.template.IDynamicModuleGroupTemplate)2 HashMap (java.util.HashMap)1 ScrolledComposite (org.eclipse.swt.custom.ScrolledComposite)1 GridData (org.eclipse.swt.layout.GridData)1 GridLayout (org.eclipse.swt.layout.GridLayout)1 Button (org.eclipse.swt.widgets.Button)1 Composite (org.eclipse.swt.widgets.Composite)1 Label (org.eclipse.swt.widgets.Label)1 UtilsButton (org.talend.commons.ui.swt.formtools.UtilsButton)1 HBaseComponent (org.talend.hadoop.distribution.component.HBaseComponent)1 HCatalogComponent (org.talend.hadoop.distribution.component.HCatalogComponent)1