bug TDI-29527 fixed : Error executing MR job using a Hadoop custom cluster based on CDH5
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_5@118076 f6f1c999-d317-4740-80b0-e6d1abc6f99e
This commit is contained in:
@@ -28,6 +28,8 @@ public enum ECustomVersionGroup {
|
||||
|
||||
PIG_HBASE,
|
||||
PIG_HCATALOG,
|
||||
|
||||
MAP_REDUCE,
|
||||
|
||||
ALL;
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@ public enum ECustomVersionType {
|
||||
PIG_HBASE("Pig for HBase", ECustomVersionGroup.PIG_HBASE), //$NON-NLS-1$
|
||||
|
||||
PIG_HCATALOG("Pig for Hcatalog", ECustomVersionGroup.PIG_HCATALOG), //$NON-NLS-1$
|
||||
|
||||
MAP_REDUCE("Map Reduce", ECustomVersionGroup.MAP_REDUCE), //$NON-NLS-1$
|
||||
|
||||
ALL("All", ECustomVersionGroup.ALL); //$NON-NLS-1$
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.hadoop.IHadoopService;
|
||||
import org.talend.core.hadoop.version.EHadoopDistributions;
|
||||
import org.talend.core.hadoop.version.EHadoopVersion4Drivers;
|
||||
import org.talend.core.model.components.ComponentCategory;
|
||||
import org.talend.core.model.general.ModuleNeeded;
|
||||
import org.talend.core.model.process.IElementParameter;
|
||||
import org.talend.core.model.process.INode;
|
||||
@@ -99,7 +100,7 @@ public class HadoopVersionDialog extends TitleAreaDialog {
|
||||
protected void configureShell(Shell newShell) {
|
||||
super.configureShell(newShell);
|
||||
newShell.setText(Messages.getString("HadoopVersionDialog.title")); //$NON-NLS-1$
|
||||
newShell.setSize(580, 450);
|
||||
newShell.setSize(700, 450);
|
||||
setHelpAvailable(false);
|
||||
}
|
||||
|
||||
@@ -411,6 +412,8 @@ public class HadoopVersionDialog extends TitleAreaDialog {
|
||||
if (ECustomVersionType.PIG == type || ECustomVersionType.PIG_HBASE == type
|
||||
|| ECustomVersionType.PIG_HCATALOG == type) {
|
||||
hadoopLibraries = getLibrariesForPig(type);
|
||||
} else if (ECustomVersionType.MAP_REDUCE == type) {
|
||||
hadoopLibraries = getLibrariesForMapReduce(type);
|
||||
} else {
|
||||
// fix for TDI-25676 HCATALOG and OOZIE should use the same jars as HDFS
|
||||
if (!commonGroupCalculated
|
||||
@@ -447,6 +450,30 @@ public class HadoopVersionDialog extends TitleAreaDialog {
|
||||
|
||||
return libMap;
|
||||
}
|
||||
|
||||
private Set<String> getLibrariesForMapReduce(ECustomVersionType type) {
|
||||
Set<String> neededLibraries = new HashSet<String>();
|
||||
INode node = CoreRuntimePlugin.getInstance().getDesignerCoreService()
|
||||
.getRefrenceNode("tMRConfiguration", ComponentCategory.CATEGORY_4_MAPREDUCE.getName());//$NON-NLS-1$
|
||||
|
||||
IElementParameter elementParameter = node.getElementParameter("DISTRIBUTION");//$NON-NLS-1$
|
||||
if (elementParameter != null) {
|
||||
elementParameter.setValue(distribution);
|
||||
}
|
||||
|
||||
elementParameter = node.getElementParameter("MR_VERSION");//$NON-NLS-1$
|
||||
if (elementParameter != null) {
|
||||
elementParameter.setValue(version);
|
||||
}
|
||||
|
||||
List<ModuleNeeded> modulesNeeded = node.getModulesNeeded();
|
||||
for (ModuleNeeded module : modulesNeeded) {
|
||||
if (module.isRequired(node.getElementParameters())) {
|
||||
neededLibraries.add(module.getModuleName());
|
||||
}
|
||||
}
|
||||
return neededLibraries;
|
||||
}
|
||||
|
||||
private Set<String> getLibrariesForPig(ECustomVersionType type) {
|
||||
Set<String> neededLibraries = new HashSet<String>();
|
||||
|
||||
@@ -110,6 +110,8 @@ public interface IDesignerCoreService extends IService {
|
||||
public boolean isTalendEditor(IEditorPart activeEditor);
|
||||
|
||||
public INode getRefrenceNode(String componentName);
|
||||
|
||||
public INode getRefrenceNode(String componentName, String paletteType);
|
||||
|
||||
public boolean executeUpdatesManager(List<UpdateResult> results, boolean onlySimpleShow);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user