Search in sources :

Example 1 with EHadoopServiceType

use of org.talend.designer.hdfsbrowse.hadoop.service.EHadoopServiceType in project tbd-studio-se by Talend.

the class KnoxInfoForm method checkServices.

private void checkServices() {
    Map<EHadoopServiceType, HadoopServiceProperties> serviceTypeToProperties = new HashMap<EHadoopServiceType, HadoopServiceProperties>();
    HadoopServiceProperties nnProperties = new HadoopServiceProperties();
    initCommonProperties(nnProperties);
    nnProperties.setKnoxURL(knoxURLText.getText());
    nnProperties.setKnoxUser(knoxUserText.getText());
    nnProperties.setKnoxPassword(knoxPasswordText.getText());
    nnProperties.setKnoxDirectory(knoxDirectoryText.getText());
    serviceTypeToProperties.put(EHadoopServiceType.KNOX_RESOURCE_MANAGER, nnProperties);
    serviceTypeToProperties.put(EHadoopServiceType.KNOX_NAMENODE, nnProperties);
    new CheckHadoopServicesDialog(getShell(), serviceTypeToProperties).open();
}
Also used : HashMap(java.util.HashMap) CheckHadoopServicesDialog(org.talend.designer.hdfsbrowse.hadoop.service.check.CheckHadoopServicesDialog) EHadoopServiceType(org.talend.designer.hdfsbrowse.hadoop.service.EHadoopServiceType) HadoopServiceProperties(org.talend.designer.hdfsbrowse.hadoop.service.HadoopServiceProperties)

Example 2 with EHadoopServiceType

use of org.talend.designer.hdfsbrowse.hadoop.service.EHadoopServiceType in project tbd-studio-se by Talend.

the class GoogleDataprocInfoForm method checkServices.

private void checkServices() {
    Map<EHadoopServiceType, HadoopServiceProperties> serviceTypeToProperties = new HashMap<EHadoopServiceType, HadoopServiceProperties>();
    HadoopServiceProperties nnProperties = new HadoopServiceProperties();
    initCommonProperties(nnProperties);
    nnProperties.setProjectId(projectIdNameText.getText());
    nnProperties.setRegion(regionNameText.getText());
    nnProperties.setClusterName(clusterIdNameText.getText());
    serviceTypeToProperties.put(EHadoopServiceType.GOOGLE_DATAPROC, nnProperties);
    new CheckHadoopServicesDialog(getShell(), serviceTypeToProperties).open();
}
Also used : HashMap(java.util.HashMap) CheckHadoopServicesDialog(org.talend.designer.hdfsbrowse.hadoop.service.check.CheckHadoopServicesDialog) EHadoopServiceType(org.talend.designer.hdfsbrowse.hadoop.service.EHadoopServiceType) HadoopServiceProperties(org.talend.designer.hdfsbrowse.hadoop.service.HadoopServiceProperties)

Example 3 with EHadoopServiceType

use of org.talend.designer.hdfsbrowse.hadoop.service.EHadoopServiceType in project tbd-studio-se by Talend.

the class StandardHCInfoForm method filterTypes.

private Map<EHadoopServiceType, HadoopServiceProperties> filterTypes(Map<EHadoopServiceType, HadoopServiceProperties> serviceTypeToProperties) {
    Map<EHadoopServiceType, HadoopServiceProperties> filteredTypes = serviceTypeToProperties;
    IDesignerCoreService designerCoreService = CoreRuntimePlugin.getInstance().getDesignerCoreService();
    // $NON-NLS-1$
    INode node = designerCoreService.getRefrenceNode("tMRConfiguration", ComponentCategory.CATEGORY_4_MAPREDUCE.getName());
    if (node == null) {
        filteredTypes.remove(EHadoopServiceType.JOBTRACKER);
        filteredTypes.remove(EHadoopServiceType.RESOURCE_MANAGER);
    }
    return filteredTypes;
}
Also used : INode(org.talend.core.model.process.INode) EHadoopServiceType(org.talend.designer.hdfsbrowse.hadoop.service.EHadoopServiceType) HadoopServiceProperties(org.talend.designer.hdfsbrowse.hadoop.service.HadoopServiceProperties) IDesignerCoreService(org.talend.designer.core.IDesignerCoreService)

Example 4 with EHadoopServiceType

use of org.talend.designer.hdfsbrowse.hadoop.service.EHadoopServiceType in project tbd-studio-se by Talend.

the class StandardHCInfoForm method checkServices.

private void checkServices() {
    Map<EHadoopServiceType, HadoopServiceProperties> serviceTypeToProperties = new HashMap<EHadoopServiceType, HadoopServiceProperties>();
    HadoopServiceProperties nnProperties = new HadoopServiceProperties();
    initCommonProperties(nnProperties);
    nnProperties.setNameNode(getConnection().getNameNodeURI());
    serviceTypeToProperties.put(EHadoopServiceType.NAMENODE, nnProperties);
    HadoopServiceProperties rmORjtProperties = new HadoopServiceProperties();
    initCommonProperties(rmORjtProperties);
    if (getConnection().isUseYarn()) {
        rmORjtProperties.setResourceManager(getConnection().getJobTrackerURI());
        serviceTypeToProperties.put(EHadoopServiceType.RESOURCE_MANAGER, rmORjtProperties);
    } else {
        rmORjtProperties.setJobTracker(getConnection().getJobTrackerURI());
        serviceTypeToProperties.put(EHadoopServiceType.JOBTRACKER, rmORjtProperties);
    }
    if (getConnection().isUseCustomVersion()) {
        // $NON-NLS-1$
        nnProperties.setUid(connectionItem.getProperty().getId() + ":" + ECustomVersionGroup.COMMON.getName());
        nnProperties.setCustomJars(HCVersionUtil.getCustomVersionMap(getConnection()).get(ECustomVersionGroup.COMMON.getName()));
        // $NON-NLS-1$
        rmORjtProperties.setUid(connectionItem.getProperty().getId() + ":" + ECustomVersionGroup.MAP_REDUCE.getName());
        rmORjtProperties.setCustomJars(HCVersionUtil.getCustomVersionMap(getConnection()).get(ECustomVersionGroup.MAP_REDUCE.getName()));
    }
    new CheckHadoopServicesDialog(getShell(), filterTypes(serviceTypeToProperties)).open();
}
Also used : HashMap(java.util.HashMap) CheckHadoopServicesDialog(org.talend.designer.hdfsbrowse.hadoop.service.check.CheckHadoopServicesDialog) EHadoopServiceType(org.talend.designer.hdfsbrowse.hadoop.service.EHadoopServiceType) HadoopServiceProperties(org.talend.designer.hdfsbrowse.hadoop.service.HadoopServiceProperties)

Aggregations

EHadoopServiceType (org.talend.designer.hdfsbrowse.hadoop.service.EHadoopServiceType)4 HadoopServiceProperties (org.talend.designer.hdfsbrowse.hadoop.service.HadoopServiceProperties)4 HashMap (java.util.HashMap)3 CheckHadoopServicesDialog (org.talend.designer.hdfsbrowse.hadoop.service.check.CheckHadoopServicesDialog)3 INode (org.talend.core.model.process.INode)1 IDesignerCoreService (org.talend.designer.core.IDesignerCoreService)1