use of org.talend.hadoop.distribution.DistributionModuleGroup in project tbd-studio-se by Talend.
the class DBR73xTopByNodeModuleGroupTest method testModuleGroups.
@Test
public void testModuleGroups() throws Exception {
Map<String, String> expected = new HashMap<>();
expected.put(DBR73xConstant.TOPBY_LIB_REQUIRED_DBR73X.getModuleName(), "((#LINK@NODE.STORAGE_CONFIGURATION.DISTRIBUTION=='DATABRICKS') AND (#LINK@NODE.STORAGE_CONFIGURATION.SPARK_VERSION=='DATABRICKS_7_3')) AND (#LINK@NODE.STORAGE_CONFIGURATION.SPARK_LOCAL_MODE=='false')");
// $NON-NLS-1$
Set<DistributionModuleGroup> moduleGroups = DBR73xTopByNodeModuleGroup.getModuleGroups(DBR73xDistribution.DISTRIBUTION_NAME, DBR73xDistribution.VERSION);
assertEquals(expected.size(), moduleGroups.size());
for (DistributionModuleGroup module : moduleGroups) {
assertTrue("Should contain module " + module.getModuleName(), expected.containsKey(module.getModuleName()));
// $NON-NLS-1$
if (expected.get(module.getModuleName()) == null) {
assertTrue("The condition of the module " + module.getModuleName() + " is not null.", // $NON-NLS-1$ //$NON-NLS-2$
expected.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 " + expected.get(module.getModuleName()) + ".", expected.get(module.getModuleName()) != null);
// $NON-NLS-1$
// assertEquals(expected.get(module.getModuleName()), module.getRequiredIf().getConditionString());
}
}
}
use of org.talend.hadoop.distribution.DistributionModuleGroup in project tbd-studio-se by Talend.
the class HDInsight40SparkStreamingModuleGroup method getModuleGroups.
public static Set<DistributionModuleGroup> getModuleGroups() {
Set<DistributionModuleGroup> hs = new HashSet<>();
hs.add(new DistributionModuleGroup(HDInsight40Constant.SPARK23_MODULE_GROUP.getModuleName(), false, conditionSpark2_3));
hs.add(new DistributionModuleGroup(HDInsight40Constant.SPARK24_MODULE_GROUP.getModuleName(), false, conditionSpark2_4));
hs.add(new DistributionModuleGroup(HDInsight40Constant.SPARK23_STREAMING_MODULE_GROUP.getModuleName(), false, conditionSpark2_3));
hs.add(new DistributionModuleGroup(HDInsight40Constant.SPARK24_STREAMING_MODULE_GROUP.getModuleName(), false, conditionSpark2_4));
hs.add(new DistributionModuleGroup(HDInsight40Constant.BIGDATALAUNCHER_MODULE_GROUP.getModuleName(), true));
hs.add(new DistributionModuleGroup(HDInsight40Constant.HDINSIGHT400COMMON_MODULE_GROUP.getModuleName(), false));
return hs;
}
use of org.talend.hadoop.distribution.DistributionModuleGroup in project tbd-studio-se by Talend.
the class HDInsight40SparkBatchParquetNodeModuleGroup method getModuleGroups.
public static Set<DistributionModuleGroup> getModuleGroups(String distribution, String version) {
Set<DistributionModuleGroup> hs = new HashSet<>();
hs.add(new DistributionModuleGroup(HDInsight40Constant.SPARK_PARQUET_MRREQUIRED_MODULE_GROUP.getModuleName(), false));
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 HDInsight40SparkStreamingParquetNodeModuleGroup method getModuleGroups.
public static Set<DistributionModuleGroup> getModuleGroups(String distribution, String version) {
Set<DistributionModuleGroup> hs = new HashSet<>();
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));
hs.add(new DistributionModuleGroup(HDInsight40Constant.SPARK_PARQUET_MRREQUIRED_MODULE_GROUP.getModuleName(), false));
hs.add(new DistributionModuleGroup(HDInsight40Constant.SPARK23_STREAMING_PARQUET_MRREQUIRED_MODULE_GROUP.getModuleName(), false, conditionSpark2_3));
hs.add(new DistributionModuleGroup(HDInsight40Constant.SPARK24_STREAMING_PARQUET_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 DynamicHDPSparkStreamingKinesisNodeModuleGroup method getModuleGroups.
@Override
public Set<DistributionModuleGroup> getModuleGroups(String distribution, String version) throws Exception {
Set<DistributionModuleGroup> moduleGroups = new HashSet<>();
Set<DistributionModuleGroup> moduleGroupsFromSuper = super.getModuleGroups(distribution, version);
if (moduleGroupsFromSuper != null && !moduleGroupsFromSuper.isEmpty()) {
moduleGroups.addAll(moduleGroupsFromSuper);
}
DynamicPluginAdapter pluginAdapter = getPluginAdapter();
String spark2KinesisMrRequiredRuntimeId = pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.SPARK2_KINESIS_MRREQUIRED_MODULE_GROUP.getModuleName());
checkRuntimeId(spark2KinesisMrRequiredRuntimeId);
if (StringUtils.isNotBlank(spark2KinesisMrRequiredRuntimeId)) {
DistributionModuleGroup dmgSpark1 = new DistributionModuleGroup(spark2KinesisMrRequiredRuntimeId, true, new NestedComponentCondition(new MultiComponentCondition(new SparkStreamingLinkedNodeCondition(distribution, version).getCondition(), BooleanOperator.AND, spark2Condition)));
moduleGroups.add(dmgSpark1);
}
return moduleGroups;
}
Aggregations