Class ZkHelixAdminClient

  • All Implemented Interfaces:
    HelixAdminClient

    public class ZkHelixAdminClient
    extends java.lang.Object
    implements HelixAdminClient
    The purpose of this class is to abstract Helix operations out of the VeniceHelixAdmin and eventually rename it to VeniceAdmin. This is one implementation of the HelixAdminClient interface which uses Zk based Helix API. In the future we might move to the Helix REST API.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addClusterToGrandCluster​(java.lang.String clusterName)
      Add the specified cluster as a resource to the grand cluster to be managed by HaaS controllers.
      void addVeniceStorageClusterToControllerCluster​(java.lang.String clusterName)
      Add the given Venice storage cluster's cluster resource to the controller cluster.
      void close()
      Release resources.
      boolean containsResource​(java.lang.String clusterName, java.lang.String resourceName)
      Check if a resource exists in a cluster by checking its ideal state.
      void createVeniceControllerCluster()
      Create and configure the Venice controller cluster.
      void createVeniceStorageCluster​(java.lang.String clusterName, org.apache.helix.model.ClusterConfig helixClusterConfig, org.apache.helix.model.RESTConfig restConfig)
      Create and configure the Venice storage cluster.
      void createVeniceStorageClusterResources​(java.lang.String clusterName, java.lang.String kafkaTopic, int numberOfPartition, int replicationFactor)
      Create resources for a given storage node cluster.
      void dropResource​(java.lang.String clusterName, java.lang.String resourceName)
      Drop a resource from a cluster.
      void dropStorageInstance​(java.lang.String clusterName, java.lang.String instanceName)
      Drop a storage node instance from the given cluster.
      void enablePartition​(boolean enabled, java.lang.String clusterName, java.lang.String instanceName, java.lang.String resourceName, java.util.List<java.lang.String> partitionNames)
      Disable or enable a list of partitions on an instance.
      java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getDisabledPartitionsMap​(java.lang.String clusterName, java.lang.String instanceName)
      Returns a list of disabled partitions in an instance.
      java.util.List<java.lang.String> getInstancesInCluster​(java.lang.String clusterName)
      Get a list of instances under a cluster.
      boolean isClusterInGrandCluster​(java.lang.String clusterName)
      Check if the grand cluster managed by HaaS controllers is aware of the given cluster.
      boolean isVeniceControllerClusterCreated()
      Check if the Venice controller cluster is created and configured.
      boolean isVeniceStorageClusterCreated​(java.lang.String clusterName)
      Check if the given Venice storage cluster is created and configured.
      boolean isVeniceStorageClusterInControllerCluster​(java.lang.String clusterName)
      Check if the given Venice storage cluster's cluster resource is in the Venice controller cluster.
      void manuallyEnableMaintenanceMode​(java.lang.String clusterName, boolean enabled, java.lang.String reason, java.util.Map<java.lang.String,​java.lang.String> customFields)
      Manually enable maintenance mode.
      void resetPartition​(java.lang.String clusterName, java.lang.String instanceName, java.lang.String resourceName, java.util.List<java.lang.String> partitionNames)
      Reset a list of partitions in error state for an instance.
      void setInstanceOperation​(java.lang.String clusterName, java.lang.String instanceName, org.apache.helix.constants.InstanceConstants.InstanceOperation instanceOperation, java.lang.String reason)
      Set the instanceOperation of and instance with InstanceConstants.InstanceOperation.
      void updateClusterConfigs​(java.lang.String clusterName, org.apache.helix.model.ClusterConfig clusterConfig)
      Update some Helix cluster properties for the given cluster.
      void updateRESTConfigs​(java.lang.String clusterName, org.apache.helix.model.RESTConfig restConfig)
      Update some Helix cluster properties for the given cluster.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait