Package com.linkedin.venice.helix
Class HelixStoreGraveyard
java.lang.Object
com.linkedin.venice.helix.HelixStoreGraveyard
- All Implemented Interfaces:
StoreGraveyard
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHelixStoreGraveyard(org.apache.helix.zookeeper.impl.client.ZkClient zkClient, HelixAdapterSerializer adapterSerializer, Collection<String> clusterNames) HelixStoreGraveyard(org.apache.helix.zookeeper.impl.client.ZkClient zkClient, HelixAdapterSerializer adapterSerializer, Collection<String> clusterNames, VeniceSerializer<Store> storeSerializer) -
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.
-
Field Details
-
STORE_GRAVEYARD_PATH
- See Also:
-
STORE_NOT_IN_GRAVEYARD
public static final long STORE_NOT_IN_GRAVEYARDConstant indicating that a store does not exist in the graveyard.- See Also:
-
dataAccessor
-
-
Constructor Details
-
HelixStoreGraveyard
public HelixStoreGraveyard(org.apache.helix.zookeeper.impl.client.ZkClient zkClient, HelixAdapterSerializer adapterSerializer, Collection<String> clusterNames) -
HelixStoreGraveyard
public HelixStoreGraveyard(org.apache.helix.zookeeper.impl.client.ZkClient zkClient, HelixAdapterSerializer adapterSerializer, Collection<String> clusterNames, VeniceSerializer<Store> storeSerializer)
-
-
Method Details
-
getLargestUsedRTVersionNumber
Description copied from interface:StoreGraveyardRetrieve 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.- Specified by:
getLargestUsedRTVersionNumberin interfaceStoreGraveyard
-
getLargestUsedVersionNumber
Description copied from interface:StoreGraveyardRetrieve 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.- Specified by:
getLargestUsedVersionNumberin interfaceStoreGraveyard
-
putStoreIntoGraveyard
Description copied from interface:StoreGraveyardPut the given store into graveyard. If the store has already existed in the graveyard, update it by this given store.- Specified by:
putStoreIntoGraveyardin interfaceStoreGraveyard
-
getStoreFromGraveyard
public Store getStoreFromGraveyard(String clusterName, String storeName, org.apache.zookeeper.data.Stat stat) Description copied from interface:StoreGraveyardGet store from the graveyard in the specified cluster.- Specified by:
getStoreFromGraveyardin interfaceStoreGraveyard
-
getStoreDeletedTime
Get the deletion time of a store in the graveyard. This returns the modification time of the ZNode, which represents when the store was last put into the graveyard or when the graveyard entry was last updated. Note that this may not be the original deletion time if the store has been deleted multiple times or the graveyard entry has been modified.- Specified by:
getStoreDeletedTimein interfaceStoreGraveyard- Parameters:
clusterName- the cluster namestoreName- the store name- Returns:
- the ZNode modification time in milliseconds since epoch, or STORE_NOT_IN_GRAVEYARD if the store doesn't exist in graveyard
-
removeStoreFromGraveyard
Description copied from interface:StoreGraveyardRemove the given store from graveyard in the specified cluster.- Specified by:
removeStoreFromGraveyardin interfaceStoreGraveyard
-
listStoreNamesFromGraveyard
Description copied from interface:StoreGraveyardList store names from graveyard in the specified cluster.- Specified by:
listStoreNamesFromGraveyardin interfaceStoreGraveyard
-