Search in sources :

Example 6 with OperationFuture

use of com.linkedin.kafka.cruisecontrol.servlet.handler.async.runnable.OperationFuture in project cruise-control by linkedin.

the class ProposalsRequest method handle.

@Override
protected OperationFuture handle(String uuid) {
    OperationFuture future = new OperationFuture("Get customized proposals");
    pending(future.operationProgress());
    _asyncKafkaCruiseControl.sessionExecutor().submit(new ProposalsRunnable(_asyncKafkaCruiseControl, future, _parameters));
    return future;
}
Also used : ProposalsRunnable(com.linkedin.kafka.cruisecontrol.servlet.handler.async.runnable.ProposalsRunnable) OperationFuture(com.linkedin.kafka.cruisecontrol.servlet.handler.async.runnable.OperationFuture)

Example 7 with OperationFuture

use of com.linkedin.kafka.cruisecontrol.servlet.handler.async.runnable.OperationFuture in project cruise-control by linkedin.

the class DemoteRequest method handle.

@Override
protected OperationFuture handle(String uuid) {
    OperationFuture future = new OperationFuture("Demote");
    pending(future.operationProgress());
    _asyncKafkaCruiseControl.sessionExecutor().submit(new DemoteBrokerRunnable(_asyncKafkaCruiseControl, future, uuid, _parameters));
    return future;
}
Also used : OperationFuture(com.linkedin.kafka.cruisecontrol.servlet.handler.async.runnable.OperationFuture) DemoteBrokerRunnable(com.linkedin.kafka.cruisecontrol.servlet.handler.async.runnable.DemoteBrokerRunnable)

Example 8 with OperationFuture

use of com.linkedin.kafka.cruisecontrol.servlet.handler.async.runnable.OperationFuture in project cruise-control by linkedin.

the class PartitionLoadRequest method handle.

@Override
protected OperationFuture handle(String uuid) {
    OperationFuture future = new OperationFuture(String.format("Get partition load from %d to %d", _parameters.startMs(), _parameters.endMs()));
    pending(future.operationProgress());
    _asyncKafkaCruiseControl.sessionExecutor().submit(new PartitionLoadRunnable(_asyncKafkaCruiseControl, future, _parameters));
    return future;
}
Also used : OperationFuture(com.linkedin.kafka.cruisecontrol.servlet.handler.async.runnable.OperationFuture) PartitionLoadRunnable(com.linkedin.kafka.cruisecontrol.servlet.handler.async.runnable.PartitionLoadRunnable)

Example 9 with OperationFuture

use of com.linkedin.kafka.cruisecontrol.servlet.handler.async.runnable.OperationFuture in project cruise-control by linkedin.

the class RebalanceRequest method handle.

@Override
protected OperationFuture handle(String uuid) {
    OperationFuture future = new OperationFuture("Rebalance");
    pending(future.operationProgress());
    _asyncKafkaCruiseControl.sessionExecutor().submit(new RebalanceRunnable(_asyncKafkaCruiseControl, future, _parameters, uuid));
    return future;
}
Also used : OperationFuture(com.linkedin.kafka.cruisecontrol.servlet.handler.async.runnable.OperationFuture) RebalanceRunnable(com.linkedin.kafka.cruisecontrol.servlet.handler.async.runnable.RebalanceRunnable)

Example 10 with OperationFuture

use of com.linkedin.kafka.cruisecontrol.servlet.handler.async.runnable.OperationFuture in project cruise-control by linkedin.

the class AddBrokerRequest method handle.

@Override
protected OperationFuture handle(String uuid) {
    OperationFuture future = new OperationFuture("Add brokers");
    pending(future.operationProgress());
    _asyncKafkaCruiseControl.sessionExecutor().submit(new AddBrokersRunnable(_asyncKafkaCruiseControl, future, _parameters, uuid));
    return future;
}
Also used : OperationFuture(com.linkedin.kafka.cruisecontrol.servlet.handler.async.runnable.OperationFuture) AddBrokersRunnable(com.linkedin.kafka.cruisecontrol.servlet.handler.async.runnable.AddBrokersRunnable)

Aggregations

OperationFuture (com.linkedin.kafka.cruisecontrol.servlet.handler.async.runnable.OperationFuture)21 HttpServletRequest (javax.servlet.http.HttpServletRequest)8 HashMap (java.util.HashMap)7 UUID (java.util.UUID)7 HttpServletResponse (javax.servlet.http.HttpServletResponse)7 Map (java.util.Map)6 TimeUnit (java.util.concurrent.TimeUnit)6 HttpSession (javax.servlet.http.HttpSession)6 MockTime (kafka.utils.MockTime)6 Test (org.junit.Test)6 GET_METHOD (com.linkedin.kafka.cruisecontrol.servlet.KafkaCruiseControlServletUtils.GET_METHOD)5 Collections (java.util.Collections)5 Time (org.apache.kafka.common.utils.Time)5 Capture (org.easymock.Capture)5 EasyMock (org.easymock.EasyMock)5 Assert (org.junit.Assert)5 CruiseControlResponse (com.linkedin.cruisecontrol.servlet.response.CruiseControlResponse)2 ArrayList (java.util.ArrayList)2 Timer (com.codahale.metrics.Timer)1 Gson (com.google.gson.Gson)1