use of org.talend.hadoop.distribution.DistributionModuleGroup in project tbd-studio-se by Talend.
the class HDInsight40HiveOnSparkModuleGroup method getModuleGroups.
public static Set<DistributionModuleGroup> getModuleGroups() {
Set<DistributionModuleGroup> hs = new HashSet<>();
hs.add(new DistributionModuleGroup(HDInsight40Constant.BIGDATALAUNCHER_MODULE_GROUP.getModuleName(), true));
hs.add(new DistributionModuleGroup(HDInsight40Constant.SPARK23_HIVE_MRREQUIRED_MODULE_GROUP.getModuleName(), false, conditionSpark2_3));
hs.add(new DistributionModuleGroup(HDInsight40Constant.SPARK24_HIVE_MRREQUIRED_MODULE_GROUP.getModuleName(), false, conditionSpark2_4));
hs.add(new DistributionModuleGroup(HDInsight40Constant.SPARK23_SQL_MRREQUIRED_MODULE_GROUP.getModuleName(), false, conditionSpark2_3));
hs.add(new DistributionModuleGroup(HDInsight40Constant.SPARK24_SQL_MRREQUIRED_MODULE_GROUP.getModuleName(), false, conditionSpark2_4));
return hs;
}
use of org.talend.hadoop.distribution.DistributionModuleGroup in project tbd-studio-se by Talend.
the class HDInsight40SparkBatchParquetNodeModuleGroupTest method testModuleGroups.
@Test
public void testModuleGroups() throws Exception {
Map<String, String> results = new HashMap<>();
results.put(HDInsight40Constant.SPARK_PARQUET_MRREQUIRED_MODULE_GROUP.getModuleName(), null);
results.put(HDInsight40Constant.SPARK23_SQL_MRREQUIRED_MODULE_GROUP.getModuleName(), "(SUPPORTED_SPARK_VERSION=='SPARK_2_3_x')");
results.put(HDInsight40Constant.SPARK24_SQL_MRREQUIRED_MODULE_GROUP.getModuleName(), "(SUPPORTED_SPARK_VERSION=='SPARK_2_4_x')");
Set<DistributionModuleGroup> moduleGroups = HDInsight40SparkBatchParquetNodeModuleGroup.getModuleGroups(HDInsight40Distribution.DISTRIBUTION_NAME, HDInsight40Distribution.VERSION);
assertEquals(results.size(), moduleGroups.size());
moduleGroups.iterator();
for (DistributionModuleGroup module : moduleGroups) {
// $NON-NLS-1$
assertTrue("Should contain module " + module.getModuleName(), results.containsKey(module.getModuleName()));
if (results.get(module.getModuleName()) == null) {
assertTrue(// $NON-NLS-1$ //$NON-NLS-2$
"The condition of the module " + module.getModuleName() + " is not null.", results.get(module.getModuleName()) == null);
} else {
assertTrue(// $NON-NLS-1$ //$NON-NLS-2$
"The condition of the module " + module.getModuleName() + " is null, but it should be " + results.get(module.getModuleName()) + ".", // $NON-NLS-1$
results.get(module.getModuleName()) != null);
assertEquals(results.get(module.getModuleName()), module.getRequiredIf().getConditionString());
}
}
}
use of org.talend.hadoop.distribution.DistributionModuleGroup in project tbd-studio-se by Talend.
the class EMR5290HDFSModuleGroupTest method testModuleGroups.
@Test
public void testModuleGroups() throws Exception {
Map<String, String> results = new HashMap<>();
results.put(EMR5290Constant.HDFS_MODULE_GROUP.getModuleName(), null);
Set<DistributionModuleGroup> moduleGroups = EMR5290HDFSModuleGroup.getModuleGroups();
assertEquals(results.size(), moduleGroups.size());
for (DistributionModuleGroup module : moduleGroups) {
// $NON-NLS-1$
assertTrue("Should contain module " + module.getModuleName(), results.containsKey(module.getModuleName()));
if (results.get(module.getModuleName()) == null) {
assertTrue(// $NON-NLS-1$ //$NON-NLS-2$
"The condition of the module " + module.getModuleName() + " is not null.", results.get(module.getModuleName()) == null);
} else {
assertTrue(// $NON-NLS-1$ //$NON-NLS-2$
"The condition of the module " + module.getModuleName() + " is null, but it should be " + results.get(module.getModuleName()) + ".", // $NON-NLS-1$
results.get(module.getModuleName()) != null);
assertEquals(results.get(module.getModuleName()), module.getRequiredIf().getConditionString());
}
}
}
use of org.talend.hadoop.distribution.DistributionModuleGroup in project tbd-studio-se by Talend.
the class EMR5290HiveOnSparkModuleGroupTest method testModuleGroups.
@Test
public void testModuleGroups() throws Exception {
Map<String, String> results = new HashMap<>();
results.put(EMR5290Constant.SPARK_HIVE_MRREQUIRED_MODULE_GROUP.getModuleName(), null);
Set<DistributionModuleGroup> moduleGroups = EMR5290HiveOnSparkModuleGroup.getModuleGroups();
assertEquals(results.size(), moduleGroups.size());
for (DistributionModuleGroup module : moduleGroups) {
// $NON-NLS-1$
assertTrue("Should contain module " + module.getModuleName(), results.containsKey(module.getModuleName()));
if (results.get(module.getModuleName()) == null) {
assertTrue(// $NON-NLS-1$ //$NON-NLS-2$
"The condition of the module " + module.getModuleName() + " is not null.", results.get(module.getModuleName()) == null);
} else {
assertTrue(// $NON-NLS-1$ //$NON-NLS-2$
"The condition of the module " + module.getModuleName() + " is null, but it should be " + results.get(module.getModuleName()) + ".", // $NON-NLS-1$
results.get(module.getModuleName()) != null);
assertEquals(results.get(module.getModuleName()), module.getRequiredIf().getConditionString());
}
}
}
use of org.talend.hadoop.distribution.DistributionModuleGroup in project tbd-studio-se by Talend.
the class EMR5290SparkBatchSqlRowNodeModuleGroupTest method testModuleGroups.
@Test
public void testModuleGroups() throws Exception {
Map<String, String> results = new HashMap<>();
results.put(EMR5290Constant.SPARK_HIVE_MRREQUIRED_MODULE_GROUP.getModuleName(), // $NON-NLS-1$
"(((#LINK@NODE.SPARK_CONFIGURATION.DISTRIBUTION=='AMAZON_EMR') AND (#LINK@NODE.SPARK_CONFIGURATION.SPARK_VERSION=='EMR_5_29_0')) AND (#LINK@NODE.SPARK_CONFIGURATION.SPARK_LOCAL_MODE=='false')) AND (SQL_CONTEXT=='HiveContext')");
Set<DistributionModuleGroup> moduleGroups = EMR5290SparkBatchSqlRowHiveNodeModuleGroup.getModuleGroups(EMR5290Distribution.DISTRIBUTION_NAME, EMR5290Distribution.VERSION);
assertEquals(results.size(), moduleGroups.size());
for (DistributionModuleGroup module : moduleGroups) {
// $NON-NLS-1$
assertTrue("Should contain module " + module.getModuleName(), results.containsKey(module.getModuleName()));
if (results.get(module.getModuleName()) == null) {
assertTrue(// $NON-NLS-1$ //$NON-NLS-2$
"The condition of the module " + module.getModuleName() + " is not null.", results.get(module.getModuleName()) == null);
} else {
assertTrue(// $NON-NLS-1$ //$NON-NLS-2$
"The condition of the module " + module.getModuleName() + " is null, but it should be " + results.get(module.getModuleName()) + ".", // $NON-NLS-1$
results.get(module.getModuleName()) != null);
assertEquals(results.get(module.getModuleName()), module.getRequiredIf().getConditionString());
}
}
}
Aggregations