Skip to content

Commit

Permalink
We're not declining tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil Winder committed Sep 10, 2015
1 parent 49d8b66 commit 117cd0e
Showing 1 changed file with 4 additions and 3 deletions.
Expand Up @@ -42,9 +42,9 @@ public Map<String, Task> getTasks() {

public void run() {
LOGGER.info("Starting ElasticSearch on Mesos - [numHwNodes: " + configuration.getElasticsearchNodes() +
", zk mesos: " + configuration.getMesosZKURL() +
", zk framework: " + configuration.getFrameworkZKURL() +
", ram:" + configuration.getMem() + "]");
", zk mesos: " + configuration.getMesosZKURL() +
", zk framework: " + configuration.getFrameworkZKURL() +
", ram:" + configuration.getMem() + "]");

FrameworkInfoFactory frameworkInfoFactory = new FrameworkInfoFactory(configuration);
final Protos.FrameworkInfo.Builder frameworkBuilder = frameworkInfoFactory.getBuilder();
Expand Down Expand Up @@ -98,6 +98,7 @@ public void resourceOffers(SchedulerDriver driver, List<Protos.Offer> offers) {
driver.declineOffer(offer.getId()); // DCOS certification 05
} else if (taskList.size() > configuration.getElasticsearchNodes()) {
killLastStartedExecutor(driver);
driver.declineOffer(offer.getId()); // DCOS certification 05
} else if (isHostAlreadyRunningTask(offer)) {
LOGGER.info("Declined offer: Host " + offer.getHostname() + " is already running an Elastisearch task");
driver.declineOffer(offer.getId()); // DCOS certification 05
Expand Down

0 comments on commit 117cd0e

Please sign in to comment.