Class HelixPartitionStateAccessor

  • Direct Known Subclasses:

    public abstract class HelixPartitionStateAccessor
    extends java.lang.Object
    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 Detail

      • HelixPartitionStateAccessor

        public HelixPartitionStateAccessor​(org.apache.helix.HelixManager helixManager,
                                           java.lang.String instanceId)
    • Method Detail

      • updateReplicaStatus

        public void updateReplicaStatus​(HelixPartitionState stateType,
                                        java.lang.String topic,
                                        java.lang.String partitionName,
                                        java.lang.String status)
      • deleteReplicaStatus

        public void deleteReplicaStatus​(HelixPartitionState stateType,
                                        java.lang.String topic,
                                        java.lang.String partitionName)
      • getReplicaStatus

        public java.lang.String getReplicaStatus​(HelixPartitionState stateType,
                                                 java.lang.String topic,
                                                 java.lang.String partitionName)
      • getAllReplicaStatus

        public java.util.Map<java.lang.String,​java.lang.String> getAllReplicaStatus​(HelixPartitionState stateType,
                                                                                          java.lang.String topic)
      • setCustomizedStateProvider

        public void setCustomizedStateProvider​(org.apache.helix.customizedstate.CustomizedStateProvider customizedStateProvider)
        Only used in test now