Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public MesosDriverSupplier(final MasterConfiguration masterConfig,
@Override
public MesosSchedulerDriver get() {
if (addVMLeaseAction == null) {
logger.warn("addVMLeaseAction is null, attempt to get Mesos Driver before MesosDriverSupplier init");
throw new IllegalStateException("addVMLeaseAction must be set before creating MesosSchedulerDriver");
}

Expand All @@ -77,7 +78,8 @@ public MesosSchedulerDriver get() {
logger.info("initializing mesos scheduler driver");
final MesosSchedulerDriver mesosDriver =
new MesosSchedulerDriver(mesosSchedulerCallbackHandler, framework, masterConfig.getMasterLocation());
mesosDriverRef.compareAndSet(null, mesosDriver);
boolean result = mesosDriverRef.compareAndSet(null, mesosDriver);
logger.info("initialized mesos scheduler driver {}", result);
}

return mesosDriverRef.get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,9 @@ public void killTask(final WorkerId workerId) {
}
} catch (RuntimeException e) {
// IllegalStateException from no mesosDriver's addVMLeaseAction or NPE from mesosDriver.get() being null.
if (mesosDriver.get() == null) {
logger.warn("mesosDriver supplier returned null mesosDriver");
}
logger.error("Unexpected to see Mesos driver not initialized", e);
System.exit(2);
}
Expand All @@ -424,7 +427,8 @@ public void call() {
executor.execute(() -> {
try {
logger.info("invoking the Mesos driver run");
mesosDriver.get().run();
Protos.Status status = mesosDriver.get().run();
logger.info("MesosSchedulerDriver run status {}", status);
} catch (Exception e) {
logger.error("Failed to register Mantis Framework with Mesos", e);
System.exit(2);
Expand Down