Search in sources :

Example 6 with HadoopServiceProperties

use of org.talend.designer.hdfsbrowse.hadoop.service.HadoopServiceProperties 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 7 with HadoopServiceProperties

use of org.talend.designer.hdfsbrowse.hadoop.service.HadoopServiceProperties 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

HadoopServiceProperties (org.talend.designer.hdfsbrowse.hadoop.service.HadoopServiceProperties)7 HashMap (java.util.HashMap)4 EHadoopServiceType (org.talend.designer.hdfsbrowse.hadoop.service.EHadoopServiceType)4 CheckHadoopServicesDialog (org.talend.designer.hdfsbrowse.hadoop.service.check.CheckHadoopServicesDialog)3 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 ArrayList (java.util.ArrayList)1 INode (org.talend.core.model.process.INode)1 ConnectionItem (org.talend.core.model.properties.ConnectionItem)1 ContextItem (org.talend.core.model.properties.ContextItem)1 DatabaseConnectionItem (org.talend.core.model.properties.DatabaseConnectionItem)1 Item (org.talend.core.model.properties.Item)1 ConnectionStatus (org.talend.core.repository.model.connection.ConnectionStatus)1 IDesignerCoreService (org.talend.designer.core.IDesignerCoreService)1 ContextType (org.talend.designer.core.model.utils.emf.talendfile.ContextType)1 HadoopServerException (org.talend.designer.hdfsbrowse.exceptions.HadoopServerException)1 HadoopServiceBean (org.talend.designer.hdfsbrowse.hadoop.service.HadoopServiceBean)1 CheckedKnoxNamenodeProvider (org.talend.designer.hdfsbrowse.hadoop.service.check.provider.CheckedKnoxNamenodeProvider)1 HadoopClusterConnection (org.talend.repository.model.hadoopcluster.HadoopClusterConnection)1 HadoopClusterConnectionItem (org.talend.repository.model.hadoopcluster.HadoopClusterConnectionItem)1 HadoopSubConnectionItem (org.talend.repository.model.hadoopcluster.HadoopSubConnectionItem)1