use of org.talend.hadoop.distribution.condition.BasicExpression in project tbd-studio-se by Talend.
the class EMR5290SparkStreamingSqlRowHiveNodeModuleGroup 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 SparkStreamingLinkedNodeCondition(distribution, version).getCondition(), BooleanOperator.AND, new BasicExpression("SQL_CONTEXT", EqualityOperator.EQ, "HiveContext")));
hs.add(dmg);
return hs;
}
use of org.talend.hadoop.distribution.condition.BasicExpression in project tbd-studio-se by Talend.
the class EMR5290SqoopModuleGroup method getModuleGroups.
public static Set<DistributionModuleGroup> getModuleGroups() {
Set<DistributionModuleGroup> hs = new HashSet<>();
hs.add(new DistributionModuleGroup(EMR5290Constant.SQOOP_MODULE_GROUP.getModuleName()));
hs.add(new DistributionModuleGroup(EMR5290Constant.MAPREDUCE_MODULE_GROUP.getModuleName()));
hs.add(new DistributionModuleGroup(EMR5290Constant.HDFS_MODULE_GROUP.getModuleName()));
ComponentCondition parquetOutputCondition = new SimpleComponentCondition(new BasicExpression(SqoopConstant.FILE_FORMAT, EqualityOperator.EQ, SqoopConstant.PAQUET_OUTPUT_FORMAT));
hs.add(new DistributionModuleGroup(EMR5290Constant.SQOOP_PARQUET_MODULE_GROUP.getModuleName(), true, parquetOutputCondition));
return hs;
}
use of org.talend.hadoop.distribution.condition.BasicExpression 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