Package com.linkedin.venice.controller
Class ZkExecutionIdAccessor
java.lang.Object
com.linkedin.venice.controller.ZkExecutionIdAccessor
- All Implemented Interfaces:
ExecutionIdAccessor
-
Constructor Summary
ConstructorDescriptionZkExecutionIdAccessor
(org.apache.helix.zookeeper.impl.client.ZkClient zkClient, HelixAdapterSerializer adapterSerializer) -
Method Summary
Modifier and TypeMethodDescriptiongetLastGeneratedExecutionId
(String clusterName) Get the last id which is generated by execution tracker in the give cluster.getLastSucceededExecutionId
(String clusterName) Get the id for the last succeed operation in the given cluster.getLastSucceededExecutionIdMap
(String clusterName) Get the execution id map that contains the last succeeded operation in the given cluster for each store.incrementAndGetExecutionId
(String clusterName) Using AtomicLong here only as a workaround to get next execution id fromHelixUtils.compareAndUpdate(ZkBaseDataAccessor, String, int, DataUpdater)
void
updateLastGeneratedExecutionId
(String clusterName, Long lastGeneratedExecutionId) Update the last id which is generated by execution tracker in the given cluster.void
updateLastSucceededExecutionId
(String clusterName, Long lastSucceedExecutionId) Update the id of the last succeed operation in the given cluster.void
updateLastSucceededExecutionIdMap
(String clusterName, String storeName, Long lastSucceededExecutionId) Update the execution id map that contains the last succeeded operation in the given cluster for each store.
-
Constructor Details
-
ZkExecutionIdAccessor
public ZkExecutionIdAccessor(org.apache.helix.zookeeper.impl.client.ZkClient zkClient, HelixAdapterSerializer adapterSerializer)
-
-
Method Details
-
getLastSucceededExecutionId
Description copied from interface:ExecutionIdAccessor
Get the id for the last succeed operation in the given cluster.- Specified by:
getLastSucceededExecutionId
in interfaceExecutionIdAccessor
- See Also:
-
updateLastSucceededExecutionId
Description copied from interface:ExecutionIdAccessor
Update the id of the last succeed operation in the given cluster.- Specified by:
updateLastSucceededExecutionId
in interfaceExecutionIdAccessor
- See Also:
-
getLastSucceededExecutionIdMap
Description copied from interface:ExecutionIdAccessor
Get the execution id map that contains the last succeeded operation in the given cluster for each store.- Specified by:
getLastSucceededExecutionIdMap
in interfaceExecutionIdAccessor
- See Also:
-
updateLastSucceededExecutionIdMap
public void updateLastSucceededExecutionIdMap(String clusterName, String storeName, Long lastSucceededExecutionId) Description copied from interface:ExecutionIdAccessor
Update the execution id map that contains the last succeeded operation in the given cluster for each store.- Specified by:
updateLastSucceededExecutionIdMap
in interfaceExecutionIdAccessor
- See Also:
-
getLastGeneratedExecutionId
Description copied from interface:ExecutionIdAccessor
Get the last id which is generated by execution tracker in the give cluster.- Specified by:
getLastGeneratedExecutionId
in interfaceExecutionIdAccessor
- See Also:
-
updateLastGeneratedExecutionId
Description copied from interface:ExecutionIdAccessor
Update the last id which is generated by execution tracker in the given cluster.- Specified by:
updateLastGeneratedExecutionId
in interfaceExecutionIdAccessor
- See Also:
-
incrementAndGetExecutionId
Using AtomicLong here only as a workaround to get next execution id fromHelixUtils.compareAndUpdate(ZkBaseDataAccessor, String, int, DataUpdater)
- Specified by:
incrementAndGetExecutionId
in interfaceExecutionIdAccessor
- Returns:
- updated execution id.
- Throws:
ZkDataAccessException
- will be thrown if it fails to update the data
-