@POST @Path("/abort") @ApiOperation("Abort the Mesos scheduler driver.") public void abort() { checkForbidden( configuration.isAllowTestResourceCalls(), "Test resource calls are disabled (set isAllowTestResourceCalls to true in configuration)"); abort.abort(AbortReason.TEST_ABORT, Optional.<Throwable>absent()); }
@POST @Path("/notleader") @ApiOperation("Make this instanceo of Singularity believe it's lost leadership.") public void setNotLeader() { checkForbidden( configuration.isAllowTestResourceCalls(), "Test resource calls are disabled (set isAllowTestResourceCalls to true in configuration)"); managed.notLeader(); }
@POST @Path("/stop") @ApiOperation("Stop the Mesos scheduler driver.") public void stop() throws Exception { checkForbidden( configuration.isAllowTestResourceCalls(), "Test resource calls are disabled (set isAllowTestResourceCalls to true in configuration)"); managed.stop(); }
@POST @Path("/scheduler/statusUpdate/{taskId}/{taskState}") @ApiOperation("Force an update for a specific task.") public void statusUpdate( @PathParam("taskId") String taskId, @PathParam("taskState") String taskState) { checkForbidden( configuration.isAllowTestResourceCalls(), "Test resource calls are disabled (set isAllowTestResourceCalls to true in configuration)"); driver .getScheduler() .statusUpdate( null, TaskStatus.newBuilder() .setTaskId(TaskID.newBuilder().setValue(taskId)) .setState(TaskState.valueOf(taskState)) .build()); }