Package com.linkedin.venice.controller
Class AdminCommandExecutionTracker
java.lang.Object
com.linkedin.venice.controller.AdminCommandExecutionTracker
This class is used to track the execution of the async admin command. Async admin command is a kind of admin
command which is sent to a parent controller and propagated through a Kafka admin topic. Eventually command would be
executed by the controller in each PROD fabric.
The context of command execution would be stored in this tracker and expired in case it lives longer than TTL. It also provides a way to check the latest execution status of given command by sending requests to remote fabric. But the checking logic is defined in a closure when the command was created.
This class is Thread-safe.
-
Constructor Summary
ConstructorDescriptionAdminCommandExecutionTracker
(String cluster, ExecutionIdAccessor executionIdAccessor, Map<String, ControllerClient> fabricToControllerClientsMap) AdminCommandExecutionTracker
(String cluster, ExecutionIdAccessor executionIdAccessor, Map<String, ControllerClient> fabricToControllerClientsMap, int executionTTLHour) -
Method Summary
Modifier and TypeMethodDescriptioncheckExecutionStatus
(long id) Check the latest status of execution in remote fabrics.createExecution
(String operation) Create an execution context of a command.long
void
startTrackingExecution
(AdminCommandExecution execution) Add execution context into local memory and expired old executions if needed.
-
Constructor Details
-
AdminCommandExecutionTracker
public AdminCommandExecutionTracker(String cluster, ExecutionIdAccessor executionIdAccessor, Map<String, ControllerClient> fabricToControllerClientsMap, int executionTTLHour) -
AdminCommandExecutionTracker
public AdminCommandExecutionTracker(String cluster, ExecutionIdAccessor executionIdAccessor, Map<String, ControllerClient> fabricToControllerClientsMap)
-
-
Method Details
-
createExecution
Create an execution context of a command. -
startTrackingExecution
Add execution context into local memory and expired old executions if needed. -
checkExecutionStatus
Check the latest status of execution in remote fabrics. -
getLastExecutionId
public long getLastExecutionId()
-