use of org.talend.hadoop.distribution.condition.SimpleComponentCondition in project tbd-studio-se by Talend.
the class DynamicSparkStreamingKafkaAssemblyModuleGroup method init.
protected void init() {
spark1Condition = new SimpleComponentCondition(new LinkedNodeExpression(// $NON-NLS-1$
SparkStreamingConstant.KAFKA_SPARKCONFIGURATION_LINKEDPARAMETER, // $NON-NLS-1$
"SUPPORTED_SPARK_VERSION", // $NON-NLS-1$
EqualityOperator.EQ, ESparkVersion.SPARK_1_6.getSparkVersion()));
spark2Condition = new MultiComponentCondition(new LinkedNodeExpression(SparkStreamingConstant.KAFKA_SPARKCONFIGURATION_LINKEDPARAMETER, // $NON-NLS-1$
"SUPPORTED_SPARK_VERSION", // $NON-NLS-1$
EqualityOperator.EQ, // $NON-NLS-1$
ESparkVersion.SPARK_2_2.getSparkVersion()), BooleanOperator.OR, new LinkedNodeExpression(SparkStreamingConstant.KAFKA_SPARKCONFIGURATION_LINKEDPARAMETER, // $NON-NLS-1$
"SUPPORTED_SPARK_VERSION", // $NON-NLS-1$
EqualityOperator.EQ, // $NON-NLS-1$
ESparkVersion.SPARK_2_4_X.getSparkVersion()));
}
use of org.talend.hadoop.distribution.condition.SimpleComponentCondition in project tbd-studio-se by Talend.
the class DynamicSparkStreamingModuleGroup method init.
protected void init() {
// $NON-NLS-1$
spark1Condition = new SimpleComponentCondition(new BasicExpression("SUPPORTED_SPARK_VERSION", EqualityOperator.EQ, ESparkVersion.SPARK_1_6.getSparkVersion()));
spark2Condition = new MultiComponentCondition(// $NON-NLS-1$
new BasicExpression("SUPPORTED_SPARK_VERSION", EqualityOperator.EQ, ESparkVersion.SPARK_2_0.getSparkVersion()), BooleanOperator.OR, new MultiComponentCondition(// $NON-NLS-1$
new BasicExpression("SUPPORTED_SPARK_VERSION", EqualityOperator.EQ, ESparkVersion.SPARK_2_1.getSparkVersion()), BooleanOperator.OR, new MultiComponentCondition(// $NON-NLS-1$
new BasicExpression("SUPPORTED_SPARK_VERSION", EqualityOperator.EQ, ESparkVersion.SPARK_2_2.getSparkVersion()), BooleanOperator.OR, new MultiComponentCondition(// $NON-NLS-1$
new BasicExpression("SUPPORTED_SPARK_VERSION", EqualityOperator.EQ, ESparkVersion.SPARK_2_3_X.getSparkVersion()), BooleanOperator.OR, // $NON-NLS-1$
new BasicExpression("SUPPORTED_SPARK_VERSION", EqualityOperator.EQ, ESparkVersion.SPARK_2_4_X.getSparkVersion())))));
}
use of org.talend.hadoop.distribution.condition.SimpleComponentCondition in project tbd-studio-se by Talend.
the class DynamicHDPSparkBatchModuleGroup method initConditions.
@Override
protected void initConditions() {
super.initConditions();
conditionNotSpark16 = new SimpleComponentCondition(// $NON-NLS-1$
new BasicExpression("SUPPORTED_SPARK_VERSION", EqualityOperator.NOT_EQ, ESparkVersion.SPARK_1_6.getSparkVersion()));
}
use of org.talend.hadoop.distribution.condition.SimpleComponentCondition in project tbd-studio-se by Talend.
the class DynamicSparkBatchModuleGroup method initConditions.
protected void initConditions() {
// $NON-NLS-1$
conditionSpark1 = new SimpleComponentCondition(new BasicExpression("SUPPORTED_SPARK_VERSION", EqualityOperator.EQ, ESparkVersion.SPARK_1_6.getSparkVersion()));
conditionSpark2 = new MultiComponentCondition(// $NON-NLS-1$
new BasicExpression("SUPPORTED_SPARK_VERSION", EqualityOperator.EQ, ESparkVersion.SPARK_2_0.getSparkVersion()), BooleanOperator.OR, new MultiComponentCondition(// $NON-NLS-1$
new BasicExpression("SUPPORTED_SPARK_VERSION", EqualityOperator.EQ, ESparkVersion.SPARK_2_1.getSparkVersion()), BooleanOperator.OR, new MultiComponentCondition(// $NON-NLS-1$
new BasicExpression("SUPPORTED_SPARK_VERSION", EqualityOperator.EQ, ESparkVersion.SPARK_2_2.getSparkVersion()), BooleanOperator.OR, new MultiComponentCondition(// $NON-NLS-1$
new BasicExpression("SUPPORTED_SPARK_VERSION", EqualityOperator.EQ, ESparkVersion.SPARK_2_3_X.getSparkVersion()), BooleanOperator.OR, // $NON-NLS-1$
new BasicExpression("SUPPORTED_SPARK_VERSION", EqualityOperator.EQ, ESparkVersion.SPARK_2_4_X.getSparkVersion())))));
}
use of org.talend.hadoop.distribution.condition.SimpleComponentCondition in project tbd-studio-se by Talend.
the class DynamicSqoopModuleGroup method getModuleGroups.
@Override
public Set<DistributionModuleGroup> getModuleGroups() throws Exception {
Set<DistributionModuleGroup> hs = new HashSet<>();
DynamicPluginAdapter pluginAdapter = getPluginAdapter();
String sqoopRuntimeId = pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.SQOOP_MODULE_GROUP.getModuleName());
String sqoopParquetRuntimeId = pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.SQOOP_PARQUET_MODULE_GROUP.getModuleName());
String sqoopHiveRuntimeId = pluginAdapter.getRuntimeModuleGroupIdByTemplateId(DynamicModuleGroupConstant.SQOOP_HIVE_MODULE_GROUP.getModuleName());
checkRuntimeId(sqoopRuntimeId);
checkRuntimeId(sqoopParquetRuntimeId);
checkRuntimeId(sqoopHiveRuntimeId);
if (StringUtils.isNotBlank(sqoopRuntimeId)) {
hs.add(new DistributionModuleGroup(sqoopRuntimeId));
}
if (StringUtils.isNotBlank(sqoopParquetRuntimeId)) {
ComponentCondition parquetOutputCondition = new SimpleComponentCondition(new BasicExpression(SqoopConstant.FILE_FORMAT, EqualityOperator.EQ, SqoopConstant.PAQUET_OUTPUT_FORMAT));
hs.add(new DistributionModuleGroup(sqoopParquetRuntimeId, true, parquetOutputCondition));
}
if (StringUtils.isNotBlank(sqoopHiveRuntimeId)) {
ComponentCondition hiveOutputCondition = new SimpleComponentCondition(new RawExpression("ADDITIONAL_JAVA CONTAINS {ADDITIONAL_ARGUMENT=\"hive.import\", ADDITIONAL_VALUE=\"true\"}"));
hs.add(new DistributionModuleGroup(sqoopHiveRuntimeId, true, hiveOutputCondition));
}
return hs;
}
Aggregations