Package com.linkedin.venice.meta
Interface StoreGraveyard
- All Known Implementing Classes:
HelixStoreGraveyard
public interface StoreGraveyard
The graveyard used to keep all deleted stores. While re-creating a store, Venice could retrieve the important info
like largest used version number to avoid resource conflict caused by the same name.
Like the store repository, each cluster should have its own store graveyard instance.
-
Method Summary
Modifier and TypeMethodDescriptionintgetLargestUsedRTVersionNumber(String storeName) Retrieve the largest used version number for the real time topic by the given store name from graveyard.intgetLargestUsedVersionNumber(String storeName) Retrieve the largest used version number by the given store name from graveyard.longgetStoreDeletedTime(String clusterName, String storeName) Get the deletion time of a store in the graveyard.getStoreFromGraveyard(String clusterName, String storeName, org.apache.zookeeper.data.Stat stat) Get store from the graveyard in the specified cluster.listStoreNamesFromGraveyard(String clusterName) List store names from graveyard in the specified cluster.voidputStoreIntoGraveyard(String clusterName, Store store) Put the given store into graveyard.voidremoveStoreFromGraveyard(String clusterName, String storeName) Remove the given store from graveyard in the specified cluster.
-
Method Details
-
getLargestUsedVersionNumber
Retrieve the largest used version number by the given store name from graveyard. Return 0 if the store does not exist in the graveyard, which is the default value we used for the new store. -
getLargestUsedRTVersionNumber
Retrieve the largest used version number for the real time topic by the given store name from graveyard. Return 0 if the store does not exist in the graveyard, which is the default value we used for the new store. -
putStoreIntoGraveyard
Put the given store into graveyard. If the store has already existed in the graveyard, update it by this given store. -
getStoreFromGraveyard
Store getStoreFromGraveyard(String clusterName, String storeName, org.apache.zookeeper.data.Stat stat) Get store from the graveyard in the specified cluster. -
removeStoreFromGraveyard
Remove the given store from graveyard in the specified cluster. -
listStoreNamesFromGraveyard
List store names from graveyard in the specified cluster. -
getStoreDeletedTime
Get the deletion time of a store in the graveyard. This returns the time when the store was last updated in the graveyard (via updateZNode).- Parameters:
clusterName- the cluster namestoreName- the store name- Returns:
- the deletion time in milliseconds since epoch, or STORE_NOT_IN_GRAVEYARD if the store doesn't exist in graveyard
-