Package com.linkedin.venice.pushmonitor
Interface OfflinePushAccessor
- All Known Implementing Classes:
VeniceOfflinePushMonitorAccessor
public interface OfflinePushAccessor
Accessor to execute the CURD operations for offline push and its replicas statuses. Based on different
implementation, statuses could be recorded on Zookeeper or other persistent storage.
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
batchUpdateReplicaIncPushStatus
(String kafkaTopic, int partitionId, String instanceId, long progress, List<String> pendingReportIncPushVersionList) void
Create offline push and its partition statues on persistent storage.void
deleteOfflinePushStatusAndItsPartitionStatuses
(String kafkaTopic) Delete offline push and its partition statuses from persistent storage.getOfflinePushStatusAndItsPartitionStatuses
(String kafkaTopic) Read one offline push and its partitions status from persistent storage.getOfflinePushStatusCreationTime
(String kafkaTopic) Get the creation time of the given offline push ZK path; the creation time is set bySystem.currentTimeMillis()
.Load entire database of offline pushes including offline pushes statues and their partitions statuses from persistent storage.Load store versions of all existing push statuses on Zookeeper, without actually deserializing the contentsvoid
subscribePartitionStatusChange
(OfflinePushStatus pushStatus, PartitionStatusListener listener) Subscribe the data change of partition status.void
subscribePushStatusCreationChange
(org.apache.helix.zookeeper.zkclient.IZkChildListener childListener) Subscribe a child listener that listens to OfflinePushStatus creation/deleted.void
unsubscribePartitionsStatusChange
(OfflinePushStatus pushStatus, PartitionStatusListener listener) Unsubscribe the data change of partition status.void
unsubscribePartitionsStatusChange
(String topicName, int partitionCount, PartitionStatusListener listener) Unsubscribe the data change of partition status.void
unsubscribePushStatusCreationChange
(org.apache.helix.zookeeper.zkclient.IZkChildListener childListener) Unsubscribe a child listenervoid
updateOfflinePushStatus
(OfflinePushStatus pushStatus) Update status of the given offline push to persistent storage.void
updateReplicaStatus
(String kafkaTopic, int partitionId, String instanceId, ExecutionStatus status, long progress, String message) Update one particular replica status and progress by given topic, partition and instanceId to the persistent storage.void
updateReplicaStatus
(String kafkaTopic, int partitionId, String instanceId, ExecutionStatus status, String message) Update one particular replica status only by given topic, partition and instanceId to the persistent storage.
-
Method Details
-
loadOfflinePushStatusesAndPartitionStatuses
List<OfflinePushStatus> loadOfflinePushStatusesAndPartitionStatuses()Load entire database of offline pushes including offline pushes statues and their partitions statuses from persistent storage. -
loadOfflinePushStatusPaths
Load store versions of all existing push statuses on Zookeeper, without actually deserializing the contents -
getOfflinePushStatusAndItsPartitionStatuses
Read one offline push and its partitions status from persistent storage. -
getOfflinePushStatusCreationTime
Get the creation time of the given offline push ZK path; the creation time is set bySystem.currentTimeMillis()
. If the path does not exist or error when trying to get creation time, return an empty Optional. -
updateOfflinePushStatus
Update status of the given offline push to persistent storage. -
createOfflinePushStatusAndItsPartitionStatuses
Create offline push and its partition statues on persistent storage. -
deleteOfflinePushStatusAndItsPartitionStatuses
Delete offline push and its partition statuses from persistent storage.- Parameters:
kafkaTopic
- version topic
-
updateReplicaStatus
void updateReplicaStatus(String kafkaTopic, int partitionId, String instanceId, ExecutionStatus status, long progress, String message) Update one particular replica status and progress by given topic, partition and instanceId to the persistent storage. -
updateReplicaStatus
void updateReplicaStatus(String kafkaTopic, int partitionId, String instanceId, ExecutionStatus status, String message) Update one particular replica status only by given topic, partition and instanceId to the persistent storage. -
batchUpdateReplicaIncPushStatus
-
subscribePartitionStatusChange
Subscribe the data change of partition status. -
unsubscribePartitionsStatusChange
void unsubscribePartitionsStatusChange(OfflinePushStatus pushStatus, PartitionStatusListener listener) Unsubscribe the data change of partition status.- Parameters:
pushStatus
-listener
-
-
unsubscribePartitionsStatusChange
void unsubscribePartitionsStatusChange(String topicName, int partitionCount, PartitionStatusListener listener) Unsubscribe the data change of partition status. -
subscribePushStatusCreationChange
void subscribePushStatusCreationChange(org.apache.helix.zookeeper.zkclient.IZkChildListener childListener) Subscribe a child listener that listens to OfflinePushStatus creation/deleted. -
unsubscribePushStatusCreationChange
void unsubscribePushStatusCreationChange(org.apache.helix.zookeeper.zkclient.IZkChildListener childListener) Unsubscribe a child listener
-