Package com.linkedin.venice.helix
Class HelixStoreGraveyard
- java.lang.Object
-
- com.linkedin.venice.helix.HelixStoreGraveyard
-
- All Implemented Interfaces:
StoreGraveyard
public class HelixStoreGraveyard extends java.lang.Object implements StoreGraveyard
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.helix.manager.zk.ZkBaseDataAccessor<Store>
dataAccessor
static java.lang.String
STORE_GRAVEYARD_PATH
-
Constructor Summary
Constructors Constructor Description HelixStoreGraveyard(org.apache.helix.zookeeper.impl.client.ZkClient zkClient, HelixAdapterSerializer adapterSerializer, java.util.Collection<java.lang.String> clusterNames)
HelixStoreGraveyard(org.apache.helix.zookeeper.impl.client.ZkClient zkClient, HelixAdapterSerializer adapterSerializer, java.util.Collection<java.lang.String> clusterNames, VeniceSerializer<Store> storeSerializer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getLargestUsedVersionNumber(java.lang.String storeName)
Retrieve the largest used version number by the given store name from graveyard.Store
getStoreFromGraveyard(java.lang.String clusterName, java.lang.String storeName, org.apache.zookeeper.data.Stat stat)
Get store from the graveyard in the specified cluster.java.util.List<java.lang.String>
listStoreNamesFromGraveyard(java.lang.String clusterName)
List store names from graveyard in the specified cluster.void
putStoreIntoGraveyard(java.lang.String clusterName, Store store)
Put the given store into graveyard.void
removeStoreFromGraveyard(java.lang.String clusterName, java.lang.String storeName)
Remove the given store from graveyard in the specified cluster.
-
-
-
Field Detail
-
STORE_GRAVEYARD_PATH
public static final java.lang.String STORE_GRAVEYARD_PATH
- See Also:
- Constant Field Values
-
dataAccessor
protected org.apache.helix.manager.zk.ZkBaseDataAccessor<Store> dataAccessor
-
-
Constructor Detail
-
HelixStoreGraveyard
public HelixStoreGraveyard(org.apache.helix.zookeeper.impl.client.ZkClient zkClient, HelixAdapterSerializer adapterSerializer, java.util.Collection<java.lang.String> clusterNames)
-
HelixStoreGraveyard
public HelixStoreGraveyard(org.apache.helix.zookeeper.impl.client.ZkClient zkClient, HelixAdapterSerializer adapterSerializer, java.util.Collection<java.lang.String> clusterNames, VeniceSerializer<Store> storeSerializer)
-
-
Method Detail
-
getLargestUsedVersionNumber
public int getLargestUsedVersionNumber(java.lang.String storeName)
Description copied from interface:StoreGraveyard
Retrieve the largest used version number by the given store name from graveyard. Return 0 if the store dose not exist in the graveyard, which is the default value we used for the new store.- Specified by:
getLargestUsedVersionNumber
in interfaceStoreGraveyard
-
putStoreIntoGraveyard
public void putStoreIntoGraveyard(java.lang.String clusterName, Store store)
Description copied from interface:StoreGraveyard
Put the given store into graveyard. If the store has already existed in the graveyard, update it by this given store.- Specified by:
putStoreIntoGraveyard
in interfaceStoreGraveyard
-
getStoreFromGraveyard
public Store getStoreFromGraveyard(java.lang.String clusterName, java.lang.String storeName, org.apache.zookeeper.data.Stat stat)
Description copied from interface:StoreGraveyard
Get store from the graveyard in the specified cluster.- Specified by:
getStoreFromGraveyard
in interfaceStoreGraveyard
-
removeStoreFromGraveyard
public void removeStoreFromGraveyard(java.lang.String clusterName, java.lang.String storeName)
Description copied from interface:StoreGraveyard
Remove the given store from graveyard in the specified cluster.- Specified by:
removeStoreFromGraveyard
in interfaceStoreGraveyard
-
listStoreNamesFromGraveyard
public java.util.List<java.lang.String> listStoreNamesFromGraveyard(java.lang.String clusterName)
Description copied from interface:StoreGraveyard
List store names from graveyard in the specified cluster.- Specified by:
listStoreNamesFromGraveyard
in interfaceStoreGraveyard
-
-