use of org.talend.hadoop.distribution.DistributionModuleGroup in project tbd-studio-se by Talend.
the class DBR640SparkBatchAzureNodeModuleGroupTest method testModuleGroups.
@Test
public void testModuleGroups() throws Exception {
Map<String, String> expected = new HashMap<>();
expected.put(DBR640Constant.SPARK_AZURE_LIB_MRREQUIRED_DBR640.getModuleName(), // $NON-NLS-1$
"((#LINK@NODE.STORAGE_CONFIGURATION.DISTRIBUTION=='DATABRICKS') AND (#LINK@NODE.STORAGE_CONFIGURATION.SPARK_VERSION=='Databricks_6_4')) AND (#LINK@NODE.STORAGE_CONFIGURATION.SPARK_LOCAL_MODE=='false')");
Set<DistributionModuleGroup> moduleGroups = DBR640AzureNodeModuleGroup.getModuleGroups(DBR640Distribution.DISTRIBUTION_NAME, DBR640Distribution.VERSION);
assertEquals(expected.size(), moduleGroups.size());
for (DistributionModuleGroup module : moduleGroups) {
// $NON-NLS-1$
assertTrue("Should contain module " + module.getModuleName(), expected.containsKey(module.getModuleName()));
if (expected.get(module.getModuleName()) == null) {
assertTrue(// $NON-NLS-1$ //$NON-NLS-2$
"The condition of the module " + module.getModuleName() + " is not null.", expected.get(module.getModuleName()) == null);
} else {
assertTrue(// $NON-NLS-1$ //$NON-NLS-2$
"The condition of the module " + module.getModuleName() + " is null, but it should be " + expected.get(module.getModuleName()) + ".", // $NON-NLS-1$
expected.get(module.getModuleName()) != null);
// assertEquals(expected.get(module.getModuleName()), module.getRequiredIf().getConditionString());
}
}
}
use of org.talend.hadoop.distribution.DistributionModuleGroup in project tbd-studio-se by Talend.
the class DBR550HiveOnSparkModuleGroupTest method testModuleGroups.
@Test
public void testModuleGroups() throws Exception {
Map<String, String> results = new HashMap<>();
results.put(DBR550Constant.SPARK_HIVE_MRREQUIRED_MODULE_GROUP.getModuleName(), null);
Set<DistributionModuleGroup> moduleGroups = DBR550HiveOnSparkModuleGroup.getModuleGroups();
assertEquals(results.size(), moduleGroups.size());
moduleGroups.iterator();
for (DistributionModuleGroup module : moduleGroups) {
// $NON-NLS-1$
assertTrue("Should contain module " + module.getModuleName(), results.containsKey(module.getModuleName()));
if (results.get(module.getModuleName()) == null) {
assertTrue(// $NON-NLS-1$ //$NON-NLS-2$
"The condition of the module " + module.getModuleName() + " is not null.", results.get(module.getModuleName()) == null);
} else {
assertTrue(// $NON-NLS-1$ //$NON-NLS-2$
"The condition of the module " + module.getModuleName() + " is null, but it should be " + results.get(module.getModuleName()) + ".", // $NON-NLS-1$
results.get(module.getModuleName()) != null);
assertEquals(results.get(module.getModuleName()), module.getRequiredIf().getConditionString());
}
}
}
use of org.talend.hadoop.distribution.DistributionModuleGroup in project tbd-studio-se by Talend.
the class EMR5290SparkBatchModuleGroupTest method testModuleGroups.
@Test
public void testModuleGroups() throws Exception {
Map<String, String> results = new HashMap<>();
results.put(EMR5290Constant.SPARK_MODULE_GROUP.getModuleName(), null);
Set<DistributionModuleGroup> moduleGroups = EMR5290SparkBatchModuleGroup.getModuleGroups();
assertEquals(results.size(), moduleGroups.size());
for (DistributionModuleGroup module : moduleGroups) {
// $NON-NLS-1$
assertTrue("Should contain module " + module.getModuleName(), results.containsKey(module.getModuleName()));
if (results.get(module.getModuleName()) == null) {
assertTrue(// $NON-NLS-1$ //$NON-NLS-2$
"The condition of the module " + module.getModuleName() + " is not null.", results.get(module.getModuleName()) == null);
} else {
assertTrue(// $NON-NLS-1$ //$NON-NLS-2$
"The condition of the module " + module.getModuleName() + " is null, but it should be " + results.get(module.getModuleName()) + ".", // $NON-NLS-1$
results.get(module.getModuleName()) != null);
assertEquals(results.get(module.getModuleName()), module.getRequiredIf().getConditionString());
}
}
}
use of org.talend.hadoop.distribution.DistributionModuleGroup in project tbd-studio-se by Talend.
the class EMR5290SparkBatchS3NodeModuleGroupTest method testModuleGroups.
@Test
public void testModuleGroups() throws Exception {
Map<String, String> results = new HashMap<>();
results.put(EMR5290Constant.S3_MODULE_GROUP.getModuleName(), // $NON-NLS-1$
"((#LINK@NODE." + SparkBatchConstant.SPARK_BATCH_S3_SPARKCONFIGURATION_LINKEDPARAMETER + ".DISTRIBUTION == 'AMAZON_EMR') AND (#LINK@NODE." + SparkBatchConstant.SPARK_BATCH_S3_SPARKCONFIGURATION_LINKEDPARAMETER + ".SPARK_VERSION == 'EMR_5_29_0'))");
Set<DistributionModuleGroup> moduleGroups = EMR5290SparkBatchS3NodeModuleGroup.getModuleGroups(EMR5290Distribution.DISTRIBUTION_NAME, EMR5290Distribution.VERSION);
assertEquals(results.size(), moduleGroups.size());
for (DistributionModuleGroup module : moduleGroups) {
// $NON-NLS-1$
assertTrue("Should contain module " + module.getModuleName(), results.containsKey(module.getModuleName()));
if (results.get(module.getModuleName()) == null) {
assertTrue(// $NON-NLS-1$ //$NON-NLS-2$
"The condition of the module " + module.getModuleName() + " is not null.", results.get(module.getModuleName()) == null);
} else {
assertTrue(// $NON-NLS-1$ //$NON-NLS-2$
"The condition of the module " + module.getModuleName() + " is null, but it should be " + results.get(module.getModuleName()) + ".", // $NON-NLS-1$
results.get(module.getModuleName()) != null);
assertEquals(results.get(module.getModuleName()), module.getRequiredIf().getConditionString());
}
}
}
use of org.talend.hadoop.distribution.DistributionModuleGroup in project tbd-studio-se by Talend.
the class DBR640HiveOnSparkModuleGroupTest method testModuleGroups.
@Test
public void testModuleGroups() throws Exception {
Map<String, String> results = new HashMap<>();
results.put(DBR640Constant.HIVEONSPARK_LIB_MRREQUIRED_DBR640.getModuleName(), null);
Set<DistributionModuleGroup> moduleGroups = DBR640HiveOnSparkModuleGroup.getModuleGroups();
assertEquals(results.size(), moduleGroups.size());
moduleGroups.iterator();
for (DistributionModuleGroup module : moduleGroups) {
// $NON-NLS-1$
assertTrue("Should contain module " + module.getModuleName(), results.containsKey(module.getModuleName()));
if (results.get(module.getModuleName()) == null) {
assertTrue(// $NON-NLS-1$ //$NON-NLS-2$
"The condition of the module " + module.getModuleName() + " is not null.", results.get(module.getModuleName()) == null);
} else {
assertTrue(// $NON-NLS-1$ //$NON-NLS-2$
"The condition of the module " + module.getModuleName() + " is null, but it should be " + results.get(module.getModuleName()) + ".", // $NON-NLS-1$
results.get(module.getModuleName()) != null);
assertEquals(results.get(module.getModuleName()), module.getRequiredIf().getConditionString());
}
}
}
Aggregations