Package com.linkedin.venice.helix
Class HelixPartitionStateAccessor
java.lang.Object
com.linkedin.venice.helix.HelixPartitionStateAccessor
- Direct Known Subclasses:
HelixPartitionStatusAccessor
A parent class to access Helix customized partition state, which is different from the states
defined in the state model. The partition state is stored on Zookeeper. This class provides
the way to read/write the state.
Note this class is only an accessor but not a repository so it will not cache anything in local
memory. In other words it's stateless and Thread-Safe.
The data structure on ZK would be:
/VeniceClusterName/INSTANCES/instanceName/CUSTOMIZEDSTATE/$topic -> customized state for $topic
-
Constructor Summary
ConstructorDescriptionHelixPartitionStateAccessor
(org.apache.helix.HelixManager helixManager, String instanceId) -
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteReplicaStatus
(HelixPartitionState stateType, String topic, String partitionName) getAllReplicaStatus
(HelixPartitionState stateType, String topic) getReplicaStatus
(HelixPartitionState stateType, String topic, String partitionName) void
setCustomizedStateProvider
(org.apache.helix.customizedstate.CustomizedStateProvider customizedStateProvider) Only used in test nowvoid
updateReplicaStatus
(HelixPartitionState stateType, String topic, String partitionName, String status)
-
Constructor Details
-
HelixPartitionStateAccessor
-
-
Method Details
-
updateReplicaStatus
public void updateReplicaStatus(HelixPartitionState stateType, String topic, String partitionName, String status) -
deleteReplicaStatus
-
getReplicaStatus
-
getAllReplicaStatus
-
setCustomizedStateProvider
public void setCustomizedStateProvider(org.apache.helix.customizedstate.CustomizedStateProvider customizedStateProvider) Only used in test now
-