Package com.linkedin.venice.controller
Class VeniceParentHelixAdmin
- java.lang.Object
-
- com.linkedin.venice.controller.VeniceParentHelixAdmin
-
- All Implemented Interfaces:
Admin
,java.io.Closeable
,java.lang.AutoCloseable
public class VeniceParentHelixAdmin extends java.lang.Object implements Admin
This class is a wrapper ofVeniceHelixAdmin
, which will be used in parent controller. There should be only one single Parent Controller, which is the endpoint for all the admin data update. For every admin update operation, it will first push admin operation messages to Kafka, then wait for the admin consumer to consume the message. All validations on the updates should be done before the admin operation message is published to Kafka.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.linkedin.venice.controller.Admin
Admin.OfflinePushStatusInfo
-
-
Constructor Summary
Constructors Constructor Description VeniceParentHelixAdmin(VeniceHelixAdmin veniceHelixAdmin, VeniceControllerMultiClusterConfig multiClusterConfigs)
VeniceParentHelixAdmin(VeniceHelixAdmin veniceHelixAdmin, VeniceControllerMultiClusterConfig multiClusterConfigs, boolean sslEnabled, java.util.Optional<SSLConfig> sslConfig, java.util.Optional<DynamicAccessController> accessController, java.util.Optional<AuthorizerService> authorizerService, LingeringStoreVersionChecker lingeringStoreVersionChecker)
VeniceParentHelixAdmin(VeniceHelixAdmin veniceHelixAdmin, VeniceControllerMultiClusterConfig multiClusterConfigs, boolean sslEnabled, java.util.Optional<SSLConfig> sslConfig, java.util.Optional<DynamicAccessController> accessController, java.util.Optional<AuthorizerService> authorizerService, LingeringStoreVersionChecker lingeringStoreVersionChecker, WriteComputeSchemaConverter writeComputeSchemaConverter, java.util.Optional<SupersetSchemaGenerator> externalSupersetSchemaGenerator, PubSubTopicRepository pubSubTopicRepository, DelegatingClusterLeaderInitializationRoutine initRoutineForPushJobDetailsSystemStore, DelegatingClusterLeaderInitializationRoutine initRoutineForHeartbeatSystemStore)
VeniceParentHelixAdmin(VeniceHelixAdmin veniceHelixAdmin, VeniceControllerMultiClusterConfig multiClusterConfigs, boolean sslEnabled, java.util.Optional<SSLConfig> sslConfig, java.util.Optional<AuthorizerService> authorizerService)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
abortMigration(java.lang.String srcClusterName, java.lang.String destClusterName, java.lang.String storeName)
Abort store migration by sending aABORT_MIGRATION
admin message.DerivedSchemaEntry
addDerivedSchema(java.lang.String clusterName, java.lang.String storeName, int valueSchemaId, int derivedSchemaId, java.lang.String derivedSchemaStr)
Unsupported operation in the parent controller.DerivedSchemaEntry
addDerivedSchema(java.lang.String clusterName, java.lang.String storeName, int valueSchemaId, java.lang.String derivedSchemaStr)
Add a new superset schema for the given store with all specified properties by sending aDERIVED_SCHEMA_CREATION
admin message.void
addInstanceToAllowlist(java.lang.String clusterName, java.lang.String helixNodeId)
Unsupported operation in the parent controller.RmdSchemaEntry
addReplicationMetadataSchema(java.lang.String clusterName, java.lang.String storeName, int valueSchemaId, int replicationMetadataVersionId, java.lang.String replicationMetadataSchemaStr)
Create a newReplicationMetadataSchemaEntry
object with the given properties and add it into schema repository by sendingREPLICATION_METADATA_SCHEMA_CREATION
admin message.SchemaEntry
addSupersetSchema(java.lang.String clusterName, java.lang.String storeName, java.lang.String valueSchemaStr, int valueSchemaId, java.lang.String supersetSchemaStr, int supersetSchemaId)
Unsupported operation in the parent controller.SchemaEntry
addValueSchema(java.lang.String clusterName, java.lang.String storeName, java.lang.String newValueSchemaStr, int schemaId, DirectionalSchemaCompatibilityType expectedCompatibilityType)
SchemaEntry
addValueSchema(java.lang.String clusterName, java.lang.String storeName, java.lang.String newValueSchemaStr, DirectionalSchemaCompatibilityType expectedCompatibilityType)
Add a new value schema for the given store with all specified properties by sending aVALUE_SCHEMA_CREATION
admin message.void
addVersionAndStartIngestion(java.lang.String clusterName, java.lang.String storeName, java.lang.String pushJobId, int versionNumber, int numberOfPartitions, Version.PushType pushType, java.lang.String remoteKafkaBootstrapServers, long rewindTimeInSecondsOverride, int ignoredRmdVersionID, boolean versionSwapDeferred, int repushSourceVersion)
This method behaves differently inVeniceHelixAdmin
andVeniceParentHelixAdmin
.int
calculateNumberOfPartitions(java.lang.String clusterName, java.lang.String storeName)
Calculate how many partitions are needed for the given store.void
checkResourceCleanupBeforeStoreCreation(java.lang.String clusterName, java.lang.String storeName)
This function will check whether there are still resources left for the requested store in the requested cluster.java.util.List<java.lang.String>
cleanupInstanceCustomizedStates(java.lang.String clusterName)
Scan through instance level customized states and remove any lingering ZNodes that are no longer relevant.void
close()
CauseVeniceParentHelixAdmin
and its associated services to stop executing.StoreComparisonInfo
compareStore(java.lang.String clusterName, java.lang.String storeName, java.lang.String fabricA, java.lang.String fabricB)
Compare store metadata and version states between two fabrics.void
completeMigration(java.lang.String srcClusterName, java.lang.String destClusterName, java.lang.String storeName)
void
configureActiveActiveReplication(java.lang.String clusterName, VeniceUserStoreType storeType, java.util.Optional<java.lang.String> storeName, boolean enableNativeReplicationForCluster, java.util.Optional<java.lang.String> regionsFilter)
Enable/disable active active replications for certain stores (batch only, hybrid only, incremental push, hybrid or incremental push, all) in a cluster.StoreInfo
copyOverStoreSchemasAndConfigs(java.lang.String clusterName, java.lang.String srcFabric, java.lang.String destFabric, java.lang.String storeName)
void
createStoragePersona(java.lang.String clusterName, java.lang.String name, long quotaNumber, java.util.Set<java.lang.String> storesToEnforce, java.util.Set<java.lang.String> owners)
Creates a new persona with the given parameters.void
createStore(java.lang.String clusterName, java.lang.String storeName, java.lang.String owner, java.lang.String keySchema, java.lang.String valueSchema, boolean isSystemStore, java.util.Optional<java.lang.String> accessPermissions)
Create a store by sendingSTORE_CREATION
admin message to the Kafka admin topic, sendingMETA_SYSTEM_STORE_AUTO_CREATION_VALIDATION
admin message, and performing initialization steps for using authorize server to manage ACLs for the input store.void
deleteAclForStore(java.lang.String clusterName, java.lang.String storeName)
Delete the current set of ACL provisioned for a venice store and its associated kafka topic.java.util.List<Version>
deleteAllVersionsInStore(java.lang.String clusterName, java.lang.String storeName)
Delete all of venice versions in given store(including venice resource, kafka topic, offline pushs and all related resources).void
deleteOldVersionInStore(java.lang.String clusterName, java.lang.String storeName, int versionNum)
Delete the given version from the store.void
deleteStoragePersona(java.lang.String clusterName, java.lang.String name)
Deletes the persona with the given name.void
deleteStore(java.lang.String clusterName, java.lang.String storeName, int largestUsedVersionNumber, boolean waitOnRTTopicDeletion)
Delete a store by sendingDELETE_STORE
admin message to the Kafka admin topic and clearing all ACLs and release resource for the target store from authorize service.void
deleteValueSchemas(java.lang.String clusterName, java.lang.String storeName, java.util.Set<java.lang.Integer> unusedValueSchemaIds)
Deletes a store's values schema with ids `except` the ids passed in the argument inuseValueSchemaIdsPair<java.lang.String,java.lang.String>
discoverCluster(java.lang.String storeName)
Find the cluster which the given store belongs to.java.util.Map<java.lang.String,java.lang.String>
findAllBootstrappingVersions(java.lang.String clusterName)
Unsupported operation in the parent controller.java.lang.String
getAclForStore(java.lang.String clusterName, java.lang.String storeName)
Fetch the current set of ACL provisioned for a venice store and its associated kafka topic.java.util.Optional<AdminCommandExecutionTracker>
getAdminCommandExecutionTracker(java.lang.String clusterName)
Get the tracker used to track the execution of the admin command for the given cluster.java.util.Map<java.lang.String,java.lang.Long>
getAdminTopicMetadata(java.lang.String clusterName, java.util.Optional<java.lang.String> storeName)
Unsupported operation in the parent controller.InstanceRemovableStatuses
getAggregatedHealthStatus(java.lang.String cluster, java.util.List<java.lang.String> instances, java.util.List<java.lang.String> toBeStoppedInstances, boolean isSSLEnabled)
java.util.Optional<java.lang.String>
getAggregateRealTimeTopicSource(java.lang.String clusterName)
Return the source Kafka boostrap server url for aggregate real-time topic updatesjava.util.Set<java.lang.String>
getAllowlist(java.lang.String clusterName)
Unsupported operation in the parent controller.java.util.Map<java.lang.String,java.lang.String>
getAllStorePushStrategyForMigration()
java.util.List<Store>
getAllStores(java.lang.String clusterName)
java.util.Map<java.lang.String,java.lang.String>
getAllStoreStatuses(java.lang.String clusterName)
Unsupported operation in the parent controller.int
getBackupVersion(java.lang.String clusterName, java.lang.String storeName)
long
getBackupVersionDefaultRetentionMs()
Returns default backup version retention time.java.util.Map<java.lang.String,java.lang.String>
getBackupVersionsForMultiColos(java.lang.String clusterName, java.lang.String storeName)
BatchJobHeartbeatValue
getBatchJobHeartbeatValue(BatchJobHeartbeatKey batchJobHeartbeatKey)
java.lang.String
getChildControllerD2ServiceName(java.lang.String clusterName)
Get child datacenter controller d2 service namejava.util.Map<java.lang.String,java.lang.String>
getChildDataCenterControllerD2Map(java.lang.String clusterName)
Get child datacenter to child controller d2 zk host mappingjava.util.Map<java.lang.String,java.lang.String>
getChildDataCenterControllerUrlMap(java.lang.String clusterName)
Get child datacenter to child controller url mapping.java.util.List<java.lang.String>
getClustersLeaderOf()
Get a list of clusters this controller is a leader of.java.util.Map<java.lang.String,StoreDataAudit>
getClusterStaleStores(java.lang.String clusterName)
This function will iterate over all of Helix Parent Admin's child controllers, in order to ask about stale stores.java.util.List<StoragePersona>
getClusterStoragePersonas(java.lang.String clusterName)
java.util.ArrayList<StoreInfo>
getClusterStores(java.lang.String clusterName)
Unsupported operation in the parent controller.int
getCurrentVersion(java.lang.String clusterName, java.lang.String storeName)
Unsupported operation in the parent controller.java.util.Map<java.lang.String,java.lang.Integer>
getCurrentVersionsForMultiColos(java.lang.String clusterName, java.lang.String storeName)
Query the current version for the given store.int
getDatacenterCount(java.lang.String clusterName)
number of datacenters, 1 if in single cluster mode.int
getDefaultMaxRecordSizeBytes()
GeneratedSchemaID
getDerivedSchemaId(java.lang.String clusterName, java.lang.String storeName, java.lang.String schemaStr)
java.util.Collection<DerivedSchemaEntry>
getDerivedSchemas(java.lang.String clusterName, java.lang.String storeName)
java.util.Optional<java.lang.String>
getEmergencySourceRegion(java.lang.String clusterName)
Return the emergency source region configuration.protected static ExecutionStatus
getFinalReturnStatus(java.util.Map<java.lang.String,ExecutionStatus> statuses, java.util.Set<java.lang.String> childRegions, int numChildRegionsFailedToFetchStatus, java.lang.StringBuilder currentReturnStatusDetails)
Based on the global information, start determining the final status to returnint
getFutureVersion(java.lang.String clusterName, java.lang.String storeName)
Unsupported operation in the parent controller and returns Store.NON_EXISTING_VERSION.java.util.Map<java.lang.String,java.lang.String>
getFutureVersionsForMultiColos(java.lang.String clusterName, java.lang.String storeName)
long
getHeartbeatFromSystemStore(java.lang.String clusterName, java.lang.String storeName)
Read the latest heartbeat timestamp from system store.HelixVeniceClusterResources
getHelixVeniceClusterResources(java.lang.String cluster)
Version
getIncrementalPushVersion(java.lang.String clusterName, java.lang.String storeName)
A couple of extra checks are needed in parent controller 1.java.util.Set<java.lang.Integer>
getInUseValueSchemaIds(java.lang.String clusterName, java.lang.String storeName)
java.lang.String
getKafkaBootstrapServers(boolean isSSL)
Return the ssl or non-ssl bootstrap servers based on the given flag.SchemaEntry
getKeySchema(java.lang.String clusterName, java.lang.String storeName)
int
getLargestUsedVersionFromStoreGraveyard(java.lang.String clusterName, java.lang.String storeName)
java.lang.Long
getLastSucceedExecutionId(java.lang.String clustername)
Get the id of the last succeed execution in this controller.Instance
getLeaderController(java.lang.String clusterName)
Get instance of leader controller.MetaStoreReader
getMetaStoreReader()
StoreMetaValue
getMetaStoreValue(StoreMetaKey metaKey, java.lang.String storeName)
MetaStoreWriter
getMetaStoreWriter()
Return aMetaStoreWriter
, which can be shared across different Venice clusters.int
getMinNumberOfUnusedKafkaTopicsToPreserve()
java.lang.String
getNativeReplicationKafkaBootstrapServerAddress(java.lang.String sourceFabric)
java.lang.String
getNativeReplicationSourceFabric(java.lang.String clusterName, Store store, java.util.Optional<java.lang.String> sourceGridFabric, java.util.Optional<java.lang.String> emergencySourceRegion, java.lang.String targetedRegions)
Admin.OfflinePushStatusInfo
getOffLinePushStatus(java.lang.String clusterName, java.lang.String kafkaTopic)
Queries child clusters for status.Admin.OfflinePushStatusInfo
getOffLinePushStatus(java.lang.String clusterName, java.lang.String kafkaTopic, java.util.Optional<java.lang.String> incrementalPushVersion, java.lang.String region, java.lang.String targetedRegions)
ParentControllerRegionState
getParentControllerRegionState()
Return the state of the region of the parent controller.StoragePersona
getPersonaAssociatedWithStore(java.lang.String clusterName, java.lang.String storeName)
PubSubConsumerAdapterFactory
getPubSubConsumerAdapterFactory()
VeniceProperties
getPubSubSSLProperties(java.lang.String pubSubBrokerAddress)
PubSubTopicRepository
getPubSubTopicRepository()
PushJobDetails
getPushJobDetails(PushJobStatusRecordKey key)
PushStatusStoreReader
getPushStatusStoreReader()
PushStatusStoreWriter
getPushStatusStoreWriter()
HelixReadOnlyZKSharedSchemaRepository
getReadOnlyZKSharedSchemaRepository()
Return a shared read only schema repository for zk shared stores.HelixReadOnlyZKSharedSystemStoreRepository
getReadOnlyZKSharedSystemStoreRepository()
Return a shared read only store repository for zk shared stores.java.lang.String
getRealTimeTopic(java.lang.String clusterName, Store store)
java.lang.String
getRegionName()
Return the region name of this AdminRegionPushDetails
getRegionPushDetails(java.lang.String clusterName, java.lang.String storeName, boolean isPartitionDetailAdded)
Unsupported operation in the parent controller.java.util.List<Replica>
getReplicas(java.lang.String clusterName, java.lang.String kafkaTopic)
java.util.List<Replica>
getReplicasOfStorageNode(java.lang.String clusterName, java.lang.String instanceId)
Unsupported operation in the parent controller.int
getReplicationFactor(java.lang.String clusterName, java.lang.String storeName)
java.util.Optional<org.apache.avro.Schema>
getReplicationMetadataSchema(java.lang.String clusterName, java.lang.String storeName, int valueSchemaID, int rmdVersionID)
java.util.Collection<RmdSchemaEntry>
getReplicationMetadataSchemas(java.lang.String clusterName, java.lang.String storeName)
RepushInfo
getRepushInfo(java.lang.String clusterName, java.lang.String storeName, java.util.Optional<java.lang.String> fabricName)
RoutersClusterConfig
getRoutersClusterConfig(java.lang.String clusterName)
Unsupported operation in the parent controller.java.lang.String
getSeparateRealTimeTopic(java.lang.String clusterName, java.lang.String storeName)
java.lang.String
getServerD2Service(java.lang.String clusterName)
Find the server d2 service associated with a given cluster name.double
getStorageEngineOverheadRatio(java.lang.String clusterName)
java.util.List<java.lang.String>
getStorageNodes(java.lang.String clusterName)
Unsupported operation in the parent controller.java.util.Map<java.lang.String,java.lang.String>
getStorageNodesStatus(java.lang.String clusterName, boolean enableReplica)
Unsupported operation in the parent controller.StorageNodeStatus
getStorageNodesStatus(java.lang.String clusterName, java.lang.String instanceId)
Unsupported operation in the parent controller.StoragePersona
getStoragePersona(java.lang.String clusterName, java.lang.String name)
Store
getStore(java.lang.String clusterName, java.lang.String storeName)
HelixReadOnlyStoreConfigRepository
getStoreConfigRepo()
Return a shared store config repository.StoreGraveyard
getStoreGraveyard()
TopicManager
getTopicManager()
TopicManager
getTopicManager(java.lang.String pubSubServerAddress)
SchemaEntry
getValueSchema(java.lang.String clusterName, java.lang.String storeName, int id)
int
getValueSchemaId(java.lang.String clusterName, java.lang.String storeName, java.lang.String valueSchemaStr)
java.util.Collection<SchemaEntry>
getValueSchemas(java.lang.String clusterName, java.lang.String storeName)
VeniceHelixAdmin
getVeniceHelixAdmin()
VeniceWriterFactory
getVeniceWriterFactory()
boolean
hasStore(java.lang.String clusterName, java.lang.String storeName)
boolean
hasWritePermissionToBatchJobHeartbeatStore(java.security.cert.X509Certificate requesterCert, java.lang.String batchJobHeartbeatStoreName)
Test if the given certificate has the write-access permission for the given batch-job heartbeat store.Version
incrementVersionIdempotent(java.lang.String clusterName, java.lang.String storeName, java.lang.String pushJobId, int numberOfPartitions, int replicationFactor, Version.PushType pushType, boolean sendStartOfPush, boolean sorted, java.lang.String compressionDictionary, java.util.Optional<java.lang.String> sourceGridFabric, java.util.Optional<java.security.cert.X509Certificate> requesterCert, long rewindTimeInSecondsOverride, java.util.Optional<java.lang.String> emergencySourceRegion, boolean versionSwapDeferred, java.lang.String targetedRegions, int repushSourceVersion)
void
initiateDataRecovery(java.lang.String clusterName, java.lang.String storeName, int version, java.lang.String sourceFabric, java.lang.String destinationFabric, boolean copyAllVersionConfigs, java.util.Optional<Version> ignored)
Initiate data recovery for a store version given a source fabric.void
initStorageCluster(java.lang.String clusterName)
Initialize Venice storage cluster in Helix by: creating and configuring required properties in Helix. waiting resource's (partial) partition to appear in the external view. making sure admin Kafka topics is created. creating a Venice writer for the cluster.boolean
isActiveActiveReplicationEnabledInAllRegion(java.lang.String clusterName, java.lang.String storeName, boolean checkCurrentVersion)
Returns true if A/A replication is enabled in all child controller and parent controller.boolean
isClusterValid(java.lang.String clusterName)
Test if a cluster is valid (in Helix cluster list).NodeRemovableResult
isInstanceRemovable(java.lang.String clusterName, java.lang.String instanceId, java.util.List<java.lang.String> lockedNodes)
Unsupported operation in the parent controller.boolean
isLeaderControllerFor(java.lang.String clusterName)
Check if this controller itself is the leader controller for a given cluster or not.boolean
isLeaderControllerOfControllerCluster()
This function can be used to perform cluster-wide operations which need to be performed by a single process only in the whole cluster.boolean
isParent()
Check whether the controller works as a parent controllerboolean
isResourceStillAlive(java.lang.String resourceName)
Unsupported operation in the parent controller.boolean
isRTTopicDeletionPermittedByAllControllers(java.lang.String clusterName, java.lang.String storeName)
boolean
isSSLEnabledForPush(java.lang.String clusterName, java.lang.String storeName)
Return whether ssl is enabled for the given store for push.boolean
isSslToKafka()
boolean
isStorageNodeNewerOrEqualTo(java.lang.String clusterName, java.lang.String instanceId, StorageNodeStatus oldServerStatus)
Unsupported operation in the parent controller.boolean
isStoreMigrationAllowed(java.lang.String clusterName)
Pair<java.lang.Boolean,java.lang.String>
isStoreVersionReadyForDataRecovery(java.lang.String clusterName, java.lang.String storeName, int version, java.lang.String sourceFabric, java.lang.String destinationFabric, java.util.Optional<java.lang.Integer> ignored)
Check if the store version's previous states and resources are cleaned up and ready to start data recovery.boolean
isTopicTruncated(java.lang.String kafkaTopicName)
boolean
isTopicTruncatedBasedOnRetention(long retention)
boolean
isTopicTruncatedBasedOnRetention(java.lang.String kafkaTopicName, long retentionTime)
void
killOfflinePush(java.lang.String clusterName, java.lang.String kafkaTopic, boolean isForcedKill)
Kill an offline push if it ran into errors or the corresponding version is being retired.java.util.Map<java.lang.String,RegionPushDetails>
listStorePushInfo(java.lang.String clusterName, java.lang.String storeName, boolean isPartitionDetailEnabled)
This function will look for a single store, given a name and cluster name, and return information about the current push jobs for that store across all regions.void
migrateStore(java.lang.String srcClusterName, java.lang.String destClusterName, java.lang.String storeName)
Migrate a store from its source cluster to a new destination cluster by sending aMIGRATE_STORE
admin message.Pair<NodeReplicasReadinessState,java.util.List<Replica>>
nodeReplicaReadiness(java.lang.String cluster, java.lang.String helixNodeId)
Unsupported operation in the parent controller.Version
peekNextVersion(java.lang.String clusterName, java.lang.String storeName)
Unsupported operation in the parent controller.void
prepareDataRecovery(java.lang.String clusterName, java.lang.String storeName, int version, java.lang.String sourceFabric, java.lang.String destinationFabric, java.util.Optional<java.lang.Integer> ignored)
Prepare for data recovery in the destination fabric.DerivedSchemaEntry
removeDerivedSchema(java.lang.String clusterName, java.lang.String storeName, int valueSchemaId, int derivedSchemaId)
Unsupported operation in the parent controller.void
removeInstanceFromAllowList(java.lang.String clusterName, java.lang.String helixNodeId)
Unsupported operation in the parent controller.void
removeStorageNode(java.lang.String clusterName, java.lang.String instanceId)
Unsupported operation in the parent controller.void
removeStoreFromGraveyard(java.lang.String clusterName, java.lang.String storeName)
void
rollbackToBackupVersion(java.lang.String clusterName, java.lang.String storeName, java.lang.String regionFilter)
Set backup version as current version in all child regions.void
rollForwardToFutureVersion(java.lang.String clusterName, java.lang.String storeName, java.lang.String regionFilter)
void
sendHeartbeatToSystemStore(java.lang.String clusterName, java.lang.String systemStoreName, long heartbeatTimestamp)
Send a heartbeat timestamp to targeted system store.void
sendPushJobDetails(PushJobStatusRecordKey key, PushJobDetails value)
void
setAdminConsumerService(java.lang.String clusterName, AdminConsumerService service)
void
setStoreCurrentVersion(java.lang.String clusterName, java.lang.String storeName, int versionNumber)
Unsupported operation in the parent controller.void
setStoreLargestUsedVersion(java.lang.String clusterName, java.lang.String storeName, int versionNumber)
Unsupported operation in the parent controller.void
setStoreOwner(java.lang.String clusterName, java.lang.String storeName, java.lang.String owner)
Update the owner of a specified store by sendingSET_STORE_OWNER
admin message to the admin topic.void
setStorePartitionCount(java.lang.String clusterName, java.lang.String storeName, int partitionCount)
Update the partition count of a specified store by sendingSET_STORE_PARTITION
admin message to the admin topic.void
setStorePushStrategyForMigration(java.lang.String voldemortStoreName, java.lang.String strategy)
Set a push-strategy in the ZK pathMigrationPushStrategyZKAccessor.MIGRATION_PUSH_STRATEGY_PATH
.void
setStoreReadability(java.lang.String clusterName, java.lang.String storeName, boolean desiredReadability)
Update the readability of a specified store by sendingENABLE_STORE_READ
orDISABLE_STORE_READ
admin message.void
setStoreReadWriteability(java.lang.String clusterName, java.lang.String storeName, boolean isAccessible)
Update both readability and writability of a specified store.void
setStoreWriteability(java.lang.String clusterName, java.lang.String storeName, boolean desiredWriteability)
Update the writability of a specified store by sendingENABLE_STORE_WRITE
orDISABLE_STORE_WRITE
admin message.void
skipAdminMessage(java.lang.String clusterName, long offset, boolean skipDIV)
The admin consumption task tries to deal with failures to process an admin message by retrying.void
stop(java.lang.String clusterName)
Stop the helix controller for a single cluster.void
stopVeniceController()
Stop the entire controller but not only the helix controller for a single cluster.boolean
truncateKafkaTopic(java.lang.String kafkaTopicName)
boolean
truncateKafkaTopic(java.lang.String kafkaTopicName, long retentionTime)
Truncate a Kafka topic by setting its retention time to the input value.void
updateAclForStore(java.lang.String clusterName, java.lang.String storeName, java.lang.String accessPermissions)
Provision a new set of ACL for a venice store and its associated kafka topic.void
updateAdminTopicMetadata(java.lang.String clusterName, long executionId, java.util.Optional<java.lang.String> storeName, java.util.Optional<java.lang.Long> offset, java.util.Optional<java.lang.Long> upstreamOffset)
Unsupported operation in the parent controller.void
updateClusterConfig(java.lang.String clusterName, UpdateClusterConfigQueryParams params)
void
updateClusterDiscovery(java.lang.String storeName, java.lang.String oldCluster, java.lang.String newCluster, java.lang.String initiatingCluster)
Update the cluster discovery of a given store by writing to the StoreConfig ZNode.void
updateRoutersClusterConfig(java.lang.String clusterName, java.util.Optional<java.lang.Boolean> isThrottlingEnable, java.util.Optional<java.lang.Boolean> isQuotaRebalancedEnable, java.util.Optional<java.lang.Boolean> isMaxCapacityProtectionEnabled, java.util.Optional<java.lang.Integer> expectedRouterCount)
Unsupported operation in the parent controller.void
updateStoragePersona(java.lang.String clusterName, java.lang.String name, UpdateStoragePersonaQueryParams queryParams)
Updates a persona with the given parameters by sending aUPDATE_STORAGE_PERSONA
admin message.void
updateStore(java.lang.String clusterName, java.lang.String storeName, UpdateStoreQueryParams params)
Update a target store properties by first applying the provided deltas and then sendingUPDATE_STORE
admin message.void
updateSystemStoreAclForStore(java.lang.String clusterName, java.lang.String regularStoreName, AclBinding systemStoreAclBinding)
Set the AceEntries in provided AclBinding object to be the current set of ACL's for the resource.void
validateAndMaybeRetrySystemStoreAutoCreation(java.lang.String clusterName, java.lang.String storeName, VeniceSystemStoreType veniceSystemStoreType)
Unsupported operation in the parent controller.java.util.List<Version>
versionsForStore(java.lang.String clusterName, java.lang.String storeName)
boolean
whetherEnableBatchPushFromAdmin(java.lang.String storeName)
void
wipeCluster(java.lang.String clusterName, java.lang.String fabric, java.util.Optional<java.lang.String> storeName, java.util.Optional<java.lang.Integer> versionNum)
Delete stores from the cluster by sending aControllerClient.wipeCluster(String, Optional, Optional)
request.void
writeEndOfPush(java.lang.String clusterName, java.lang.String storeName, int versionNumber, boolean alsoWriteStartOfPush)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.linkedin.venice.controller.Admin
addValueSchema, clearInstanceMonitor, createStore, createStore, getRealTimeTopic, incrementVersionIdempotent, incrementVersionIdempotent, isAdminTopicConsumptionEnabled, startInstanceMonitor
-
-
-
-
Constructor Detail
-
VeniceParentHelixAdmin
public VeniceParentHelixAdmin(VeniceHelixAdmin veniceHelixAdmin, VeniceControllerMultiClusterConfig multiClusterConfigs)
-
VeniceParentHelixAdmin
public VeniceParentHelixAdmin(VeniceHelixAdmin veniceHelixAdmin, VeniceControllerMultiClusterConfig multiClusterConfigs, boolean sslEnabled, java.util.Optional<SSLConfig> sslConfig, java.util.Optional<AuthorizerService> authorizerService)
-
VeniceParentHelixAdmin
public VeniceParentHelixAdmin(VeniceHelixAdmin veniceHelixAdmin, VeniceControllerMultiClusterConfig multiClusterConfigs, boolean sslEnabled, java.util.Optional<SSLConfig> sslConfig, java.util.Optional<DynamicAccessController> accessController, java.util.Optional<AuthorizerService> authorizerService, LingeringStoreVersionChecker lingeringStoreVersionChecker)
-
VeniceParentHelixAdmin
public VeniceParentHelixAdmin(VeniceHelixAdmin veniceHelixAdmin, VeniceControllerMultiClusterConfig multiClusterConfigs, boolean sslEnabled, java.util.Optional<SSLConfig> sslConfig, java.util.Optional<DynamicAccessController> accessController, java.util.Optional<AuthorizerService> authorizerService, LingeringStoreVersionChecker lingeringStoreVersionChecker, WriteComputeSchemaConverter writeComputeSchemaConverter, java.util.Optional<SupersetSchemaGenerator> externalSupersetSchemaGenerator, PubSubTopicRepository pubSubTopicRepository, DelegatingClusterLeaderInitializationRoutine initRoutineForPushJobDetailsSystemStore, DelegatingClusterLeaderInitializationRoutine initRoutineForHeartbeatSystemStore)
-
-
Method Detail
-
initStorageCluster
public void initStorageCluster(java.lang.String clusterName)
Initialize Venice storage cluster in Helix by:- creating and configuring required properties in Helix.
- waiting resource's (partial) partition to appear in the external view.
- making sure admin Kafka topics is created.
- creating a Venice writer for the cluster.
- Specified by:
initStorageCluster
in interfaceAdmin
- Parameters:
clusterName
- Venice cluster name.
-
isClusterValid
public boolean isClusterValid(java.lang.String clusterName)
Test if a cluster is valid (in Helix cluster list).- Specified by:
isClusterValid
in interfaceAdmin
- Parameters:
clusterName
- Venice cluster name.- Returns:
true
if input cluster is in Helix cluster list;false
otherwise.
-
deleteValueSchemas
public void deleteValueSchemas(java.lang.String clusterName, java.lang.String storeName, java.util.Set<java.lang.Integer> unusedValueSchemaIds)
Description copied from interface:Admin
Deletes a store's values schema with ids `except` the ids passed in the argument inuseValueSchemaIds- Specified by:
deleteValueSchemas
in interfaceAdmin
-
getInUseValueSchemaIds
public java.util.Set<java.lang.Integer> getInUseValueSchemaIds(java.lang.String clusterName, java.lang.String storeName)
- Specified by:
getInUseValueSchemaIds
in interfaceAdmin
-
createStore
public void createStore(java.lang.String clusterName, java.lang.String storeName, java.lang.String owner, java.lang.String keySchema, java.lang.String valueSchema, boolean isSystemStore, java.util.Optional<java.lang.String> accessPermissions)
Create a store by sendingSTORE_CREATION
admin message to the Kafka admin topic, sendingMETA_SYSTEM_STORE_AUTO_CREATION_VALIDATION
admin message, and performing initialization steps for using authorize server to manage ACLs for the input store.- Specified by:
createStore
in interfaceAdmin
-
deleteStore
public void deleteStore(java.lang.String clusterName, java.lang.String storeName, int largestUsedVersionNumber, boolean waitOnRTTopicDeletion)
Delete a store by sendingDELETE_STORE
admin message to the Kafka admin topic and clearing all ACLs and release resource for the target store from authorize service.- Specified by:
deleteStore
in interfaceAdmin
-
addVersionAndStartIngestion
public void addVersionAndStartIngestion(java.lang.String clusterName, java.lang.String storeName, java.lang.String pushJobId, int versionNumber, int numberOfPartitions, Version.PushType pushType, java.lang.String remoteKafkaBootstrapServers, long rewindTimeInSecondsOverride, int ignoredRmdVersionID, boolean versionSwapDeferred, int repushSourceVersion)
Description copied from interface:Admin
This method behaves differently inVeniceHelixAdmin
andVeniceParentHelixAdmin
.- Specified by:
addVersionAndStartIngestion
in interfaceAdmin
- See Also:
Admin.addVersionAndStartIngestion(String, String, String, int, int, Version.PushType, String, long, int, boolean, int)
-
hasWritePermissionToBatchJobHeartbeatStore
public boolean hasWritePermissionToBatchJobHeartbeatStore(java.security.cert.X509Certificate requesterCert, java.lang.String batchJobHeartbeatStoreName) throws AclException
Test if the given certificate has the write-access permission for the given batch-job heartbeat store.- Specified by:
hasWritePermissionToBatchJobHeartbeatStore
in interfaceAdmin
- Parameters:
requesterCert
- X.509 certificate object.batchJobHeartbeatStoreName
- name of the batch-job heartbeat store.- Returns:
true
if input certificate has write-access permission for the given store;false
otherwise.- Throws:
AclException
-
isActiveActiveReplicationEnabledInAllRegion
public boolean isActiveActiveReplicationEnabledInAllRegion(java.lang.String clusterName, java.lang.String storeName, boolean checkCurrentVersion)
Description copied from interface:Admin
Returns true if A/A replication is enabled in all child controller and parent controller. This is implemented only in parent controller. Otherwise, return false.- Specified by:
isActiveActiveReplicationEnabledInAllRegion
in interfaceAdmin
- See Also:
Admin.isActiveActiveReplicationEnabledInAllRegion(String, String, boolean)
-
incrementVersionIdempotent
public Version incrementVersionIdempotent(java.lang.String clusterName, java.lang.String storeName, java.lang.String pushJobId, int numberOfPartitions, int replicationFactor, Version.PushType pushType, boolean sendStartOfPush, boolean sorted, java.lang.String compressionDictionary, java.util.Optional<java.lang.String> sourceGridFabric, java.util.Optional<java.security.cert.X509Certificate> requesterCert, long rewindTimeInSecondsOverride, java.util.Optional<java.lang.String> emergencySourceRegion, boolean versionSwapDeferred, java.lang.String targetedRegions, int repushSourceVersion)
- Specified by:
incrementVersionIdempotent
in interfaceAdmin
- See Also:
Admin.incrementVersionIdempotent(String, String, String, int, int)
-
getRealTimeTopic
public java.lang.String getRealTimeTopic(java.lang.String clusterName, Store store)
- Specified by:
getRealTimeTopic
in interfaceAdmin
- See Also:
VeniceHelixAdmin.getRealTimeTopic(String, Store)
-
getSeparateRealTimeTopic
public java.lang.String getSeparateRealTimeTopic(java.lang.String clusterName, java.lang.String storeName)
- Specified by:
getSeparateRealTimeTopic
in interfaceAdmin
-
getIncrementalPushVersion
public Version getIncrementalPushVersion(java.lang.String clusterName, java.lang.String storeName)
A couple of extra checks are needed in parent controller 1. check batch job statuses across child controllers. (We cannot only check the version status in parent controller since they are marked as STARTED) 2. check if the topic is marked to be truncated or not. (This could be removed if we don't preserve incremental push topic in parent Kafka anymore- Specified by:
getIncrementalPushVersion
in interfaceAdmin
-
getCurrentVersion
public int getCurrentVersion(java.lang.String clusterName, java.lang.String storeName)
Unsupported operation in the parent controller.- Specified by:
getCurrentVersion
in interfaceAdmin
-
getCurrentVersionsForMultiColos
public java.util.Map<java.lang.String,java.lang.Integer> getCurrentVersionsForMultiColos(java.lang.String clusterName, java.lang.String storeName)
Query the current version for the given store. In parent colo, Venice do not update the current version because there is not offline push monitor. So parent controller will query each prod controller and return the map.- Specified by:
getCurrentVersionsForMultiColos
in interfaceAdmin
-
getRepushInfo
public RepushInfo getRepushInfo(java.lang.String clusterName, java.lang.String storeName, java.util.Optional<java.lang.String> fabricName)
- Specified by:
getRepushInfo
in interfaceAdmin
- Returns:
- a RepushInfo object with store information retrieved from the specified cluster and fabric.
-
getFutureVersionsForMultiColos
public java.util.Map<java.lang.String,java.lang.String> getFutureVersionsForMultiColos(java.lang.String clusterName, java.lang.String storeName)
- Specified by:
getFutureVersionsForMultiColos
in interfaceAdmin
- See Also:
Admin.getFutureVersionsForMultiColos(String, String)
-
getBackupVersionsForMultiColos
public java.util.Map<java.lang.String,java.lang.String> getBackupVersionsForMultiColos(java.lang.String clusterName, java.lang.String storeName)
- Specified by:
getBackupVersionsForMultiColos
in interfaceAdmin
-
getFutureVersion
public int getFutureVersion(java.lang.String clusterName, java.lang.String storeName)
Unsupported operation in the parent controller and returns Store.NON_EXISTING_VERSION.- Specified by:
getFutureVersion
in interfaceAdmin
-
getBackupVersion
public int getBackupVersion(java.lang.String clusterName, java.lang.String storeName)
- Specified by:
getBackupVersion
in interfaceAdmin
-
peekNextVersion
public Version peekNextVersion(java.lang.String clusterName, java.lang.String storeName)
Unsupported operation in the parent controller.- Specified by:
peekNextVersion
in interfaceAdmin
-
deleteAllVersionsInStore
public java.util.List<Version> deleteAllVersionsInStore(java.lang.String clusterName, java.lang.String storeName)
Description copied from interface:Admin
Delete all of venice versions in given store(including venice resource, kafka topic, offline pushs and all related resources).- Specified by:
deleteAllVersionsInStore
in interfaceAdmin
- See Also:
Admin.deleteAllVersionsInStore(String, String)
-
deleteOldVersionInStore
public void deleteOldVersionInStore(java.lang.String clusterName, java.lang.String storeName, int versionNum)
Description copied from interface:Admin
Delete the given version from the store. If the given version is the current version, an exception will be thrown.- Specified by:
deleteOldVersionInStore
in interfaceAdmin
- See Also:
Admin.deleteOldVersionInStore(String, String, int)
-
versionsForStore
public java.util.List<Version> versionsForStore(java.lang.String clusterName, java.lang.String storeName)
- Specified by:
versionsForStore
in interfaceAdmin
- Returns:
- all versions of the specified store from a cluster.
-
getAllStores
public java.util.List<Store> getAllStores(java.lang.String clusterName)
- Specified by:
getAllStores
in interfaceAdmin
- Returns:
- all stores in the specified cluster.
-
getAllStoreStatuses
public java.util.Map<java.lang.String,java.lang.String> getAllStoreStatuses(java.lang.String clusterName)
Unsupported operation in the parent controller.- Specified by:
getAllStoreStatuses
in interfaceAdmin
- Returns:
- a map whose key is store name and value is store's status.
-
getStore
public Store getStore(java.lang.String clusterName, java.lang.String storeName)
-
hasStore
public boolean hasStore(java.lang.String clusterName, java.lang.String storeName)
- Specified by:
hasStore
in interfaceAdmin
- See Also:
VeniceHelixAdmin.hasStore(String, String)
-
setStoreCurrentVersion
public void setStoreCurrentVersion(java.lang.String clusterName, java.lang.String storeName, int versionNumber)
Unsupported operation in the parent controller.- Specified by:
setStoreCurrentVersion
in interfaceAdmin
-
rollForwardToFutureVersion
public void rollForwardToFutureVersion(java.lang.String clusterName, java.lang.String storeName, java.lang.String regionFilter)
- Specified by:
rollForwardToFutureVersion
in interfaceAdmin
-
rollbackToBackupVersion
public void rollbackToBackupVersion(java.lang.String clusterName, java.lang.String storeName, java.lang.String regionFilter)
Set backup version as current version in all child regions.- Specified by:
rollbackToBackupVersion
in interfaceAdmin
-
setStoreLargestUsedVersion
public void setStoreLargestUsedVersion(java.lang.String clusterName, java.lang.String storeName, int versionNumber)
Unsupported operation in the parent controller.- Specified by:
setStoreLargestUsedVersion
in interfaceAdmin
-
setStoreOwner
public void setStoreOwner(java.lang.String clusterName, java.lang.String storeName, java.lang.String owner)
Update the owner of a specified store by sendingSET_STORE_OWNER
admin message to the admin topic.- Specified by:
setStoreOwner
in interfaceAdmin
-
setStorePartitionCount
public void setStorePartitionCount(java.lang.String clusterName, java.lang.String storeName, int partitionCount)
Update the partition count of a specified store by sendingSET_STORE_PARTITION
admin message to the admin topic.- Specified by:
setStorePartitionCount
in interfaceAdmin
-
setStoreReadability
public void setStoreReadability(java.lang.String clusterName, java.lang.String storeName, boolean desiredReadability)
Update the readability of a specified store by sendingENABLE_STORE_READ
orDISABLE_STORE_READ
admin message.- Specified by:
setStoreReadability
in interfaceAdmin
-
setStoreWriteability
public void setStoreWriteability(java.lang.String clusterName, java.lang.String storeName, boolean desiredWriteability)
Update the writability of a specified store by sendingENABLE_STORE_WRITE
orDISABLE_STORE_WRITE
admin message.- Specified by:
setStoreWriteability
in interfaceAdmin
-
setStoreReadWriteability
public void setStoreReadWriteability(java.lang.String clusterName, java.lang.String storeName, boolean isAccessible)
Update both readability and writability of a specified store.- Specified by:
setStoreReadWriteability
in interfaceAdmin
-
updateStore
public void updateStore(java.lang.String clusterName, java.lang.String storeName, UpdateStoreQueryParams params)
Update a target store properties by first applying the provided deltas and then sendingUPDATE_STORE
admin message.- Specified by:
updateStore
in interfaceAdmin
- Parameters:
clusterName
- name of the Venice cluster.storeName
- name of the to-be-updated store.params
- to-be-updated store properties.
-
updateClusterConfig
public void updateClusterConfig(java.lang.String clusterName, UpdateClusterConfigQueryParams params)
- Specified by:
updateClusterConfig
in interfaceAdmin
- See Also:
VeniceHelixAdmin.updateClusterConfig(String, UpdateClusterConfigQueryParams)
-
getStorageEngineOverheadRatio
public double getStorageEngineOverheadRatio(java.lang.String clusterName)
- Specified by:
getStorageEngineOverheadRatio
in interfaceAdmin
- See Also:
VeniceHelixAdmin.getStorageEngineOverheadRatio(String)
-
getKeySchema
public SchemaEntry getKeySchema(java.lang.String clusterName, java.lang.String storeName)
- Specified by:
getKeySchema
in interfaceAdmin
- See Also:
VeniceHelixAdmin.getKeySchema(String, String)
-
getValueSchemas
public java.util.Collection<SchemaEntry> getValueSchemas(java.lang.String clusterName, java.lang.String storeName)
- Specified by:
getValueSchemas
in interfaceAdmin
- See Also:
VeniceHelixAdmin.getValueSchemas(String, String)
-
getDerivedSchemas
public java.util.Collection<DerivedSchemaEntry> getDerivedSchemas(java.lang.String clusterName, java.lang.String storeName)
- Specified by:
getDerivedSchemas
in interfaceAdmin
- See Also:
VeniceHelixAdmin.getDerivedSchemas(String, String)
-
getValueSchemaId
public int getValueSchemaId(java.lang.String clusterName, java.lang.String storeName, java.lang.String valueSchemaStr)
- Specified by:
getValueSchemaId
in interfaceAdmin
- See Also:
VeniceHelixAdmin.getValueSchemaId(String, String, String)
-
getDerivedSchemaId
public GeneratedSchemaID getDerivedSchemaId(java.lang.String clusterName, java.lang.String storeName, java.lang.String schemaStr)
- Specified by:
getDerivedSchemaId
in interfaceAdmin
- See Also:
VeniceHelixAdmin.getDerivedSchemaId(String, String, String)
-
getValueSchema
public SchemaEntry getValueSchema(java.lang.String clusterName, java.lang.String storeName, int id)
- Specified by:
getValueSchema
in interfaceAdmin
- See Also:
VeniceHelixAdmin.getValueSchema(String, String, int)
-
addValueSchema
public SchemaEntry addValueSchema(java.lang.String clusterName, java.lang.String storeName, java.lang.String newValueSchemaStr, DirectionalSchemaCompatibilityType expectedCompatibilityType)
Add a new value schema for the given store with all specified properties by sending aVALUE_SCHEMA_CREATION
admin message.- Specified by:
addValueSchema
in interfaceAdmin
- Returns:
- an
SchemaEntry
object composed of a schema and its corresponding id.
-
addSupersetSchema
public SchemaEntry addSupersetSchema(java.lang.String clusterName, java.lang.String storeName, java.lang.String valueSchemaStr, int valueSchemaId, java.lang.String supersetSchemaStr, int supersetSchemaId)
Unsupported operation in the parent controller.- Specified by:
addSupersetSchema
in interfaceAdmin
-
addValueSchema
public SchemaEntry addValueSchema(java.lang.String clusterName, java.lang.String storeName, java.lang.String newValueSchemaStr, int schemaId, DirectionalSchemaCompatibilityType expectedCompatibilityType)
- Specified by:
addValueSchema
in interfaceAdmin
-
addDerivedSchema
public DerivedSchemaEntry addDerivedSchema(java.lang.String clusterName, java.lang.String storeName, int valueSchemaId, java.lang.String derivedSchemaStr)
Add a new superset schema for the given store with all specified properties by sending aDERIVED_SCHEMA_CREATION
admin message.- Specified by:
addDerivedSchema
in interfaceAdmin
- Returns:
- an
DerivedSchemaEntry
object composed of a derived schema and its corresponding id.
-
addDerivedSchema
public DerivedSchemaEntry addDerivedSchema(java.lang.String clusterName, java.lang.String storeName, int valueSchemaId, int derivedSchemaId, java.lang.String derivedSchemaStr)
Unsupported operation in the parent controller.- Specified by:
addDerivedSchema
in interfaceAdmin
-
removeDerivedSchema
public DerivedSchemaEntry removeDerivedSchema(java.lang.String clusterName, java.lang.String storeName, int valueSchemaId, int derivedSchemaId)
Unsupported operation in the parent controller.- Specified by:
removeDerivedSchema
in interfaceAdmin
- Returns:
- the derived schema that is deleted or null if the schema doesn't exist
-
getReplicationMetadataSchemas
public java.util.Collection<RmdSchemaEntry> getReplicationMetadataSchemas(java.lang.String clusterName, java.lang.String storeName)
- Specified by:
getReplicationMetadataSchemas
in interfaceAdmin
- See Also:
VeniceHelixAdmin.getReplicationMetadataSchemas(String, String)
-
getReplicationMetadataSchema
public java.util.Optional<org.apache.avro.Schema> getReplicationMetadataSchema(java.lang.String clusterName, java.lang.String storeName, int valueSchemaID, int rmdVersionID)
- Specified by:
getReplicationMetadataSchema
in interfaceAdmin
- See Also:
VeniceHelixAdmin.getReplicationMetadataSchema(String, String, int, int)
-
addReplicationMetadataSchema
public RmdSchemaEntry addReplicationMetadataSchema(java.lang.String clusterName, java.lang.String storeName, int valueSchemaId, int replicationMetadataVersionId, java.lang.String replicationMetadataSchemaStr)
Create a newReplicationMetadataSchemaEntry
object with the given properties and add it into schema repository by sendingREPLICATION_METADATA_SCHEMA_CREATION
admin message.- Specified by:
addReplicationMetadataSchema
in interfaceAdmin
-
validateAndMaybeRetrySystemStoreAutoCreation
public void validateAndMaybeRetrySystemStoreAutoCreation(java.lang.String clusterName, java.lang.String storeName, VeniceSystemStoreType veniceSystemStoreType)
Unsupported operation in the parent controller.- Specified by:
validateAndMaybeRetrySystemStoreAutoCreation
in interfaceAdmin
-
getStorageNodes
public java.util.List<java.lang.String> getStorageNodes(java.lang.String clusterName)
Unsupported operation in the parent controller.- Specified by:
getStorageNodes
in interfaceAdmin
-
getStorageNodesStatus
public java.util.Map<java.lang.String,java.lang.String> getStorageNodesStatus(java.lang.String clusterName, boolean enableReplica)
Unsupported operation in the parent controller.- Specified by:
getStorageNodesStatus
in interfaceAdmin
-
removeStorageNode
public void removeStorageNode(java.lang.String clusterName, java.lang.String instanceId)
Unsupported operation in the parent controller.- Specified by:
removeStorageNode
in interfaceAdmin
-
getOffLinePushStatus
public Admin.OfflinePushStatusInfo getOffLinePushStatus(java.lang.String clusterName, java.lang.String kafkaTopic)
Queries child clusters for status. Of all responses, return highest of (in order) NOT_CREATED, NEW, STARTED, PROGRESS. If all responses are COMPLETED, returns COMPLETED. If any response is ERROR and all responses are terminal (COMPLETED or ERROR), returns ERROR If any response is ERROR and any response is not terminal, returns PROGRESS ARCHIVED is treated as NOT_CREATED If error in querying half or more of clusters, returns PROGRESS. (so that polling will continue)- Specified by:
getOffLinePushStatus
in interfaceAdmin
- Parameters:
clusterName
-kafkaTopic
-- Returns:
-
getOffLinePushStatus
public Admin.OfflinePushStatusInfo getOffLinePushStatus(java.lang.String clusterName, java.lang.String kafkaTopic, java.util.Optional<java.lang.String> incrementalPushVersion, java.lang.String region, java.lang.String targetedRegions)
- Specified by:
getOffLinePushStatus
in interfaceAdmin
- See Also:
Admin.getOffLinePushStatus(String, String)
-
getFinalReturnStatus
protected static ExecutionStatus getFinalReturnStatus(java.util.Map<java.lang.String,ExecutionStatus> statuses, java.util.Set<java.lang.String> childRegions, int numChildRegionsFailedToFetchStatus, java.lang.StringBuilder currentReturnStatusDetails)
Based on the global information, start determining the final status to return- Parameters:
statuses
-childRegions
-numChildRegionsFailedToFetchStatus
-currentReturnStatusDetails
-- Returns:
-
getKafkaBootstrapServers
public java.lang.String getKafkaBootstrapServers(boolean isSSL)
Description copied from interface:Admin
Return the ssl or non-ssl bootstrap servers based on the given flag.- Specified by:
getKafkaBootstrapServers
in interfaceAdmin
- Returns:
- kafka bootstrap servers url, if there are multiple will be comma separated.
- See Also:
VeniceHelixAdmin.getKafkaBootstrapServers(boolean)
-
getRegionName
public java.lang.String getRegionName()
Description copied from interface:Admin
Return the region name of this Admin- Specified by:
getRegionName
in interfaceAdmin
- Returns:
- the region name of this controller
-
getNativeReplicationKafkaBootstrapServerAddress
public java.lang.String getNativeReplicationKafkaBootstrapServerAddress(java.lang.String sourceFabric)
- Specified by:
getNativeReplicationKafkaBootstrapServerAddress
in interfaceAdmin
- See Also:
VeniceHelixAdmin.getNativeReplicationKafkaBootstrapServerAddress(String)
-
getNativeReplicationSourceFabric
public java.lang.String getNativeReplicationSourceFabric(java.lang.String clusterName, Store store, java.util.Optional<java.lang.String> sourceGridFabric, java.util.Optional<java.lang.String> emergencySourceRegion, java.lang.String targetedRegions)
- Specified by:
getNativeReplicationSourceFabric
in interfaceAdmin
- See Also:
VeniceHelixAdmin.getNativeReplicationSourceFabric(String, Store, Optional, Optional, String)
-
isSSLEnabledForPush
public boolean isSSLEnabledForPush(java.lang.String clusterName, java.lang.String storeName)
Description copied from interface:Admin
Return whether ssl is enabled for the given store for push.- Specified by:
isSSLEnabledForPush
in interfaceAdmin
- See Also:
VeniceHelixAdmin.isSSLEnabledForPush(String, String)
-
isSslToKafka
public boolean isSslToKafka()
- Specified by:
isSslToKafka
in interfaceAdmin
- See Also:
VeniceHelixAdmin.isSslToKafka()
-
getTopicManager
public TopicManager getTopicManager()
- Specified by:
getTopicManager
in interfaceAdmin
- See Also:
VeniceHelixAdmin.getTopicManager()
-
getTopicManager
public TopicManager getTopicManager(java.lang.String pubSubServerAddress)
- Specified by:
getTopicManager
in interfaceAdmin
- See Also:
VeniceHelixAdmin.getTopicManager(String)
-
getAggregatedHealthStatus
public InstanceRemovableStatuses getAggregatedHealthStatus(java.lang.String cluster, java.util.List<java.lang.String> instances, java.util.List<java.lang.String> toBeStoppedInstances, boolean isSSLEnabled)
- Specified by:
getAggregatedHealthStatus
in interfaceAdmin
-
isRTTopicDeletionPermittedByAllControllers
public boolean isRTTopicDeletionPermittedByAllControllers(java.lang.String clusterName, java.lang.String storeName)
- Specified by:
isRTTopicDeletionPermittedByAllControllers
in interfaceAdmin
-
isLeaderControllerFor
public boolean isLeaderControllerFor(java.lang.String clusterName)
Description copied from interface:Admin
Check if this controller itself is the leader controller for a given cluster or not. Note that the controller can be either a parent controller or a child controller since a cluster must have a leader child controller and a leader parent controller. The point is not to be confused the concept of leader-standby with parent-child controller architecture.- Specified by:
isLeaderControllerFor
in interfaceAdmin
- See Also:
VeniceHelixAdmin.isLeaderControllerFor(String)
-
calculateNumberOfPartitions
public int calculateNumberOfPartitions(java.lang.String clusterName, java.lang.String storeName)
Description copied from interface:Admin
Calculate how many partitions are needed for the given store.- Specified by:
calculateNumberOfPartitions
in interfaceAdmin
- See Also:
Admin.calculateNumberOfPartitions(String, String)
-
getReplicationFactor
public int getReplicationFactor(java.lang.String clusterName, java.lang.String storeName)
- Specified by:
getReplicationFactor
in interfaceAdmin
- See Also:
VeniceHelixAdmin.getReplicationFactor(String, String)
-
getDatacenterCount
public int getDatacenterCount(java.lang.String clusterName)
Description copied from interface:Admin
number of datacenters, 1 if in single cluster mode. Could be more if this is a parent controller- Specified by:
getDatacenterCount
in interfaceAdmin
- See Also:
Admin.getDatacenterCount(String)
-
getReplicas
public java.util.List<Replica> getReplicas(java.lang.String clusterName, java.lang.String kafkaTopic)
- Specified by:
getReplicas
in interfaceAdmin
- See Also:
VeniceHelixAdmin.getReplicas(String, String)
-
getReplicasOfStorageNode
public java.util.List<Replica> getReplicasOfStorageNode(java.lang.String clusterName, java.lang.String instanceId)
Unsupported operation in the parent controller.- Specified by:
getReplicasOfStorageNode
in interfaceAdmin
-
isInstanceRemovable
public NodeRemovableResult isInstanceRemovable(java.lang.String clusterName, java.lang.String instanceId, java.util.List<java.lang.String> lockedNodes)
Unsupported operation in the parent controller.- Specified by:
isInstanceRemovable
in interfaceAdmin
- Parameters:
clusterName
- The cluster were the hosts belong.instanceId
- nodeId of helix participant. HOST_PORT.lockedNodes
- A list of helix nodeIds whose resources are assumed to be unusable (stopped).
-
nodeReplicaReadiness
public Pair<NodeReplicasReadinessState,java.util.List<Replica>> nodeReplicaReadiness(java.lang.String cluster, java.lang.String helixNodeId)
Unsupported operation in the parent controller.- Specified by:
nodeReplicaReadiness
in interfaceAdmin
-
initiateDataRecovery
public void initiateDataRecovery(java.lang.String clusterName, java.lang.String storeName, int version, java.lang.String sourceFabric, java.lang.String destinationFabric, boolean copyAllVersionConfigs, java.util.Optional<Version> ignored)
Description copied from interface:Admin
Initiate data recovery for a store version given a source fabric.- Specified by:
initiateDataRecovery
in interfaceAdmin
- Parameters:
clusterName
- of the store.storeName
- of the store.version
- of the store.sourceFabric
- to be used as the source for data recovery.copyAllVersionConfigs
- a boolean to indicate whether all version configs should be copied from the source fabric or only the essential version configs and generate the rest based on destination fabric's Store configs.ignored
- source fabric's Version configs used to configure the recovering version in the destination fabric.- See Also:
Admin.initiateDataRecovery(String, String, int, String, String, boolean, Optional)
-
prepareDataRecovery
public void prepareDataRecovery(java.lang.String clusterName, java.lang.String storeName, int version, java.lang.String sourceFabric, java.lang.String destinationFabric, java.util.Optional<java.lang.Integer> ignored)
Description copied from interface:Admin
Prepare for data recovery in the destination fabric. The interested store version might have lingering states and resources in the destination fabric from previous failed attempts. Perform some basic checks to make sure the store version in the destination fabric is capable of performing data recovery and cleanup any lingering states and resources.- Specified by:
prepareDataRecovery
in interfaceAdmin
- See Also:
Admin.prepareDataRecovery(String, String, int, String, String, Optional)
-
isStoreVersionReadyForDataRecovery
public Pair<java.lang.Boolean,java.lang.String> isStoreVersionReadyForDataRecovery(java.lang.String clusterName, java.lang.String storeName, int version, java.lang.String sourceFabric, java.lang.String destinationFabric, java.util.Optional<java.lang.Integer> ignored)
Description copied from interface:Admin
Check if the store version's previous states and resources are cleaned up and ready to start data recovery.- Specified by:
isStoreVersionReadyForDataRecovery
in interfaceAdmin
- Returns:
- whether is ready to start data recovery and the reason if it's not ready.
- See Also:
Admin.isStoreVersionReadyForDataRecovery(String, String, int, String, String, Optional)
-
getLeaderController
public Instance getLeaderController(java.lang.String clusterName)
Description copied from interface:Admin
Get instance of leader controller. If there is no leader controller for the given cluster, throw a VeniceException.- Specified by:
getLeaderController
in interfaceAdmin
- See Also:
Admin.getLeaderController(String)
-
addInstanceToAllowlist
public void addInstanceToAllowlist(java.lang.String clusterName, java.lang.String helixNodeId)
Unsupported operation in the parent controller.- Specified by:
addInstanceToAllowlist
in interfaceAdmin
-
removeInstanceFromAllowList
public void removeInstanceFromAllowList(java.lang.String clusterName, java.lang.String helixNodeId)
Unsupported operation in the parent controller.- Specified by:
removeInstanceFromAllowList
in interfaceAdmin
-
getAllowlist
public java.util.Set<java.lang.String> getAllowlist(java.lang.String clusterName)
Unsupported operation in the parent controller.- Specified by:
getAllowlist
in interfaceAdmin
-
killOfflinePush
public void killOfflinePush(java.lang.String clusterName, java.lang.String kafkaTopic, boolean isForcedKill)
Description copied from interface:Admin
Kill an offline push if it ran into errors or the corresponding version is being retired.- Specified by:
killOfflinePush
in interfaceAdmin
isForcedKill
- should be set to true when killing the push job for retiring the corresponding version.- See Also:
Admin.killOfflinePush(String, String, boolean)
-
getStorageNodesStatus
public StorageNodeStatus getStorageNodesStatus(java.lang.String clusterName, java.lang.String instanceId)
Unsupported operation in the parent controller.- Specified by:
getStorageNodesStatus
in interfaceAdmin
-
isStorageNodeNewerOrEqualTo
public boolean isStorageNodeNewerOrEqualTo(java.lang.String clusterName, java.lang.String instanceId, StorageNodeStatus oldServerStatus)
Unsupported operation in the parent controller.- Specified by:
isStorageNodeNewerOrEqualTo
in interfaceAdmin
-
setAdminConsumerService
public void setAdminConsumerService(java.lang.String clusterName, AdminConsumerService service)
- Specified by:
setAdminConsumerService
in interfaceAdmin
- See Also:
Admin.setAdminConsumerService(String, AdminConsumerService)
-
skipAdminMessage
public void skipAdminMessage(java.lang.String clusterName, long offset, boolean skipDIV)
Description copied from interface:Admin
The admin consumption task tries to deal with failures to process an admin message by retrying. If there is a message that cannot be processed for some reason, we will need to forcibly skip that message in order to unblock the task from consuming subsequent messages.- Specified by:
skipAdminMessage
in interfaceAdmin
skipDIV
- tries to skip only the DIV check for the blocking message.- See Also:
Admin.skipAdminMessage(String, long, boolean)
-
getLastSucceedExecutionId
public java.lang.Long getLastSucceedExecutionId(java.lang.String clustername)
Description copied from interface:Admin
Get the id of the last succeed execution in this controller.- Specified by:
getLastSucceedExecutionId
in interfaceAdmin
- See Also:
Admin.getLastSucceedExecutionId(String)
-
getAdminCommandExecutionTracker
public java.util.Optional<AdminCommandExecutionTracker> getAdminCommandExecutionTracker(java.lang.String clusterName)
Description copied from interface:Admin
Get the tracker used to track the execution of the admin command for the given cluster.- Specified by:
getAdminCommandExecutionTracker
in interfaceAdmin
- See Also:
Admin.getAdminCommandExecutionTracker(String)
-
getAdminTopicMetadata
public java.util.Map<java.lang.String,java.lang.Long> getAdminTopicMetadata(java.lang.String clusterName, java.util.Optional<java.lang.String> storeName)
Unsupported operation in the parent controller.- Specified by:
getAdminTopicMetadata
in interfaceAdmin
-
updateAdminTopicMetadata
public void updateAdminTopicMetadata(java.lang.String clusterName, long executionId, java.util.Optional<java.lang.String> storeName, java.util.Optional<java.lang.Long> offset, java.util.Optional<java.lang.Long> upstreamOffset)
Unsupported operation in the parent controller.- Specified by:
updateAdminTopicMetadata
in interfaceAdmin
-
getRoutersClusterConfig
public RoutersClusterConfig getRoutersClusterConfig(java.lang.String clusterName)
Unsupported operation in the parent controller.- Specified by:
getRoutersClusterConfig
in interfaceAdmin
-
updateRoutersClusterConfig
public void updateRoutersClusterConfig(java.lang.String clusterName, java.util.Optional<java.lang.Boolean> isThrottlingEnable, java.util.Optional<java.lang.Boolean> isQuotaRebalancedEnable, java.util.Optional<java.lang.Boolean> isMaxCapacityProtectionEnabled, java.util.Optional<java.lang.Integer> expectedRouterCount)
Unsupported operation in the parent controller.- Specified by:
updateRoutersClusterConfig
in interfaceAdmin
-
getAllStorePushStrategyForMigration
public java.util.Map<java.lang.String,java.lang.String> getAllStorePushStrategyForMigration()
- Specified by:
getAllStorePushStrategyForMigration
in interfaceAdmin
- Returns:
- all push-strategies defined in the ZK path
MigrationPushStrategyZKAccessor.MIGRATION_PUSH_STRATEGY_PATH
-
setStorePushStrategyForMigration
public void setStorePushStrategyForMigration(java.lang.String voldemortStoreName, java.lang.String strategy)
Set a push-strategy in the ZK pathMigrationPushStrategyZKAccessor.MIGRATION_PUSH_STRATEGY_PATH
.- Specified by:
setStorePushStrategyForMigration
in interfaceAdmin
-
discoverCluster
public Pair<java.lang.String,java.lang.String> discoverCluster(java.lang.String storeName)
Description copied from interface:Admin
Find the cluster which the given store belongs to. Return the pair of the cluster name and the d2 service associated with that cluster.- Specified by:
discoverCluster
in interfaceAdmin
- See Also:
Admin.discoverCluster(String)
-
getServerD2Service
public java.lang.String getServerD2Service(java.lang.String clusterName)
Description copied from interface:Admin
Find the server d2 service associated with a given cluster name.- Specified by:
getServerD2Service
in interfaceAdmin
- See Also:
Admin.getServerD2Service(String)
-
findAllBootstrappingVersions
public java.util.Map<java.lang.String,java.lang.String> findAllBootstrappingVersions(java.lang.String clusterName)
Unsupported operation in the parent controller.- Specified by:
findAllBootstrappingVersions
in interfaceAdmin
-
getVeniceWriterFactory
public VeniceWriterFactory getVeniceWriterFactory()
- Specified by:
getVeniceWriterFactory
in interfaceAdmin
- Returns:
- a
VeniceWriterFactory
object used by the Venice controller to create the venice writer.
-
getPubSubConsumerAdapterFactory
public PubSubConsumerAdapterFactory getPubSubConsumerAdapterFactory()
- Specified by:
getPubSubConsumerAdapterFactory
in interfaceAdmin
- See Also:
VeniceHelixAdmin.getPubSubConsumerAdapterFactory()
-
getPubSubSSLProperties
public VeniceProperties getPubSubSSLProperties(java.lang.String pubSubBrokerAddress)
- Specified by:
getPubSubSSLProperties
in interfaceAdmin
-
stop
public void stop(java.lang.String clusterName)
Description copied from interface:Admin
Stop the helix controller for a single cluster.- Specified by:
stop
in interfaceAdmin
- See Also:
Admin.stop(String)
-
stopVeniceController
public void stopVeniceController()
Description copied from interface:Admin
Stop the entire controller but not only the helix controller for a single cluster.- Specified by:
stopVeniceController
in interfaceAdmin
- See Also:
Admin.stopVeniceController()
-
close
public void close()
CauseVeniceParentHelixAdmin
and its associated services to stop executing.
-
isLeaderControllerOfControllerCluster
public boolean isLeaderControllerOfControllerCluster()
Description copied from interface:Admin
This function can be used to perform cluster-wide operations which need to be performed by a single process only in the whole cluster. There could be a race condition during leader controller failover, and so long operation should have some way of guarding against that.- Specified by:
isLeaderControllerOfControllerCluster
in interfaceAdmin
- See Also:
VeniceHelixAdmin.isLeaderControllerOfControllerCluster()
-
isTopicTruncated
public boolean isTopicTruncated(java.lang.String kafkaTopicName)
- Specified by:
isTopicTruncated
in interfaceAdmin
- See Also:
VeniceHelixAdmin.isTopicTruncated(String)
-
isTopicTruncatedBasedOnRetention
public boolean isTopicTruncatedBasedOnRetention(long retention)
- Specified by:
isTopicTruncatedBasedOnRetention
in interfaceAdmin
- See Also:
VeniceHelixAdmin.isTopicTruncatedBasedOnRetention(long)
-
isTopicTruncatedBasedOnRetention
public boolean isTopicTruncatedBasedOnRetention(java.lang.String kafkaTopicName, long retentionTime)
- Specified by:
isTopicTruncatedBasedOnRetention
in interfaceAdmin
-
getMinNumberOfUnusedKafkaTopicsToPreserve
public int getMinNumberOfUnusedKafkaTopicsToPreserve()
- Specified by:
getMinNumberOfUnusedKafkaTopicsToPreserve
in interfaceAdmin
- See Also:
VeniceHelixAdmin.getMinNumberOfUnusedKafkaTopicsToPreserve()
-
truncateKafkaTopic
public boolean truncateKafkaTopic(java.lang.String kafkaTopicName)
- Specified by:
truncateKafkaTopic
in interfaceAdmin
- Returns:
- false indicates that the truncate operation has already been done before; true if it's the first time truncating this topic.
- See Also:
VeniceHelixAdmin.truncateKafkaTopic(String)
-
truncateKafkaTopic
public boolean truncateKafkaTopic(java.lang.String kafkaTopicName, long retentionTime)
Description copied from interface:Admin
Truncate a Kafka topic by setting its retention time to the input value.- Specified by:
truncateKafkaTopic
in interfaceAdmin
- Parameters:
kafkaTopicName
- the name of the topic to truncate.retentionTime
- the retention time in milliseconds to set for the topic.- Returns:
- true if truncating this topic successfully. false otherwise.
- See Also:
Admin.truncateKafkaTopic(String, long)
-
isResourceStillAlive
public boolean isResourceStillAlive(java.lang.String resourceName)
Unsupported operation in the parent controller.- Specified by:
isResourceStillAlive
in interfaceAdmin
-
updateClusterDiscovery
public void updateClusterDiscovery(java.lang.String storeName, java.lang.String oldCluster, java.lang.String newCluster, java.lang.String initiatingCluster)
Description copied from interface:Admin
Update the cluster discovery of a given store by writing to the StoreConfig ZNode.- Specified by:
updateClusterDiscovery
in interfaceAdmin
- Parameters:
storeName
- of the store.oldCluster
- for the store.newCluster
- for the store.initiatingCluster
- that is making the update. This is needed because in the case of store migration sometimes the update is not made by the leader of the current cluster but instead the leader of the source cluster.- See Also:
Admin.updateClusterDiscovery(String, String, String, String)
-
sendPushJobDetails
public void sendPushJobDetails(PushJobStatusRecordKey key, PushJobDetails value)
- Specified by:
sendPushJobDetails
in interfaceAdmin
- See Also:
VeniceHelixAdmin.sendPushJobDetails(PushJobStatusRecordKey, PushJobDetails)
-
getPushJobDetails
public PushJobDetails getPushJobDetails(PushJobStatusRecordKey key)
- Specified by:
getPushJobDetails
in interfaceAdmin
- See Also:
VeniceHelixAdmin.getPushJobDetails(PushJobStatusRecordKey)
-
getBatchJobHeartbeatValue
public BatchJobHeartbeatValue getBatchJobHeartbeatValue(BatchJobHeartbeatKey batchJobHeartbeatKey)
- Specified by:
getBatchJobHeartbeatValue
in interfaceAdmin
- See Also:
VeniceHelixAdmin.getBatchJobHeartbeatValue(BatchJobHeartbeatKey)
-
writeEndOfPush
public void writeEndOfPush(java.lang.String clusterName, java.lang.String storeName, int versionNumber, boolean alsoWriteStartOfPush)
- Specified by:
writeEndOfPush
in interfaceAdmin
- See Also:
VeniceHelixAdmin.writeEndOfPush(String, String, int, boolean)
-
whetherEnableBatchPushFromAdmin
public boolean whetherEnableBatchPushFromAdmin(java.lang.String storeName)
- Specified by:
whetherEnableBatchPushFromAdmin
in interfaceAdmin
-
isStoreMigrationAllowed
public boolean isStoreMigrationAllowed(java.lang.String clusterName)
- Specified by:
isStoreMigrationAllowed
in interfaceAdmin
- See Also:
VeniceHelixAdmin.isStoreMigrationAllowed(String)
-
migrateStore
public void migrateStore(java.lang.String srcClusterName, java.lang.String destClusterName, java.lang.String storeName)
Migrate a store from its source cluster to a new destination cluster by sending aMIGRATE_STORE
admin message.- Specified by:
migrateStore
in interfaceAdmin
-
completeMigration
public void completeMigration(java.lang.String srcClusterName, java.lang.String destClusterName, java.lang.String storeName)
- Specified by:
completeMigration
in interfaceAdmin
- See Also:
VeniceHelixAdmin.updateClusterDiscovery(String, String, String, String)
-
abortMigration
public void abortMigration(java.lang.String srcClusterName, java.lang.String destClusterName, java.lang.String storeName)
Abort store migration by sending aABORT_MIGRATION
admin message.- Specified by:
abortMigration
in interfaceAdmin
-
getMetaStoreValue
public StoreMetaValue getMetaStoreValue(StoreMetaKey metaKey, java.lang.String storeName)
- Specified by:
getMetaStoreValue
in interfaceAdmin
-
updateAclForStore
public void updateAclForStore(java.lang.String clusterName, java.lang.String storeName, java.lang.String accessPermissions)
Description copied from interface:Admin
Provision a new set of ACL for a venice store and its associated kafka topic.- Specified by:
updateAclForStore
in interfaceAdmin
- See Also:
Admin.updateAclForStore(String, String, String)
-
updateSystemStoreAclForStore
public void updateSystemStoreAclForStore(java.lang.String clusterName, java.lang.String regularStoreName, AclBinding systemStoreAclBinding)
Set the AceEntries in provided AclBinding object to be the current set of ACL's for the resource.
-
getAclForStore
public java.lang.String getAclForStore(java.lang.String clusterName, java.lang.String storeName)
Description copied from interface:Admin
Fetch the current set of ACL provisioned for a venice store and its associated kafka topic.- Specified by:
getAclForStore
in interfaceAdmin
- Returns:
- The string representation of the accessPermissions. It will return empty string in case store is not present.
- See Also:
Admin.getAclForStore(String, String)
-
deleteAclForStore
public void deleteAclForStore(java.lang.String clusterName, java.lang.String storeName)
Description copied from interface:Admin
Delete the current set of ACL provisioned for a venice store and its associated kafka topic.- Specified by:
deleteAclForStore
in interfaceAdmin
- See Also:
Admin.deleteAclForStore(String, String)
-
configureActiveActiveReplication
public void configureActiveActiveReplication(java.lang.String clusterName, VeniceUserStoreType storeType, java.util.Optional<java.lang.String> storeName, boolean enableNativeReplicationForCluster, java.util.Optional<java.lang.String> regionsFilter)
Description copied from interface:Admin
Enable/disable active active replications for certain stores (batch only, hybrid only, incremental push, hybrid or incremental push, all) in a cluster. If storeName is not empty, only the specified store might be updated.- Specified by:
configureActiveActiveReplication
in interfaceAdmin
- See Also:
Admin.configureActiveActiveReplication(String, VeniceUserStoreType, Optional, boolean, Optional)
-
getClusterStaleStores
public java.util.Map<java.lang.String,StoreDataAudit> getClusterStaleStores(java.lang.String clusterName)
This function will iterate over all of Helix Parent Admin's child controllers, in order to ask about stale stores.- Specified by:
getClusterStaleStores
in interfaceAdmin
-
getLargestUsedVersionFromStoreGraveyard
public int getLargestUsedVersionFromStoreGraveyard(java.lang.String clusterName, java.lang.String storeName)
- Specified by:
getLargestUsedVersionFromStoreGraveyard
in interfaceAdmin
- Returns:
- the largest used version number for the given store from the store graveyard.
-
getClusterStores
public java.util.ArrayList<StoreInfo> getClusterStores(java.lang.String clusterName)
Unsupported operation in the parent controller.- Specified by:
getClusterStores
in interfaceAdmin
-
getRegionPushDetails
public RegionPushDetails getRegionPushDetails(java.lang.String clusterName, java.lang.String storeName, boolean isPartitionDetailAdded)
Unsupported operation in the parent controller.- Specified by:
getRegionPushDetails
in interfaceAdmin
-
listStorePushInfo
public java.util.Map<java.lang.String,RegionPushDetails> listStorePushInfo(java.lang.String clusterName, java.lang.String storeName, boolean isPartitionDetailEnabled)
This function will look for a single store, given a name and cluster name, and return information about the current push jobs for that store across all regions.- Specified by:
listStorePushInfo
in interfaceAdmin
-
checkResourceCleanupBeforeStoreCreation
public void checkResourceCleanupBeforeStoreCreation(java.lang.String clusterName, java.lang.String storeName)
This function will check whether there are still resources left for the requested store in the requested cluster. This function will check both parent colo and all prod colos.- Specified by:
checkResourceCleanupBeforeStoreCreation
in interfaceAdmin
-
isParent
public boolean isParent()
Description copied from interface:Admin
Check whether the controller works as a parent controller- Specified by:
isParent
in interfaceAdmin
- Returns:
- true if it works as a parent controller. Otherwise, return false.
- See Also:
Admin.isParent()
-
getParentControllerRegionState
public ParentControllerRegionState getParentControllerRegionState()
Description copied from interface:Admin
Return the state of the region of the parent controller.- Specified by:
getParentControllerRegionState
in interfaceAdmin
- Returns:
ParentControllerRegionState.ACTIVE
which means that the parent controller in the region is serving requests. Otherwise, returnParentControllerRegionState.PASSIVE
- See Also:
Admin.getParentControllerRegionState()
-
getChildDataCenterControllerUrlMap
public java.util.Map<java.lang.String,java.lang.String> getChildDataCenterControllerUrlMap(java.lang.String clusterName)
Description copied from interface:Admin
Get child datacenter to child controller url mapping.- Specified by:
getChildDataCenterControllerUrlMap
in interfaceAdmin
- Returns:
- A map of child datacenter -> child controller url
- See Also:
Admin.getChildDataCenterControllerUrlMap(String)
-
getChildDataCenterControllerD2Map
public java.util.Map<java.lang.String,java.lang.String> getChildDataCenterControllerD2Map(java.lang.String clusterName)
Description copied from interface:Admin
Get child datacenter to child controller d2 zk host mapping- Specified by:
getChildDataCenterControllerD2Map
in interfaceAdmin
- Returns:
- A map of child datacenter -> child controller d2 zk host
- See Also:
Admin.getChildDataCenterControllerD2Map(String)
-
getChildControllerD2ServiceName
public java.lang.String getChildControllerD2ServiceName(java.lang.String clusterName)
Description copied from interface:Admin
Get child datacenter controller d2 service name- Specified by:
getChildControllerD2ServiceName
in interfaceAdmin
- Returns:
- d2 service name
- See Also:
Admin.getChildControllerD2ServiceName(String)
-
getStoreConfigRepo
public HelixReadOnlyStoreConfigRepository getStoreConfigRepo()
Description copied from interface:Admin
Return a shared store config repository.- Specified by:
getStoreConfigRepo
in interfaceAdmin
- See Also:
Admin.getStoreConfigRepo()
-
getReadOnlyZKSharedSystemStoreRepository
public HelixReadOnlyZKSharedSystemStoreRepository getReadOnlyZKSharedSystemStoreRepository()
Description copied from interface:Admin
Return a shared read only store repository for zk shared stores.- Specified by:
getReadOnlyZKSharedSystemStoreRepository
in interfaceAdmin
- See Also:
Admin.getReadOnlyZKSharedSystemStoreRepository()
-
getReadOnlyZKSharedSchemaRepository
public HelixReadOnlyZKSharedSchemaRepository getReadOnlyZKSharedSchemaRepository()
Description copied from interface:Admin
Return a shared read only schema repository for zk shared stores.- Specified by:
getReadOnlyZKSharedSchemaRepository
in interfaceAdmin
- See Also:
Admin.getReadOnlyZKSharedSystemStoreRepository()
-
getMetaStoreWriter
public MetaStoreWriter getMetaStoreWriter()
Description copied from interface:Admin
Return aMetaStoreWriter
, which can be shared across different Venice clusters.- Specified by:
getMetaStoreWriter
in interfaceAdmin
- See Also:
Admin.getMetaStoreWriter()
-
getMetaStoreReader
public MetaStoreReader getMetaStoreReader()
- Specified by:
getMetaStoreReader
in interfaceAdmin
-
getEmergencySourceRegion
public java.util.Optional<java.lang.String> getEmergencySourceRegion(@Nonnull java.lang.String clusterName)
Description copied from interface:Admin
Return the emergency source region configuration.- Specified by:
getEmergencySourceRegion
in interfaceAdmin
- See Also:
Admin.getEmergencySourceRegion(String)
-
getAggregateRealTimeTopicSource
public java.util.Optional<java.lang.String> getAggregateRealTimeTopicSource(java.lang.String clusterName)
Description copied from interface:Admin
Return the source Kafka boostrap server url for aggregate real-time topic updates- Specified by:
getAggregateRealTimeTopicSource
in interfaceAdmin
- See Also:
Admin.getAggregateRealTimeTopicSource(String)
-
getClustersLeaderOf
public java.util.List<java.lang.String> getClustersLeaderOf()
Description copied from interface:Admin
Get a list of clusters this controller is a leader of.- Specified by:
getClustersLeaderOf
in interfaceAdmin
- Returns:
- a list of clusters this controller is a leader of.
- See Also:
Admin.getClustersLeaderOf()
-
getVeniceHelixAdmin
public VeniceHelixAdmin getVeniceHelixAdmin()
-
getBackupVersionDefaultRetentionMs
public long getBackupVersionDefaultRetentionMs()
Description copied from interface:Admin
Returns default backup version retention time.- Specified by:
getBackupVersionDefaultRetentionMs
in interfaceAdmin
- See Also:
Admin.getBackupVersionDefaultRetentionMs()
-
getDefaultMaxRecordSizeBytes
public int getDefaultMaxRecordSizeBytes()
- Specified by:
getDefaultMaxRecordSizeBytes
in interfaceAdmin
- Returns:
- The default value of
VeniceWriter.maxRecordSizeBytes
which is provided to the VPJ and Consumer as a controller config to dynamically control the setting per cluster. - See Also:
Admin.getDefaultMaxRecordSizeBytes()
-
wipeCluster
public void wipeCluster(java.lang.String clusterName, java.lang.String fabric, java.util.Optional<java.lang.String> storeName, java.util.Optional<java.lang.Integer> versionNum)
Delete stores from the cluster by sending aControllerClient.wipeCluster(String, Optional, Optional)
request.- Specified by:
wipeCluster
in interfaceAdmin
-
compareStore
public StoreComparisonInfo compareStore(java.lang.String clusterName, java.lang.String storeName, java.lang.String fabricA, java.lang.String fabricB) throws java.io.IOException
Description copied from interface:Admin
Compare store metadata and version states between two fabrics.- Specified by:
compareStore
in interfaceAdmin
- Throws:
java.io.IOException
- See Also:
Admin.compareStore(String, String, String, String)
-
copyOverStoreSchemasAndConfigs
public StoreInfo copyOverStoreSchemasAndConfigs(java.lang.String clusterName, java.lang.String srcFabric, java.lang.String destFabric, java.lang.String storeName)
- Specified by:
copyOverStoreSchemasAndConfigs
in interfaceAdmin
- See Also:
Admin.copyOverStoreSchemasAndConfigs(String, String, String, String)
-
createStoragePersona
public void createStoragePersona(java.lang.String clusterName, java.lang.String name, long quotaNumber, java.util.Set<java.lang.String> storesToEnforce, java.util.Set<java.lang.String> owners)
Creates a new persona with the given parameters.- Specified by:
createStoragePersona
in interfaceAdmin
- See Also:
StoragePersonaRepository.addPersona(String, long, Set, Set)
-
getStoragePersona
public StoragePersona getStoragePersona(java.lang.String clusterName, java.lang.String name)
- Specified by:
getStoragePersona
in interfaceAdmin
- See Also:
VeniceHelixAdmin.getStoragePersona(String, String)
-
deleteStoragePersona
public void deleteStoragePersona(java.lang.String clusterName, java.lang.String name)
Deletes the persona with the given name. If no persona is found, this method does nothing.- Specified by:
deleteStoragePersona
in interfaceAdmin
-
updateStoragePersona
public void updateStoragePersona(java.lang.String clusterName, java.lang.String name, UpdateStoragePersonaQueryParams queryParams)
Updates a persona with the given parameters by sending aUPDATE_STORAGE_PERSONA
admin message.- Specified by:
updateStoragePersona
in interfaceAdmin
-
getPersonaAssociatedWithStore
public StoragePersona getPersonaAssociatedWithStore(java.lang.String clusterName, java.lang.String storeName)
- Specified by:
getPersonaAssociatedWithStore
in interfaceAdmin
- See Also:
VeniceHelixAdmin.getPersonaAssociatedWithStore(String, String)
-
getClusterStoragePersonas
public java.util.List<StoragePersona> getClusterStoragePersonas(java.lang.String clusterName)
- Specified by:
getClusterStoragePersonas
in interfaceAdmin
- See Also:
VeniceHelixAdmin.getClusterStoragePersonas(String)
-
cleanupInstanceCustomizedStates
public java.util.List<java.lang.String> cleanupInstanceCustomizedStates(java.lang.String clusterName)
Description copied from interface:Admin
Scan through instance level customized states and remove any lingering ZNodes that are no longer relevant. This operation shouldn't be needed under normal circumstances. It's intended to cleanup ZNodes that failed to be deleted due to bugs and errors.- Specified by:
cleanupInstanceCustomizedStates
in interfaceAdmin
- Parameters:
clusterName
- to perform the cleanup.- Returns:
- list of deleted ZNode paths.
-
getStoreGraveyard
public StoreGraveyard getStoreGraveyard()
- Specified by:
getStoreGraveyard
in interfaceAdmin
-
removeStoreFromGraveyard
public void removeStoreFromGraveyard(java.lang.String clusterName, java.lang.String storeName)
- Specified by:
removeStoreFromGraveyard
in interfaceAdmin
-
getPushStatusStoreReader
public PushStatusStoreReader getPushStatusStoreReader()
- Specified by:
getPushStatusStoreReader
in interfaceAdmin
-
getPushStatusStoreWriter
public PushStatusStoreWriter getPushStatusStoreWriter()
- Specified by:
getPushStatusStoreWriter
in interfaceAdmin
-
sendHeartbeatToSystemStore
public void sendHeartbeatToSystemStore(java.lang.String clusterName, java.lang.String systemStoreName, long heartbeatTimestamp)
Description copied from interface:Admin
Send a heartbeat timestamp to targeted system store.- Specified by:
sendHeartbeatToSystemStore
in interfaceAdmin
-
getHeartbeatFromSystemStore
public long getHeartbeatFromSystemStore(java.lang.String clusterName, java.lang.String storeName)
Description copied from interface:Admin
Read the latest heartbeat timestamp from system store. If it failed to read from system store, this method should return -1.- Specified by:
getHeartbeatFromSystemStore
in interfaceAdmin
-
getHelixVeniceClusterResources
public HelixVeniceClusterResources getHelixVeniceClusterResources(java.lang.String cluster)
- Specified by:
getHelixVeniceClusterResources
in interfaceAdmin
- Returns:
- the aggregate resources required by controller to manage a Venice cluster.
-
getPubSubTopicRepository
public PubSubTopicRepository getPubSubTopicRepository()
- Specified by:
getPubSubTopicRepository
in interfaceAdmin
-
-