use of org.apache.whirr.ClusterController in project whirr by apache.
the class SolrServiceTest method beforeClass.
@BeforeClass
public static void beforeClass() throws ConfigurationException, JSchException, IOException, InterruptedException {
String solrConfigTarballDestination = "target/solrconfig.tar.gz";
Tarball.createFromDirectory("src/test/resources/conf", solrConfigTarballDestination);
LOG.info("Created Solr config tarball at " + solrConfigTarballDestination);
CompositeConfiguration config = new CompositeConfiguration();
if (System.getProperty("conf") != null) {
config.addConfiguration(new PropertiesConfiguration(System.getProperty("conf")));
}
config.addConfiguration(new PropertiesConfiguration("whirr-solr-test.properties"));
clusterSpec = ClusterSpec.withTemporaryKeys(config);
controller = new ClusterController();
cluster = controller.launchCluster(clusterSpec);
}
use of org.apache.whirr.ClusterController in project whirr by apache.
the class HadoopServiceController method startup.
public synchronized void startup() throws Exception {
LOG.info("Starting up cluster...");
CompositeConfiguration config = new CompositeConfiguration();
if (System.getProperty("config") != null) {
config.addConfiguration(new PropertiesConfiguration(System.getProperty("config")));
}
config.addConfiguration(configuration);
clusterSpec = ClusterSpec.withTemporaryKeys(config);
controller = new ClusterController();
cluster = controller.launchCluster(clusterSpec);
proxy = new HadoopProxy(clusterSpec, cluster);
proxy.start();
Configuration conf = getConfiguration();
JobConf job = new JobConf(conf, HadoopServiceController.class);
JobClient client = new JobClient(job);
waitToExitSafeMode(client);
waitForTaskTrackers(client);
running = true;
}
use of org.apache.whirr.ClusterController in project whirr by apache.
the class PuppetServiceTest 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-puppet-test.properties"));
clusterSpec = ClusterSpec.withTemporaryKeys(config);
controller = new ClusterController();
cluster = controller.launchCluster(clusterSpec);
socketTester = retry(controller.getCompute().apply(clusterSpec).utils().injector().getInstance(InetSocketAddressConnect.class), 60, 1, TimeUnit.SECONDS);
}
use of org.apache.whirr.ClusterController in project whirr by apache.
the class PigServiceTest 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("whirr-pig-test.properties"));
clusterSpec = ClusterSpec.withTemporaryKeys(config);
controller = new ClusterController();
controller.launchCluster(clusterSpec);
}
use of org.apache.whirr.ClusterController in project whirr by apache.
the class HBaseOldServiceController method startup.
public synchronized void startup() throws Exception {
LOG.info("Starting up cluster...");
CompositeConfiguration config = new CompositeConfiguration();
if (System.getProperty("config") != null) {
config.addConfiguration(new PropertiesConfiguration(System.getProperty("config")));
}
config.addConfiguration(new PropertiesConfiguration(this.configResource));
clusterSpec = ClusterSpec.withTemporaryKeys(config);
controller = new ClusterController();
cluster = controller.launchCluster(clusterSpec);
proxy = new HadoopProxy(clusterSpec, cluster);
proxy.start();
waitForMaster();
running = true;
}
Aggregations