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 Detail

      • loadOfflinePushStatusesAndPartitionStatuses

        java.util.List<OfflinePushStatus> loadOfflinePushStatusesAndPartitionStatuses()
        Load entire database of offline pushes including offline pushes statues and their partitions statuses from persistent storage.
      • loadOfflinePushStatusPaths

        java.util.List<java.lang.String> loadOfflinePushStatusPaths()
        Load store versions of all existing push statuses on Zookeeper, without actually deserializing the contents
      • getOfflinePushStatusAndItsPartitionStatuses

        OfflinePushStatus getOfflinePushStatusAndItsPartitionStatuses​(java.lang.String kafkaTopic)
        Read one offline push and its partitions status from persistent storage.
      • getOfflinePushStatusCreationTime

        java.util.Optional<java.lang.Long> getOfflinePushStatusCreationTime​(java.lang.String kafkaTopic)
        Get the creation time of the given offline push ZK path; the creation time is set by System.currentTimeMillis(). If the path does not exist or error when trying to get creation time, return an empty Optional.
      • updateOfflinePushStatus

        void updateOfflinePushStatus​(OfflinePushStatus pushStatus)
        Update status of the given offline push to persistent storage.
      • createOfflinePushStatusAndItsPartitionStatuses

        void createOfflinePushStatusAndItsPartitionStatuses​(OfflinePushStatus pushStatus)
        Create offline push and its partition statues on persistent storage.
      • deleteOfflinePushStatusAndItsPartitionStatuses

        void deleteOfflinePushStatusAndItsPartitionStatuses​(java.lang.String kafkaTopic)
        Delete offline push and its partition statuses from persistent storage.
        Parameters:
        kafkaTopic - version topic
      • updateReplicaStatus

        void updateReplicaStatus​(java.lang.String kafkaTopic,
                                 int partitionId,
                                 java.lang.String instanceId,
                                 ExecutionStatus status,
                                 long progress,
                                 java.lang.String message)
        Update one particular replica status and progress by given topic, partition and instanceId to the persistent storage.
      • updateReplicaStatus

        void updateReplicaStatus​(java.lang.String kafkaTopic,
                                 int partitionId,
                                 java.lang.String instanceId,
                                 ExecutionStatus status,
                                 java.lang.String message)
        Update one particular replica status only by given topic, partition and instanceId to the persistent storage.
      • unsubscribePartitionsStatusChange

        void unsubscribePartitionsStatusChange​(OfflinePushStatus pushStatus,
                                               PartitionStatusListener listener)
        Unsubscribe the data change of partition status.
        Parameters:
        pushStatus -
        listener -
      • unsubscribePartitionsStatusChange

        void unsubscribePartitionsStatusChange​(java.lang.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