Interface StoreCleaner

  • All Known Implementing Classes:
    VeniceHelixAdmin

    public interface StoreCleaner
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean containsHelixResource​(java.lang.String clusterName, java.lang.String resourceName)
      This purpose of the function is to check if the given resource exists in the Helix cluster.
      void deleteHelixResource​(java.lang.String clusterName, java.lang.String resourceName)
      This purpose of the function is to delete the given resource from the Helix cluster.
      void deleteOneStoreVersion​(java.lang.String clusterName, java.lang.String storeName, int versionNumber)  
      void retireOldStoreVersions​(java.lang.String clusterName, java.lang.String storeName, boolean deleteBackupOnStartPush, int currentVersionBeforePush)  
      void topicCleanupWhenPushComplete​(java.lang.String clusterName, java.lang.String storeName, int versionNumber)
      This purpose of this function is to execute some topic related cleanup when push job is completed.
    • Method Detail

      • deleteOneStoreVersion

        void deleteOneStoreVersion​(java.lang.String clusterName,
                                   java.lang.String storeName,
                                   int versionNumber)
      • retireOldStoreVersions

        void retireOldStoreVersions​(java.lang.String clusterName,
                                    java.lang.String storeName,
                                    boolean deleteBackupOnStartPush,
                                    int currentVersionBeforePush)
      • topicCleanupWhenPushComplete

        void topicCleanupWhenPushComplete​(java.lang.String clusterName,
                                          java.lang.String storeName,
                                          int versionNumber)
        This purpose of this function is to execute some topic related cleanup when push job is completed. For example, we might want to enable Kafka compaction to remove duplicate entries from the topic, since all the messages in the topic has been verified, and it is not necessary to verify them again during re-bootstrap, which could be triggered by Helix load rebalance.
      • containsHelixResource

        boolean containsHelixResource​(java.lang.String clusterName,
                                      java.lang.String resourceName)
        This purpose of the function is to check if the given resource exists in the Helix cluster.
        Parameters:
        clusterName - The Venice cluster that the resource belongs to.
        resourceName - it's usually the store version name (version topic name).
        Returns:
      • deleteHelixResource

        void deleteHelixResource​(java.lang.String clusterName,
                                 java.lang.String resourceName)
        This purpose of the function is to delete the given resource from the Helix cluster. Different from deleteOneStoreVersion(String, String, int), this function will not check whether the store version is still a valid version inside Venice backend, and it will send the delete request to Helix cluster directly. Do enough sanity check before calling this function.
        Parameters:
        clusterName - The Venice cluster that the resource belongs to.
        resourceName - It's usually the store version name (version topic name).