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;
}
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();
}
Aggregations