use of org.talend.hadoop.distribution.condition.LinkedNodeExpression in project tbd-studio-se by Talend.
the class DynamicHDPHiveOnSparkModuleGroup method init.
protected void init() {
spark1Condition = new LinkedNodeExpression(SparkBatchConstant.SPARK_BATCH_SPARKCONFIGURATION_LINKEDPARAMETER, "SUPPORTED_SPARK_VERSION", EqualityOperator.EQ, // $NON-NLS-1$
ESparkVersion.SPARK_1_6.getSparkVersion());
spark2Condition = new LinkedNodeExpression(SparkBatchConstant.SPARK_BATCH_SPARKCONFIGURATION_LINKEDPARAMETER, "SUPPORTED_SPARK_VERSION", EqualityOperator.EQ, // $NON-NLS-1$
ESparkVersion.SPARK_2_1.getSparkVersion());
}
use of org.talend.hadoop.distribution.condition.LinkedNodeExpression in project tbd-studio-se by Talend.
the class DynamicSparkStreamingKafkaClientModuleGroup 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.LinkedNodeExpression 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.LinkedNodeExpression in project tbd-studio-se by Talend.
the class ExpressionTest method testGetExpressionString.
@Test
public void testGetExpressionString() throws Exception {
Expression e1 = new BasicExpression(PARAM_1, VALUE_1, EqualityOperator.EQ);
assertEquals(e1.getExpressionString(), LEFT_PAR + PARAM_1 + EQ + SINGLE_QUOTE + VALUE_1 + SINGLE_QUOTE + RIGHT_PAR);
e1 = new BasicExpression(PARAM_1, VALUE_1, EqualityOperator.NOT_EQ);
assertEquals(e1.getExpressionString(), LEFT_PAR + PARAM_1 + NEQ + SINGLE_QUOTE + VALUE_1 + SINGLE_QUOTE + RIGHT_PAR);
e1 = new LinkedNodeExpression(SparkBatchConstant.SPARK_BATCH_SPARKCONFIGURATION_LINKEDPARAMETER, SparkBatchConstant.SPARK_BATCH_AZURE_SPARKCONFIGURATION_LINKEDPARAMETER, EqualityOperator.GE, ESparkVersion.SPARK_3_0.getSparkVersion());
// $NON-NLS-1$
assertEquals("(#LINK@NODE.SPARK_CONFIGURATION.STORAGE_CONFIGURATION ge 'SPARK_3_0_x')", e1.getExpressionString());
}
Aggregations