Search in sources :

Example 21 with MultiComponentCondition

use of org.talend.hadoop.distribution.condition.MultiComponentCondition 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())))));
}
Also used : BasicExpression(org.talend.hadoop.distribution.condition.BasicExpression) SimpleComponentCondition(org.talend.hadoop.distribution.condition.SimpleComponentCondition) MultiComponentCondition(org.talend.hadoop.distribution.condition.MultiComponentCondition)

Example 22 with MultiComponentCondition

use of org.talend.hadoop.distribution.condition.MultiComponentCondition in project tbd-studio-se by Talend.

the class DynamicCDHSparkBatchModuleGroup method initConditions.

@Override
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_2.getSparkVersion()), BooleanOperator.OR, // $NON-NLS-1$
    new BasicExpression("SUPPORTED_SPARK_VERSION", EqualityOperator.EQ, ESparkVersion.SPARK_2_4_X.getSparkVersion()));
}
Also used : BasicExpression(org.talend.hadoop.distribution.condition.BasicExpression) SimpleComponentCondition(org.talend.hadoop.distribution.condition.SimpleComponentCondition) MultiComponentCondition(org.talend.hadoop.distribution.condition.MultiComponentCondition)

Example 23 with MultiComponentCondition

use of org.talend.hadoop.distribution.condition.MultiComponentCondition 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;
}
Also used : BasicExpression(org.talend.hadoop.distribution.condition.BasicExpression) SparkBatchLinkedNodeCondition(org.talend.hadoop.distribution.condition.common.SparkBatchLinkedNodeCondition) MultiComponentCondition(org.talend.hadoop.distribution.condition.MultiComponentCondition) DistributionModuleGroup(org.talend.hadoop.distribution.DistributionModuleGroup) HashSet(java.util.HashSet)

Example 24 with MultiComponentCondition

use of org.talend.hadoop.distribution.condition.MultiComponentCondition 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;
}
Also used : SparkStreamingLinkedNodeCondition(org.talend.hadoop.distribution.condition.common.SparkStreamingLinkedNodeCondition) BasicExpression(org.talend.hadoop.distribution.condition.BasicExpression) MultiComponentCondition(org.talend.hadoop.distribution.condition.MultiComponentCondition) DistributionModuleGroup(org.talend.hadoop.distribution.DistributionModuleGroup) HashSet(java.util.HashSet)

Aggregations

MultiComponentCondition (org.talend.hadoop.distribution.condition.MultiComponentCondition)24 SimpleComponentCondition (org.talend.hadoop.distribution.condition.SimpleComponentCondition)18 BasicExpression (org.talend.hadoop.distribution.condition.BasicExpression)14 HashSet (java.util.HashSet)13 DistributionModuleGroup (org.talend.hadoop.distribution.DistributionModuleGroup)12 ComponentCondition (org.talend.hadoop.distribution.condition.ComponentCondition)12 NestedComponentCondition (org.talend.hadoop.distribution.condition.NestedComponentCondition)9 DynamicPluginAdapter (org.talend.hadoop.distribution.dynamic.adapter.DynamicPluginAdapter)7 SparkStreamingLinkedNodeCondition (org.talend.hadoop.distribution.condition.common.SparkStreamingLinkedNodeCondition)6 ShowExpression (org.talend.hadoop.distribution.condition.ShowExpression)4 Expression (org.talend.hadoop.distribution.condition.Expression)3 LinkedNodeExpression (org.talend.hadoop.distribution.condition.LinkedNodeExpression)3 Set (java.util.Set)2 RawExpression (org.talend.hadoop.distribution.condition.RawExpression)2 SparkBatchLinkedNodeCondition (org.talend.hadoop.distribution.condition.common.SparkBatchLinkedNodeCondition)2 HashMap (java.util.HashMap)1 LinkedHashSet (java.util.LinkedHashSet)1 Map (java.util.Map)1 Test (org.junit.Test)1 ComponentType (org.talend.hadoop.distribution.ComponentType)1