use of org.talend.hadoop.distribution.condition.BasicExpression 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.BasicExpression 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;
}
use of org.talend.hadoop.distribution.condition.BasicExpression in project tbd-studio-se by Talend.
the class DynamicCDHMapReduceModuleGroup method getModuleGroups.
@Override
public Set<DistributionModuleGroup> getModuleGroups() throws Exception {
Set<DistributionModuleGroup> moduleGroups = new HashSet<>();
Set<DistributionModuleGroup> moduleGroupsFromSuper = super.getModuleGroups();
if (moduleGroupsFromSuper != null && !moduleGroupsFromSuper.isEmpty()) {
moduleGroups.addAll(moduleGroupsFromSuper);
}
ComponentCondition conditionUseNavigator = new SimpleComponentCondition(new BasicExpression(MRConstant.USE_CLOUDERA_NAVIGATOR));
String talendClouderaNaviRuntimeId = getPluginAdapter().getRuntimeModuleGroupIdByTemplateId(DynamicCDHModuleGroupConstant.TALEND_CLOUDERA_CDH_NAVIGATOR.getModuleName());
checkRuntimeId(talendClouderaNaviRuntimeId);
if (StringUtils.isNotBlank(talendClouderaNaviRuntimeId)) {
moduleGroups.add(new DistributionModuleGroup(talendClouderaNaviRuntimeId, true, conditionUseNavigator));
}
return moduleGroups;
}
use of org.talend.hadoop.distribution.condition.BasicExpression 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()));
}
use of org.talend.hadoop.distribution.condition.BasicExpression 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;
}
Aggregations