Package com.linkedin.venice.controller
Interface HelixAdminClient
-
- All Known Implementing Classes:
ZkHelixAdminClient
public interface HelixAdminClient
Interface and wrapper for Helix related admin operations needed by Venice when running Helix as a service.
-
-
Method Summary
All Methods Instance Methods Abstract 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 clusterConfig, 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
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.
-
-
-
Method Detail
-
isVeniceControllerClusterCreated
boolean isVeniceControllerClusterCreated()
Check if the Venice controller cluster is created and configured.- Returns:
- true or false.
-
isVeniceStorageClusterCreated
boolean isVeniceStorageClusterCreated(java.lang.String clusterName)
Check if the given Venice storage cluster is created and configured.- Parameters:
clusterName
- of the Venice cluster.- Returns:
- true or false.
-
createVeniceControllerCluster
void createVeniceControllerCluster()
Create and configure the Venice controller cluster.
-
createVeniceStorageCluster
void createVeniceStorageCluster(java.lang.String clusterName, org.apache.helix.model.ClusterConfig clusterConfig, org.apache.helix.model.RESTConfig restConfig)
Create and configure the Venice storage cluster.- Parameters:
clusterName
- of the Venice storage cluster.clusterConfig
-ClusterConfig
for the new cluster.restConfig
-RESTConfig
for the new cluster.
-
isVeniceStorageClusterInControllerCluster
boolean isVeniceStorageClusterInControllerCluster(java.lang.String clusterName)
Check if the given Venice storage cluster's cluster resource is in the Venice controller cluster.- Parameters:
clusterName
- of the Venice storage cluster.- Returns:
- true or false.
-
addVeniceStorageClusterToControllerCluster
void addVeniceStorageClusterToControllerCluster(java.lang.String clusterName)
Add the given Venice storage cluster's cluster resource to the controller cluster.- Parameters:
clusterName
- of the Venice storage cluster.
-
isClusterInGrandCluster
boolean isClusterInGrandCluster(java.lang.String clusterName)
Check if the grand cluster managed by HaaS controllers is aware of the given cluster.- Parameters:
clusterName
- of the cluster.- Returns:
- true or false.
-
addClusterToGrandCluster
void addClusterToGrandCluster(java.lang.String clusterName)
Add the specified cluster as a resource to the grand cluster to be managed by HaaS controllers.- Parameters:
clusterName
- of the cluster to be added as a resource to the grand cluster.
-
updateClusterConfigs
void updateClusterConfigs(java.lang.String clusterName, org.apache.helix.model.ClusterConfig clusterConfig)
Update some Helix cluster properties for the given cluster.- Parameters:
clusterName
- of the cluster to be updated.clusterConfig
-ClusterConfig
for the new cluster.
-
updateRESTConfigs
void updateRESTConfigs(java.lang.String clusterName, org.apache.helix.model.RESTConfig restConfig)
Update some Helix cluster properties for the given cluster.- Parameters:
clusterName
- of the cluster to be updated.restConfig
-RESTConfig
for the new cluster.
-
enablePartition
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.
-
getInstancesInCluster
java.util.List<java.lang.String> getInstancesInCluster(java.lang.String clusterName)
Get a list of instances under a cluster.- Returns:
- a list of instance names.
-
createVeniceStorageClusterResources
void createVeniceStorageClusterResources(java.lang.String clusterName, java.lang.String kafkaTopic, int numberOfPartition, int replicationFactor)
Create resources for a given storage node cluster.
-
containsResource
boolean containsResource(java.lang.String clusterName, java.lang.String resourceName)
Check if a resource exists in a cluster by checking its ideal state.
-
dropResource
void dropResource(java.lang.String clusterName, java.lang.String resourceName)
Drop a resource from a cluster.
-
dropStorageInstance
void dropStorageInstance(java.lang.String clusterName, java.lang.String instanceName)
Drop a storage node instance from the given cluster.
-
getDisabledPartitionsMap
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.
-
resetPartition
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.The partitions are assumed to be in error state and reset will bring them from error to initial state. An error to initial state transition is required for reset.
-
close
void close()
Release resources.
-
manuallyEnableMaintenanceMode
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. To be called by the REST client that accepts KV mappings as the payload.
-
-