Skip to content

Commit

Permalink
Reverted minimesos to 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Westergaard Lassen authored and mwl committed Jan 29, 2016
1 parent c1b23fa commit ffcb95d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ext {
// System test
dockerJavaVer = "4f094c112";
unirestVer = "1.4.7"
minimesosVer = "db0abe511995bd87d1c76747f9e7417d1f875050"
minimesosVer = "0.5.0"
elasticsearchVer = "1.7.3"
javaxInjectVer = "1";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static void main(String[] args) throws InterruptedException {

MesosCluster cluster = new MesosCluster(ClusterUtil.withSlaves(1, zooKeeper -> new LogstashMesosSlave(dockerClient, zooKeeper)).withMaster().build());

cluster.start(5);
cluster.start();

/*
LOGGER.info("Starting scheduler");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static void publishExecutorInMesosCluster() throws IOException {
clusterDockerClient = DockerClientBuilder.getInstance(dockerConfigBuilder.build()).build();

LogstashSchedulerContainer schedulerContainer = new LogstashSchedulerContainer(clusterDockerClient, cluster.getMesosMasterContainer().getIpAddress(), null, null);
schedulerContainer.start(60);
schedulerContainer.start();
}

@Before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void testDeploymentDocker() throws JsonParseException, UnirestException,
String zookeeperIpAddress = cluster.getZkContainer().getIpAddress();
scheduler = Optional.of(new LogstashSchedulerContainer(dockerClient, zookeeperIpAddress, null, null));
scheduler.get().setDocker(true);
cluster.addAndStartContainer(scheduler.get(), 60);
cluster.addAndStartContainer(scheduler.get());

waitForFramework();
}
Expand All @@ -100,7 +100,7 @@ public void testDeploymentDocker() throws JsonParseException, UnirestException,
public void testDeploymentJar() throws JsonParseException, UnirestException, JsonMappingException {
String zookeeperIpAddress = cluster.getZkContainer().getIpAddress();
scheduler = Optional.of(new LogstashSchedulerContainer(dockerClient, zookeeperIpAddress, null, null));
cluster.addAndStartContainer(scheduler.get(), 60);
cluster.addAndStartContainer(scheduler.get());

waitForFramework();
}
Expand Down Expand Up @@ -142,7 +142,7 @@ protected CreateContainerCmd dockerCommand() {
return dockerClient.createContainerCmd("elasticsearch:" + version).withCmd("elasticsearch", "-Des.cluster.name=\"" + elasticsearchClusterName + "\"", "-Des.discovery.zen.ping.multicast.enabled=false");
}
};
cluster.addAndStartContainer(elasticsearchInstance, 9999);
cluster.addAndStartContainer(elasticsearchInstance);

final int elasticsearchPort = 9300;

Expand All @@ -162,7 +162,7 @@ protected CreateContainerCmd dockerCommand() {

scheduler = Optional.of(new LogstashSchedulerContainer(dockerClient, zookeeperIpAddress, "logstash", "http://" + elasticsearchInstance.getIpAddress() + ":" + 9200));
scheduler.get().enableSyslog();
cluster.addAndStartContainer(scheduler.get(), 9999);
cluster.addAndStartContainer(scheduler.get());

waitForFramework();

Expand Down Expand Up @@ -214,11 +214,11 @@ public void willAddExecutorOnNewNodes() throws JsonParseException, UnirestExcept
String zookeeperIpAddress = cluster.getZkContainer().getIpAddress();
scheduler = Optional.of(new LogstashSchedulerContainer(dockerClient, zookeeperIpAddress, null, null));
scheduler.get().setDocker(true);
cluster.addAndStartContainer(scheduler.get(), 60);
cluster.addAndStartContainer(scheduler.get());

waitForFramework();

IntStream.range(0, 2).forEach(value -> cluster.addAndStartContainer(new LogstashMesosSlave(dockerClient, cluster.getZkContainer()), 60));
IntStream.range(0, 2).forEach(value -> cluster.addAndStartContainer(new LogstashMesosSlave(dockerClient, cluster.getZkContainer())));

await().atMost(1, TimeUnit.MINUTES).pollInterval(1, TimeUnit.SECONDS).until(
() -> State.fromJSON(cluster.getStateInfoJSON().toString()).getFramework("logstash").getTasks().stream().filter(task -> task.getState().equals("TASK_RUNNING")).count() == 3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private void run() throws Exception {

DummyFrameworkContainer dummyFrameworkContainer = new DummyFrameworkContainer(
clusterDockerClient, "dummy-framework");
dummyFrameworkContainer.start(5);
dummyFrameworkContainer.start();

System.setProperty("mesos.zk", cluster.getZkUrl());
System.setProperty("mesos.logstash.logstash.heap.size", "128");
Expand Down

0 comments on commit ffcb95d

Please sign in to comment.