use of org.apache.commons.configuration.CompositeConfiguration in project whirr by apache.
the class DryRunModuleTest method testExecuteOnlyBootstrapForNoop.
@Test
public void testExecuteOnlyBootstrapForNoop() throws Exception {
CompositeConfiguration config = new CompositeConfiguration();
config.setProperty("whirr.provider", "stub");
config.setProperty("whirr.cluster-name", "stub-test");
config.setProperty("whirr.instance-templates", "1 noop");
config.setProperty("whirr.state-store", "memory");
ClusterSpec clusterSpec = ClusterSpec.withTemporaryKeys(config);
ClusterController controller = new ClusterController();
DryRun dryRun = getDryRunInControllerForCluster(controller, clusterSpec);
dryRun.reset();
controller.launchCluster(clusterSpec);
controller.destroyCluster(clusterSpec);
ListMultimap<NodeMetadata, Statement> perNodeExecutions = dryRun.getExecutions();
for (Entry<NodeMetadata, Collection<Statement>> entry : perNodeExecutions.asMap().entrySet()) {
assertSame("An incorrect number of scripts was executed in the node " + entry, entry.getValue().size(), 1);
}
}
use of org.apache.commons.configuration.CompositeConfiguration in project whirr by apache.
the class CassandraServiceTest method setUp.
@Before
public void setUp() throws Exception {
CompositeConfiguration config = new CompositeConfiguration();
if (System.getProperty("config") != null) {
config.addConfiguration(new PropertiesConfiguration(System.getProperty("config")));
}
config.addConfiguration(new PropertiesConfiguration("whirr-cassandra-test.properties"));
clusterSpec = ClusterSpec.withTemporaryKeys(config);
controller = new ClusterController();
cluster = controller.launchCluster(clusterSpec);
waitForCassandra();
}
use of org.apache.commons.configuration.CompositeConfiguration in project whirr by apache.
the class Cdh3ZooKeeperServiceTest method setUp.
@Before
public void setUp() throws Exception {
CompositeConfiguration config = new CompositeConfiguration();
if (System.getProperty("config") != null) {
config.addConfiguration(new PropertiesConfiguration(System.getProperty("config")));
}
config.addConfiguration(new PropertiesConfiguration("whirr-zookeeper-cdh3-test.properties"));
clusterSpec = ClusterSpec.withTemporaryKeys(config);
controller = new ClusterController();
cluster = controller.launchCluster(clusterSpec);
hosts = ZooKeeperCluster.getHosts(cluster);
}
use of org.apache.commons.configuration.CompositeConfiguration in project whirr by apache.
the class CdhHadoopServiceTest method setUp.
@BeforeClass
public static void setUp() throws Exception {
CompositeConfiguration config = new CompositeConfiguration();
if (System.getProperty("config") != null) {
config.addConfiguration(new PropertiesConfiguration(System.getProperty("config")));
}
config.addConfiguration(new PropertiesConfiguration(getPropertiesFilename()));
clusterSpec = ClusterSpec.withTemporaryKeys(config);
controller = new ClusterController();
cluster = controller.launchCluster(clusterSpec);
proxy = new HadoopProxy(clusterSpec, cluster);
proxy.start();
}
use of org.apache.commons.configuration.CompositeConfiguration in project whirr by apache.
the class CdhZooKeeperServiceTest method setUp.
@Before
public void setUp() throws Exception {
CompositeConfiguration config = new CompositeConfiguration();
if (System.getProperty("config") != null) {
config.addConfiguration(new PropertiesConfiguration(System.getProperty("config")));
}
config.addConfiguration(new PropertiesConfiguration("whirr-zookeeper-cdh-test.properties"));
clusterSpec = ClusterSpec.withTemporaryKeys(config);
controller = new ClusterController();
cluster = controller.launchCluster(clusterSpec);
hosts = ZooKeeperCluster.getHosts(cluster);
}
Aggregations