use of org.talend.hadoop.distribution.condition.common.SparkBatchLinkedNodeCondition in project tbd-studio-se by Talend.
the class DynamicSparkBatchS3NodeModuleGroup method getModuleGroups.
@Override
public Set<DistributionModuleGroup> getModuleGroups(String distribution, String version) throws Exception {
Set<DistributionModuleGroup> hs = new HashSet<>();
DynamicPluginAdapter pluginAdapter = getPluginAdapter();
String sparkS3MrRequiredRuntimeId = pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.SPARK_S3_MRREQUIRED_MODULE_GROUP.getModuleName());
checkRuntimeId(sparkS3MrRequiredRuntimeId);
if (StringUtils.isNotBlank(sparkS3MrRequiredRuntimeId)) {
DistributionModuleGroup dmg = new DistributionModuleGroup(sparkS3MrRequiredRuntimeId, true, new SparkBatchLinkedNodeCondition(distribution, version, SparkBatchConstant.SPARK_BATCH_S3_SPARKCONFIGURATION_LINKEDPARAMETER).getCondition());
hs.add(dmg);
}
return hs;
}
use of org.talend.hadoop.distribution.condition.common.SparkBatchLinkedNodeCondition in project tbd-studio-se by Talend.
the class DynamicCDHGraphFramesNodeModuleGroup method getModuleGroups.
@Override
public Set<DistributionModuleGroup> getModuleGroups(String distribution, String version) throws Exception {
Set<DistributionModuleGroup> hs = new HashSet<>();
DynamicPluginAdapter pluginAdapter = getPluginAdapter();
String graphFramesMrRequiredRuntimeId = pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.GRAPHFRAMES_MRREQUIRED_MODULE_GROUP.getModuleName());
checkRuntimeId(graphFramesMrRequiredRuntimeId);
if (StringUtils.isNotBlank(graphFramesMrRequiredRuntimeId)) {
DistributionModuleGroup dmg = new DistributionModuleGroup(graphFramesMrRequiredRuntimeId, true, new SparkBatchLinkedNodeCondition(distribution, version, SparkBatchConstant.SPARK_BATCH_SPARKCONFIGURATION_LINKEDPARAMETER).getCondition());
hs.add(dmg);
}
return hs;
}
use of org.talend.hadoop.distribution.condition.common.SparkBatchLinkedNodeCondition in project tbd-studio-se by Talend.
the class DBR550SparkBatchAzureNodeModuleGroup method getModuleGroups.
public static Set<DistributionModuleGroup> getModuleGroups(String distribution, String version) {
Set<DistributionModuleGroup> hs = new HashSet<>();
DistributionModuleGroup dmg = new DistributionModuleGroup(DBR550Constant.SPARK_AZURE_MRREQUIRED_MODULE_GROUP.getModuleName(), true, new SparkBatchLinkedNodeCondition(distribution, version, SparkBatchConstant.SPARK_BATCH_AZURE_SPARKCONFIGURATION_LINKEDPARAMETER).getCondition());
hs.add(dmg);
return hs;
}
use of org.talend.hadoop.distribution.condition.common.SparkBatchLinkedNodeCondition in project tbd-studio-se by Talend.
the class EMR5290SparkBatchSqlRowHiveNodeModuleGroup method getModuleGroups.
public static Set<DistributionModuleGroup> getModuleGroups(String distribution, String version) {
Set<DistributionModuleGroup> hs = new HashSet<>();
DistributionModuleGroup dmg = new DistributionModuleGroup(EMR5290Constant.SPARK_HIVE_MRREQUIRED_MODULE_GROUP.getModuleName(), true, (ComponentCondition) new MultiComponentCondition(new SparkBatchLinkedNodeCondition(distribution, version).getCondition(), BooleanOperator.AND, new BasicExpression("SQL_CONTEXT", EqualityOperator.EQ, "HiveContext")));
hs.add(dmg);
return hs;
}
use of org.talend.hadoop.distribution.condition.common.SparkBatchLinkedNodeCondition in project tbd-studio-se by Talend.
the class ModuleGroupsUtilsTest method getModuleGroupsTest_withAdditionCondition.
@Test
public void getModuleGroupsTest_withAdditionCondition() {
String conditon = "A == 'true'";
Set<DistributionModuleGroup> groups = ModuleGroupsUtils.getModuleGroups(distribution, version, conditon, groupName, true);
assertEquals(groups.size(), 1);
DistributionModuleGroup dmg = groups.iterator().next();
SparkBatchLinkedNodeCondition underlyingCondition = new SparkBatchLinkedNodeCondition(distribution, version);
assertEquals(dmg.getModuleName(), groupName);
assertEquals(dmg.getRequiredIf().getConditionString(), "(" + conditon + ") AND " + underlyingCondition.getCondition().getConditionString());
}
Aggregations