Package com.linkedin.venice.controller
Class VeniceParentHelixAdmin
java.lang.Object
com.linkedin.venice.controller.VeniceParentHelixAdmin
- All Implemented Interfaces:
Admin
,Closeable
,AutoCloseable
This class is a wrapper of
VeniceHelixAdmin
, 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
ConstructorDescriptionVeniceParentHelixAdmin
(VeniceHelixAdmin veniceHelixAdmin, VeniceControllerMultiClusterConfig multiClusterConfigs) VeniceParentHelixAdmin
(VeniceHelixAdmin veniceHelixAdmin, VeniceControllerMultiClusterConfig multiClusterConfigs, boolean sslEnabled, Optional<SSLConfig> sslConfig, Optional<DynamicAccessController> accessController, Optional<AuthorizerService> authorizerService, LingeringStoreVersionChecker lingeringStoreVersionChecker) VeniceParentHelixAdmin
(VeniceHelixAdmin veniceHelixAdmin, VeniceControllerMultiClusterConfig multiClusterConfigs, boolean sslEnabled, Optional<SSLConfig> sslConfig, Optional<DynamicAccessController> accessController, Optional<AuthorizerService> authorizerService, LingeringStoreVersionChecker lingeringStoreVersionChecker, WriteComputeSchemaConverter writeComputeSchemaConverter, Optional<SupersetSchemaGenerator> externalSupersetSchemaGenerator, PubSubTopicRepository pubSubTopicRepository, DelegatingClusterLeaderInitializationRoutine initRoutineForPushJobDetailsSystemStore, DelegatingClusterLeaderInitializationRoutine initRoutineForHeartbeatSystemStore) VeniceParentHelixAdmin
(VeniceHelixAdmin veniceHelixAdmin, VeniceControllerMultiClusterConfig multiClusterConfigs, boolean sslEnabled, Optional<SSLConfig> sslConfig, Optional<AuthorizerService> authorizerService) -
Method Summary
Modifier and TypeMethodDescriptionvoid
abortMigration
(String srcClusterName, String destClusterName, String storeName) Abort store migration by sending aABORT_MIGRATION
admin message.addDerivedSchema
(String clusterName, String storeName, int valueSchemaId, int derivedSchemaId, String derivedSchemaStr) Unsupported operation in the parent controller.addDerivedSchema
(String clusterName, String storeName, int valueSchemaId, String derivedSchemaStr) Add a new superset schema for the given store with all specified properties by sending aDERIVED_SCHEMA_CREATION
admin message.void
addInstanceToAllowlist
(String clusterName, String helixNodeId) Unsupported operation in the parent controller.addReplicationMetadataSchema
(String clusterName, String storeName, int valueSchemaId, int replicationMetadataVersionId, String replicationMetadataSchemaStr) Create a newReplicationMetadataSchemaEntry
object with the given properties and add it into schema repository by sendingREPLICATION_METADATA_SCHEMA_CREATION
admin message.addSupersetSchema
(String clusterName, String storeName, String valueSchemaStr, int valueSchemaId, String supersetSchemaStr, int supersetSchemaId) Unsupported operation in the parent controller.addValueSchema
(String clusterName, String storeName, String newValueSchemaStr, int schemaId, DirectionalSchemaCompatibilityType expectedCompatibilityType) addValueSchema
(String clusterName, String storeName, 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
(String clusterName, String storeName, String pushJobId, int versionNumber, int numberOfPartitions, Version.PushType pushType, String remoteKafkaBootstrapServers, long rewindTimeInSecondsOverride, int ignoredRmdVersionID, boolean versionSwapDeferred, int repushSourceVersion) This method behaves differently inVeniceHelixAdmin
andVeniceParentHelixAdmin
.int
calculateNumberOfPartitions
(String clusterName, String storeName) Calculate how many partitions are needed for the given store.void
checkResourceCleanupBeforeStoreCreation
(String clusterName, String storeName) This function will check whether there are still resources left for the requested store in the requested cluster.cleanupInstanceCustomizedStates
(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.compareStore
(String clusterName, String storeName, String fabricA, String fabricB) Compare store metadata and version states between two fabrics.void
completeMigration
(String srcClusterName, String destClusterName, String storeName) void
configureActiveActiveReplication
(String clusterName, VeniceUserStoreType storeType, Optional<String> storeName, boolean enableNativeReplicationForCluster, Optional<String> regionsFilter) Enable/disable active active replications for certain stores (batch only, hybrid only, incremental push, hybrid or incremental push, all) in a cluster.copyOverStoreSchemasAndConfigs
(String clusterName, String srcFabric, String destFabric, String storeName) void
createStoragePersona
(String clusterName, String name, long quotaNumber, Set<String> storesToEnforce, Set<String> owners) Creates a new persona with the given parameters.void
createStore
(String clusterName, String storeName, String owner, String keySchema, String valueSchema, boolean isSystemStore, Optional<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
(String clusterName, String storeName) Delete the current set of ACL provisioned for a venice store and its associated kafka topic.deleteAllVersionsInStore
(String clusterName, String storeName) Delete all of venice versions in given store(including venice resource, kafka topic, offline pushs and all related resources).void
deleteOldVersionInStore
(String clusterName, String storeName, int versionNum) Delete the given version from the store.void
deleteStoragePersona
(String clusterName, String name) Deletes the persona with the given name.void
deleteStore
(String clusterName, 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
(String clusterName, String storeName, Set<Integer> unusedValueSchemaIds) Deletes a store's values schema with ids `except` the ids passed in the argument inuseValueSchemaIdsdiscoverCluster
(String storeName) Find the cluster which the given store belongs to.findAllBootstrappingVersions
(String clusterName) Unsupported operation in the parent controller.getAclForStore
(String clusterName, String storeName) Fetch the current set of ACL provisioned for a venice store and its associated kafka topic.getAdminCommandExecutionTracker
(String clusterName) Get the tracker used to track the execution of the admin command for the given cluster.getAdminTopicMetadata
(String clusterName, Optional<String> storeName) Unsupported operation in the parent controller.getAggregatedHealthStatus
(String cluster, List<String> instances, List<String> toBeStoppedInstances, boolean isSSLEnabled) getAggregateRealTimeTopicSource
(String clusterName) Return the source Kafka boostrap server url for aggregate real-time topic updatesgetAllowlist
(String clusterName) Unsupported operation in the parent controller.getAllStores
(String clusterName) getAllStoreStatuses
(String clusterName) Unsupported operation in the parent controller.int
getBackupVersion
(String clusterName, String storeName) long
Returns default backup version retention time.getBackupVersionsForMultiColos
(String clusterName, String storeName) getBatchJobHeartbeatValue
(BatchJobHeartbeatKey batchJobHeartbeatKey) getChildControllerD2ServiceName
(String clusterName) Get child datacenter controller d2 service namegetChildDataCenterControllerD2Map
(String clusterName) Get child datacenter to child controller d2 zk host mappinggetChildDataCenterControllerUrlMap
(String clusterName) Get child datacenter to child controller url mapping.Get a list of clusters this controller is a leader of.getClusterStaleStores
(String clusterName) This function will iterate over all of Helix Parent Admin's child controllers, in order to ask about stale stores.getClusterStoragePersonas
(String clusterName) getClusterStores
(String clusterName) Unsupported operation in the parent controller.int
getCurrentVersion
(String clusterName, String storeName) Unsupported operation in the parent controller.getCurrentVersionsForMultiColos
(String clusterName, String storeName) Query the current version for the given store.int
getDatacenterCount
(String clusterName) number of datacenters, 1 if in single cluster mode.int
getDerivedSchemaId
(String clusterName, String storeName, String schemaStr) getDerivedSchemas
(String clusterName, String storeName) getEmergencySourceRegion
(String clusterName) Return the emergency source region configuration.protected static ExecutionStatus
getFinalReturnStatus
(Map<String, ExecutionStatus> statuses, Set<String> childRegions, int numChildRegionsFailedToFetchStatus, StringBuilder currentReturnStatusDetails) Based on the global information, start determining the final status to returnint
getFutureVersion
(String clusterName, String storeName) Unsupported operation in the parent controller and returns Store.NON_EXISTING_VERSION.getFutureVersionsForMultiColos
(String clusterName, String storeName) long
getHeartbeatFromSystemStore
(String clusterName, String storeName) Read the latest heartbeat timestamp from system store.getHelixVeniceClusterResources
(String cluster) getIncrementalPushVersion
(String clusterName, String storeName, String pushJobId) A couple of extra checks are needed in parent controller 1.getInUseValueSchemaIds
(String clusterName, String storeName) getKafkaBootstrapServers
(boolean isSSL) Return the ssl or non-ssl bootstrap servers based on the given flag.getKeySchema
(String clusterName, String storeName) int
getLargestUsedVersionFromStoreGraveyard
(String clusterName, String storeName) getLastSucceedExecutionId
(String clustername) Get the id of the last succeed execution in this controller.getLeaderController
(String clusterName) Get instance of leader controller.getMetaStoreValue
(StoreMetaKey metaKey, String storeName) Return aMetaStoreWriter
, which can be shared across different Venice clusters.int
getNativeReplicationKafkaBootstrapServerAddress
(String sourceFabric) getNativeReplicationSourceFabric
(String clusterName, Store store, Optional<String> sourceGridFabric, Optional<String> emergencySourceRegion, String targetedRegions) getOffLinePushStatus
(String clusterName, String kafkaTopic) Queries child clusters for status.getOffLinePushStatus
(String clusterName, String kafkaTopic, Optional<String> incrementalPushVersion, String region, String targetedRegions) Return the state of the region of the parent controller.getPersonaAssociatedWithStore
(String clusterName, String storeName) getPubSubSSLProperties
(String pubSubBrokerAddress) Return a shared read only schema repository for zk shared stores.Return a shared read only store repository for zk shared stores.getReferenceVersionForStreamingWrites
(String clusterName, String storeName, String pushJobId) Return the region name of this AdmingetRegionPushDetails
(String clusterName, String storeName, boolean isPartitionDetailAdded) Unsupported operation in the parent controller.getReplicas
(String clusterName, String kafkaTopic) getReplicasOfStorageNode
(String clusterName, String instanceId) Unsupported operation in the parent controller.int
getReplicationFactor
(String clusterName, String storeName) Optional<org.apache.avro.Schema>
getReplicationMetadataSchema
(String clusterName, String storeName, int valueSchemaID, int rmdVersionID) getReplicationMetadataSchemas
(String clusterName, String storeName) getRepushInfo
(String clusterName, String storeName, Optional<String> fabricName) getRoutersClusterConfig
(String clusterName) Unsupported operation in the parent controller.getServerD2Service
(String clusterName) Find the server d2 service associated with a given cluster name.double
getStorageEngineOverheadRatio
(String clusterName) getStorageNodes
(String clusterName) Unsupported operation in the parent controller.getStorageNodesStatus
(String clusterName, boolean enableReplica) Unsupported operation in the parent controller.getStorageNodesStatus
(String clusterName, String instanceId) Unsupported operation in the parent controller.getStoragePersona
(String clusterName, String name) Return a shared store config repository.getTopicManager
(String pubSubServerAddress) getValueSchema
(String clusterName, String storeName, int id) int
getValueSchemaId
(String clusterName, String storeName, String valueSchemaStr) getValueSchemas
(String clusterName, String storeName) boolean
boolean
hasWritePermissionToBatchJobHeartbeatStore
(X509Certificate requesterCert, String batchJobHeartbeatStoreName) Test if the given certificate has the write-access permission for the given batch-job heartbeat store.incrementVersionIdempotent
(String clusterName, String storeName, String pushJobId, int numberOfPartitions, int replicationFactor, Version.PushType pushType, boolean sendStartOfPush, boolean sorted, String compressionDictionary, Optional<String> sourceGridFabric, Optional<X509Certificate> requesterCert, long rewindTimeInSecondsOverride, Optional<String> emergencySourceRegion, boolean versionSwapDeferred, String targetedRegions, int repushSourceVersion) void
initiateDataRecovery
(String clusterName, String storeName, int version, String sourceFabric, String destinationFabric, boolean copyAllVersionConfigs, Optional<Version> ignored) Initiate data recovery for a store version given a source fabric.void
initStorageCluster
(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
(String clusterName, String storeName, boolean checkCurrentVersion) Returns true if A/A replication is enabled in all child controller and parent controller.boolean
isClusterValid
(String clusterName) Test if a cluster is valid (in Helix cluster list).isInstanceRemovable
(String clusterName, String instanceId, List<String> lockedNodes) Unsupported operation in the parent controller.boolean
isLeaderControllerFor
(String clusterName) Check if this controller itself is the leader controller for a given cluster or not.boolean
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
(String resourceName) Unsupported operation in the parent controller.boolean
isRTTopicDeletionPermittedByAllControllers
(String clusterName, String storeName) boolean
isSSLEnabledForPush
(String clusterName, String storeName) Return whether ssl is enabled for the given store for push.boolean
boolean
isStorageNodeNewerOrEqualTo
(String clusterName, String instanceId, StorageNodeStatus oldServerStatus) Unsupported operation in the parent controller.boolean
isStoreMigrationAllowed
(String clusterName) isStoreVersionReadyForDataRecovery
(String clusterName, String storeName, int version, String sourceFabric, String destinationFabric, Optional<Integer> ignored) Check if the store version's previous states and resources are cleaned up and ready to start data recovery.boolean
isTopicTruncated
(String kafkaTopicName) boolean
isTopicTruncatedBasedOnRetention
(long retention) boolean
isTopicTruncatedBasedOnRetention
(String kafkaTopicName, long retentionTime) void
killOfflinePush
(String clusterName, String kafkaTopic, boolean isForcedKill) Kill an offline push if it ran into errors or the corresponding version is being retired.listStorePushInfo
(String clusterName, 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
(String srcClusterName, String destClusterName, String storeName) Migrate a store from its source cluster to a new destination cluster by sending aMIGRATE_STORE
admin message.nodeReplicaReadiness
(String cluster, String helixNodeId) Unsupported operation in the parent controller.peekNextVersion
(String clusterName, String storeName) Unsupported operation in the parent controller.void
prepareDataRecovery
(String clusterName, String storeName, int version, String sourceFabric, String destinationFabric, Optional<Integer> ignored) Prepare for data recovery in the destination fabric.removeDerivedSchema
(String clusterName, String storeName, int valueSchemaId, int derivedSchemaId) Unsupported operation in the parent controller.void
removeInstanceFromAllowList
(String clusterName, String helixNodeId) Unsupported operation in the parent controller.void
removeStorageNode
(String clusterName, String instanceId) Unsupported operation in the parent controller.void
removeStoreFromGraveyard
(String clusterName, String storeName) void
rollbackToBackupVersion
(String clusterName, String storeName, String regionFilter) Set backup version as current version in all child regions.void
rollForwardToFutureVersion
(String clusterName, String storeName, String regionFilter) void
sendHeartbeatToSystemStore
(String clusterName, String systemStoreName, long heartbeatTimestamp) Send a heartbeat timestamp to targeted system store.void
sendPushJobDetails
(PushJobStatusRecordKey key, PushJobDetails value) void
setAdminConsumerService
(String clusterName, AdminConsumerService service) void
setStoreCurrentVersion
(String clusterName, String storeName, int versionNumber) Unsupported operation in the parent controller.void
setStoreLargestUsedVersion
(String clusterName, String storeName, int versionNumber) Unsupported operation in the parent controller.void
setStoreOwner
(String clusterName, String storeName, String owner) Update the owner of a specified store by sendingSET_STORE_OWNER
admin message to the admin topic.void
setStorePartitionCount
(String clusterName, String storeName, int partitionCount) Update the partition count of a specified store by sendingSET_STORE_PARTITION
admin message to the admin topic.void
setStorePushStrategyForMigration
(String voldemortStoreName, String strategy) Set a push-strategy in the ZK pathMigrationPushStrategyZKAccessor.MIGRATION_PUSH_STRATEGY_PATH
.void
setStoreReadability
(String clusterName, String storeName, boolean desiredReadability) Update the readability of a specified store by sendingENABLE_STORE_READ
orDISABLE_STORE_READ
admin message.void
setStoreReadWriteability
(String clusterName, String storeName, boolean isAccessible) Update both readability and writability of a specified store.void
setStoreWriteability
(String clusterName, String storeName, boolean desiredWriteability) Update the writability of a specified store by sendingENABLE_STORE_WRITE
orDISABLE_STORE_WRITE
admin message.void
skipAdminMessage
(String clusterName, long offset, boolean skipDIV) The admin consumption task tries to deal with failures to process an admin message by retrying.void
Stop the helix controller for a single cluster.void
Stop the entire controller but not only the helix controller for a single cluster.boolean
truncateKafkaTopic
(String kafkaTopicName) boolean
truncateKafkaTopic
(String kafkaTopicName, long retentionTime) Truncate a Kafka topic by setting its retention time to the input value.void
updateAclForStore
(String clusterName, String storeName, String accessPermissions) Provision a new set of ACL for a venice store and its associated kafka topic.void
updateAdminTopicMetadata
(String clusterName, long executionId, Optional<String> storeName, Optional<Long> offset, Optional<Long> upstreamOffset) Unsupported operation in the parent controller.void
updateClusterConfig
(String clusterName, UpdateClusterConfigQueryParams params) void
updateClusterDiscovery
(String storeName, String oldCluster, String newCluster, String initiatingCluster) Update the cluster discovery of a given store by writing to the StoreConfig ZNode.void
updateRoutersClusterConfig
(String clusterName, Optional<Boolean> isThrottlingEnable, Optional<Boolean> isQuotaRebalancedEnable, Optional<Boolean> isMaxCapacityProtectionEnabled, Optional<Integer> expectedRouterCount) Unsupported operation in the parent controller.void
updateStoragePersona
(String clusterName, String name, UpdateStoragePersonaQueryParams queryParams) Updates a persona with the given parameters by sending aUPDATE_STORAGE_PERSONA
admin message.void
updateStore
(String clusterName, String storeName, UpdateStoreQueryParams params) Update a target store properties by first applying the provided deltas and then sendingUPDATE_STORE
admin message.void
updateSystemStoreAclForStore
(String clusterName, String regularStoreName, AclBinding systemStoreAclBinding) Set the AceEntries in provided AclBinding object to be the current set of ACL's for the resource.void
validateAndMaybeRetrySystemStoreAutoCreation
(String clusterName, String storeName, VeniceSystemStoreType veniceSystemStoreType) Unsupported operation in the parent controller.versionsForStore
(String clusterName, String storeName) boolean
whetherEnableBatchPushFromAdmin
(String storeName) void
wipeCluster
(String clusterName, String fabric, Optional<String> storeName, Optional<Integer> versionNum) Delete stores from the cluster by sending aControllerClient.wipeCluster(String, Optional, Optional)
request.void
writeEndOfPush
(String clusterName, 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, incrementVersionIdempotent, incrementVersionIdempotent, isAdminTopicConsumptionEnabled, startInstanceMonitor
-
Constructor Details
-
VeniceParentHelixAdmin
public VeniceParentHelixAdmin(VeniceHelixAdmin veniceHelixAdmin, VeniceControllerMultiClusterConfig multiClusterConfigs) -
VeniceParentHelixAdmin
public VeniceParentHelixAdmin(VeniceHelixAdmin veniceHelixAdmin, VeniceControllerMultiClusterConfig multiClusterConfigs, boolean sslEnabled, Optional<SSLConfig> sslConfig, Optional<AuthorizerService> authorizerService) -
VeniceParentHelixAdmin
public VeniceParentHelixAdmin(VeniceHelixAdmin veniceHelixAdmin, VeniceControllerMultiClusterConfig multiClusterConfigs, boolean sslEnabled, Optional<SSLConfig> sslConfig, Optional<DynamicAccessController> accessController, Optional<AuthorizerService> authorizerService, LingeringStoreVersionChecker lingeringStoreVersionChecker) -
VeniceParentHelixAdmin
public VeniceParentHelixAdmin(VeniceHelixAdmin veniceHelixAdmin, VeniceControllerMultiClusterConfig multiClusterConfigs, boolean sslEnabled, Optional<SSLConfig> sslConfig, Optional<DynamicAccessController> accessController, Optional<AuthorizerService> authorizerService, LingeringStoreVersionChecker lingeringStoreVersionChecker, WriteComputeSchemaConverter writeComputeSchemaConverter, Optional<SupersetSchemaGenerator> externalSupersetSchemaGenerator, PubSubTopicRepository pubSubTopicRepository, DelegatingClusterLeaderInitializationRoutine initRoutineForPushJobDetailsSystemStore, DelegatingClusterLeaderInitializationRoutine initRoutineForHeartbeatSystemStore)
-
-
Method Details
-
initStorageCluster
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
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(String clusterName, String storeName, Set<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
- Specified by:
getInUseValueSchemaIds
in interfaceAdmin
-
createStore
public void createStore(String clusterName, String storeName, String owner, String keySchema, String valueSchema, boolean isSystemStore, Optional<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(String clusterName, 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(String clusterName, String storeName, String pushJobId, int versionNumber, int numberOfPartitions, Version.PushType pushType, 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:
-
hasWritePermissionToBatchJobHeartbeatStore
public boolean hasWritePermissionToBatchJobHeartbeatStore(X509Certificate requesterCert, 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(String clusterName, 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:
-
incrementVersionIdempotent
public Version incrementVersionIdempotent(String clusterName, String storeName, String pushJobId, int numberOfPartitions, int replicationFactor, Version.PushType pushType, boolean sendStartOfPush, boolean sorted, String compressionDictionary, Optional<String> sourceGridFabric, Optional<X509Certificate> requesterCert, long rewindTimeInSecondsOverride, Optional<String> emergencySourceRegion, boolean versionSwapDeferred, String targetedRegions, int repushSourceVersion) - Specified by:
incrementVersionIdempotent
in interfaceAdmin
- See Also:
-
getIncrementalPushVersion
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
-
getReferenceVersionForStreamingWrites
public Version getReferenceVersionForStreamingWrites(String clusterName, String storeName, String pushJobId) - Specified by:
getReferenceVersionForStreamingWrites
in interfaceAdmin
-
getCurrentVersion
Unsupported operation in the parent controller.- Specified by:
getCurrentVersion
in interfaceAdmin
-
getCurrentVersionsForMultiColos
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
- Specified by:
getRepushInfo
in interfaceAdmin
- Returns:
- a RepushInfo object with store information retrieved from the specified cluster and fabric.
-
getFutureVersionsForMultiColos
- Specified by:
getFutureVersionsForMultiColos
in interfaceAdmin
- See Also:
-
getBackupVersionsForMultiColos
- Specified by:
getBackupVersionsForMultiColos
in interfaceAdmin
-
getFutureVersion
Unsupported operation in the parent controller and returns Store.NON_EXISTING_VERSION.- Specified by:
getFutureVersion
in interfaceAdmin
-
getBackupVersion
- Specified by:
getBackupVersion
in interfaceAdmin
-
peekNextVersion
Unsupported operation in the parent controller.- Specified by:
peekNextVersion
in interfaceAdmin
-
deleteAllVersionsInStore
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:
-
deleteOldVersionInStore
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:
-
versionsForStore
- Specified by:
versionsForStore
in interfaceAdmin
- Returns:
- all versions of the specified store from a cluster.
-
getAllStores
- Specified by:
getAllStores
in interfaceAdmin
- Returns:
- all stores in the specified cluster.
-
getAllStoreStatuses
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
-
hasStore
-
setStoreCurrentVersion
Unsupported operation in the parent controller.- Specified by:
setStoreCurrentVersion
in interfaceAdmin
-
rollForwardToFutureVersion
- Specified by:
rollForwardToFutureVersion
in interfaceAdmin
-
rollbackToBackupVersion
Set backup version as current version in all child regions.- Specified by:
rollbackToBackupVersion
in interfaceAdmin
-
setStoreLargestUsedVersion
Unsupported operation in the parent controller.- Specified by:
setStoreLargestUsedVersion
in interfaceAdmin
-
setStoreOwner
Update the owner of a specified store by sendingSET_STORE_OWNER
admin message to the admin topic.- Specified by:
setStoreOwner
in interfaceAdmin
-
setStorePartitionCount
Update the partition count of a specified store by sendingSET_STORE_PARTITION
admin message to the admin topic.- Specified by:
setStorePartitionCount
in interfaceAdmin
-
setStoreReadability
Update the readability of a specified store by sendingENABLE_STORE_READ
orDISABLE_STORE_READ
admin message.- Specified by:
setStoreReadability
in interfaceAdmin
-
setStoreWriteability
Update the writability of a specified store by sendingENABLE_STORE_WRITE
orDISABLE_STORE_WRITE
admin message.- Specified by:
setStoreWriteability
in interfaceAdmin
-
setStoreReadWriteability
Update both readability and writability of a specified store.- Specified by:
setStoreReadWriteability
in interfaceAdmin
-
updateStore
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
- Specified by:
updateClusterConfig
in interfaceAdmin
- See Also:
-
getStorageEngineOverheadRatio
- Specified by:
getStorageEngineOverheadRatio
in interfaceAdmin
- See Also:
-
getKeySchema
- Specified by:
getKeySchema
in interfaceAdmin
- See Also:
-
getValueSchemas
- Specified by:
getValueSchemas
in interfaceAdmin
- See Also:
-
getDerivedSchemas
- Specified by:
getDerivedSchemas
in interfaceAdmin
- See Also:
-
getValueSchemaId
- Specified by:
getValueSchemaId
in interfaceAdmin
- See Also:
-
getDerivedSchemaId
- Specified by:
getDerivedSchemaId
in interfaceAdmin
- See Also:
-
getValueSchema
- Specified by:
getValueSchema
in interfaceAdmin
- See Also:
-
addValueSchema
public SchemaEntry addValueSchema(String clusterName, String storeName, 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(String clusterName, String storeName, String valueSchemaStr, int valueSchemaId, String supersetSchemaStr, int supersetSchemaId) Unsupported operation in the parent controller.- Specified by:
addSupersetSchema
in interfaceAdmin
-
addValueSchema
public SchemaEntry addValueSchema(String clusterName, String storeName, String newValueSchemaStr, int schemaId, DirectionalSchemaCompatibilityType expectedCompatibilityType) - Specified by:
addValueSchema
in interfaceAdmin
-
addDerivedSchema
public DerivedSchemaEntry addDerivedSchema(String clusterName, String storeName, int valueSchemaId, 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(String clusterName, String storeName, int valueSchemaId, int derivedSchemaId, String derivedSchemaStr) Unsupported operation in the parent controller.- Specified by:
addDerivedSchema
in interfaceAdmin
-
removeDerivedSchema
public DerivedSchemaEntry removeDerivedSchema(String clusterName, 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 Collection<RmdSchemaEntry> getReplicationMetadataSchemas(String clusterName, String storeName) - Specified by:
getReplicationMetadataSchemas
in interfaceAdmin
- See Also:
-
getReplicationMetadataSchema
public Optional<org.apache.avro.Schema> getReplicationMetadataSchema(String clusterName, String storeName, int valueSchemaID, int rmdVersionID) - Specified by:
getReplicationMetadataSchema
in interfaceAdmin
- See Also:
-
addReplicationMetadataSchema
public RmdSchemaEntry addReplicationMetadataSchema(String clusterName, String storeName, int valueSchemaId, int replicationMetadataVersionId, 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(String clusterName, String storeName, VeniceSystemStoreType veniceSystemStoreType) Unsupported operation in the parent controller.- Specified by:
validateAndMaybeRetrySystemStoreAutoCreation
in interfaceAdmin
-
getStorageNodes
Unsupported operation in the parent controller.- Specified by:
getStorageNodes
in interfaceAdmin
-
getStorageNodesStatus
Unsupported operation in the parent controller.- Specified by:
getStorageNodesStatus
in interfaceAdmin
-
removeStorageNode
Unsupported operation in the parent controller.- Specified by:
removeStorageNode
in interfaceAdmin
-
getOffLinePushStatus
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(String clusterName, String kafkaTopic, Optional<String> incrementalPushVersion, String region, String targetedRegions) - Specified by:
getOffLinePushStatus
in interfaceAdmin
- See Also:
-
getFinalReturnStatus
protected static ExecutionStatus getFinalReturnStatus(Map<String, ExecutionStatus> statuses, Set<String> childRegions, int numChildRegionsFailedToFetchStatus, StringBuilder currentReturnStatusDetails) Based on the global information, start determining the final status to return- Parameters:
statuses
-childRegions
-numChildRegionsFailedToFetchStatus
-currentReturnStatusDetails
-- Returns:
-
getKafkaBootstrapServers
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:
-
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
- Specified by:
getNativeReplicationKafkaBootstrapServerAddress
in interfaceAdmin
- See Also:
-
getNativeReplicationSourceFabric
public String getNativeReplicationSourceFabric(String clusterName, Store store, Optional<String> sourceGridFabric, Optional<String> emergencySourceRegion, String targetedRegions) - Specified by:
getNativeReplicationSourceFabric
in interfaceAdmin
- See Also:
-
isSSLEnabledForPush
Description copied from interface:Admin
Return whether ssl is enabled for the given store for push.- Specified by:
isSSLEnabledForPush
in interfaceAdmin
- See Also:
-
isSslToKafka
public boolean isSslToKafka()- Specified by:
isSslToKafka
in interfaceAdmin
- See Also:
-
getTopicManager
- Specified by:
getTopicManager
in interfaceAdmin
- See Also:
-
getTopicManager
- Specified by:
getTopicManager
in interfaceAdmin
- See Also:
-
getAggregatedHealthStatus
public InstanceRemovableStatuses getAggregatedHealthStatus(String cluster, List<String> instances, List<String> toBeStoppedInstances, boolean isSSLEnabled) - Specified by:
getAggregatedHealthStatus
in interfaceAdmin
-
isRTTopicDeletionPermittedByAllControllers
- Specified by:
isRTTopicDeletionPermittedByAllControllers
in interfaceAdmin
-
isLeaderControllerFor
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:
-
calculateNumberOfPartitions
Description copied from interface:Admin
Calculate how many partitions are needed for the given store.- Specified by:
calculateNumberOfPartitions
in interfaceAdmin
- See Also:
-
getReplicationFactor
- Specified by:
getReplicationFactor
in interfaceAdmin
- See Also:
-
getDatacenterCount
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:
-
getReplicas
- Specified by:
getReplicas
in interfaceAdmin
- See Also:
-
getReplicasOfStorageNode
Unsupported operation in the parent controller.- Specified by:
getReplicasOfStorageNode
in interfaceAdmin
-
isInstanceRemovable
public NodeRemovableResult isInstanceRemovable(String clusterName, String instanceId, List<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,List<Replica>> nodeReplicaReadiness(String cluster, String helixNodeId) Unsupported operation in the parent controller.- Specified by:
nodeReplicaReadiness
in interfaceAdmin
-
initiateDataRecovery
public void initiateDataRecovery(String clusterName, String storeName, int version, String sourceFabric, String destinationFabric, boolean copyAllVersionConfigs, 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:
-
prepareDataRecovery
public void prepareDataRecovery(String clusterName, String storeName, int version, String sourceFabric, String destinationFabric, Optional<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:
-
isStoreVersionReadyForDataRecovery
public Pair<Boolean,String> isStoreVersionReadyForDataRecovery(String clusterName, String storeName, int version, String sourceFabric, String destinationFabric, Optional<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:
-
getLeaderController
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:
-
addInstanceToAllowlist
Unsupported operation in the parent controller.- Specified by:
addInstanceToAllowlist
in interfaceAdmin
-
removeInstanceFromAllowList
Unsupported operation in the parent controller.- Specified by:
removeInstanceFromAllowList
in interfaceAdmin
-
getAllowlist
Unsupported operation in the parent controller.- Specified by:
getAllowlist
in interfaceAdmin
-
killOfflinePush
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:
-
getStorageNodesStatus
Unsupported operation in the parent controller.- Specified by:
getStorageNodesStatus
in interfaceAdmin
-
isStorageNodeNewerOrEqualTo
public boolean isStorageNodeNewerOrEqualTo(String clusterName, String instanceId, StorageNodeStatus oldServerStatus) Unsupported operation in the parent controller.- Specified by:
isStorageNodeNewerOrEqualTo
in interfaceAdmin
-
setAdminConsumerService
- Specified by:
setAdminConsumerService
in interfaceAdmin
- See Also:
-
skipAdminMessage
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:
-
getLastSucceedExecutionId
Description copied from interface:Admin
Get the id of the last succeed execution in this controller.- Specified by:
getLastSucceedExecutionId
in interfaceAdmin
- See Also:
-
getAdminCommandExecutionTracker
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:
-
getAdminTopicMetadata
Unsupported operation in the parent controller.- Specified by:
getAdminTopicMetadata
in interfaceAdmin
-
updateAdminTopicMetadata
public void updateAdminTopicMetadata(String clusterName, long executionId, Optional<String> storeName, Optional<Long> offset, Optional<Long> upstreamOffset) Unsupported operation in the parent controller.- Specified by:
updateAdminTopicMetadata
in interfaceAdmin
-
getRoutersClusterConfig
Unsupported operation in the parent controller.- Specified by:
getRoutersClusterConfig
in interfaceAdmin
-
updateRoutersClusterConfig
public void updateRoutersClusterConfig(String clusterName, Optional<Boolean> isThrottlingEnable, Optional<Boolean> isQuotaRebalancedEnable, Optional<Boolean> isMaxCapacityProtectionEnabled, Optional<Integer> expectedRouterCount) Unsupported operation in the parent controller.- Specified by:
updateRoutersClusterConfig
in interfaceAdmin
-
getAllStorePushStrategyForMigration
- Specified by:
getAllStorePushStrategyForMigration
in interfaceAdmin
- Returns:
- all push-strategies defined in the ZK path
MigrationPushStrategyZKAccessor.MIGRATION_PUSH_STRATEGY_PATH
-
setStorePushStrategyForMigration
Set a push-strategy in the ZK pathMigrationPushStrategyZKAccessor.MIGRATION_PUSH_STRATEGY_PATH
.- Specified by:
setStorePushStrategyForMigration
in interfaceAdmin
-
discoverCluster
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:
-
getServerD2Service
Description copied from interface:Admin
Find the server d2 service associated with a given cluster name.- Specified by:
getServerD2Service
in interfaceAdmin
- See Also:
-
findAllBootstrappingVersions
Unsupported operation in the parent controller.- Specified by:
findAllBootstrappingVersions
in interfaceAdmin
-
getVeniceWriterFactory
- Specified by:
getVeniceWriterFactory
in interfaceAdmin
- Returns:
- a
VeniceWriterFactory
object used by the Venice controller to create the venice writer.
-
getPubSubConsumerAdapterFactory
- Specified by:
getPubSubConsumerAdapterFactory
in interfaceAdmin
- See Also:
-
getPubSubSSLProperties
- Specified by:
getPubSubSSLProperties
in interfaceAdmin
-
stop
Description copied from interface:Admin
Stop the helix controller for a single cluster. -
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:
-
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:
-
isTopicTruncated
- Specified by:
isTopicTruncated
in interfaceAdmin
- See Also:
-
isTopicTruncatedBasedOnRetention
public boolean isTopicTruncatedBasedOnRetention(long retention) - Specified by:
isTopicTruncatedBasedOnRetention
in interfaceAdmin
- See Also:
-
isTopicTruncatedBasedOnRetention
- Specified by:
isTopicTruncatedBasedOnRetention
in interfaceAdmin
-
getMinNumberOfUnusedKafkaTopicsToPreserve
public int getMinNumberOfUnusedKafkaTopicsToPreserve()- Specified by:
getMinNumberOfUnusedKafkaTopicsToPreserve
in interfaceAdmin
- See Also:
-
truncateKafkaTopic
- 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:
-
truncateKafkaTopic
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:
-
isResourceStillAlive
Unsupported operation in the parent controller.- Specified by:
isResourceStillAlive
in interfaceAdmin
-
updateClusterDiscovery
public void updateClusterDiscovery(String storeName, String oldCluster, String newCluster, 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:
-
sendPushJobDetails
- Specified by:
sendPushJobDetails
in interfaceAdmin
- See Also:
-
getPushJobDetails
- Specified by:
getPushJobDetails
in interfaceAdmin
- See Also:
-
getBatchJobHeartbeatValue
- Specified by:
getBatchJobHeartbeatValue
in interfaceAdmin
- See Also:
-
writeEndOfPush
public void writeEndOfPush(String clusterName, String storeName, int versionNumber, boolean alsoWriteStartOfPush) - Specified by:
writeEndOfPush
in interfaceAdmin
- See Also:
-
whetherEnableBatchPushFromAdmin
- Specified by:
whetherEnableBatchPushFromAdmin
in interfaceAdmin
-
isStoreMigrationAllowed
- Specified by:
isStoreMigrationAllowed
in interfaceAdmin
- See Also:
-
migrateStore
Migrate a store from its source cluster to a new destination cluster by sending aMIGRATE_STORE
admin message.- Specified by:
migrateStore
in interfaceAdmin
-
completeMigration
- Specified by:
completeMigration
in interfaceAdmin
- See Also:
-
abortMigration
Abort store migration by sending aABORT_MIGRATION
admin message.- Specified by:
abortMigration
in interfaceAdmin
-
getMetaStoreValue
- Specified by:
getMetaStoreValue
in interfaceAdmin
-
updateAclForStore
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:
-
updateSystemStoreAclForStore
public void updateSystemStoreAclForStore(String clusterName, String regularStoreName, AclBinding systemStoreAclBinding) Set the AceEntries in provided AclBinding object to be the current set of ACL's for the resource. -
getAclForStore
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:
-
deleteAclForStore
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:
-
configureActiveActiveReplication
public void configureActiveActiveReplication(String clusterName, VeniceUserStoreType storeType, Optional<String> storeName, boolean enableNativeReplicationForCluster, Optional<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:
-
getClusterStaleStores
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
- Specified by:
getLargestUsedVersionFromStoreGraveyard
in interfaceAdmin
- Returns:
- the largest used version number for the given store from the store graveyard.
-
getClusterStores
Unsupported operation in the parent controller.- Specified by:
getClusterStores
in interfaceAdmin
-
getRegionPushDetails
public RegionPushDetails getRegionPushDetails(String clusterName, String storeName, boolean isPartitionDetailAdded) Unsupported operation in the parent controller.- Specified by:
getRegionPushDetails
in interfaceAdmin
-
listStorePushInfo
public Map<String,RegionPushDetails> listStorePushInfo(String clusterName, 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
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 -
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:
-
getChildDataCenterControllerUrlMap
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:
-
getChildDataCenterControllerD2Map
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:
-
getChildControllerD2ServiceName
Description copied from interface:Admin
Get child datacenter controller d2 service name- Specified by:
getChildControllerD2ServiceName
in interfaceAdmin
- Returns:
- d2 service name
- See Also:
-
getStoreConfigRepo
Description copied from interface:Admin
Return a shared store config repository.- Specified by:
getStoreConfigRepo
in interfaceAdmin
- See Also:
-
getMetaStoreWriter
Description copied from interface:Admin
Return aMetaStoreWriter
, which can be shared across different Venice clusters.- Specified by:
getMetaStoreWriter
in interfaceAdmin
- See Also:
-
getMetaStoreReader
- Specified by:
getMetaStoreReader
in interfaceAdmin
-
getEmergencySourceRegion
Description copied from interface:Admin
Return the emergency source region configuration.- Specified by:
getEmergencySourceRegion
in interfaceAdmin
- See Also:
-
getAggregateRealTimeTopicSource
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:
-
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:
-
getVeniceHelixAdmin
-
getBackupVersionDefaultRetentionMs
public long getBackupVersionDefaultRetentionMs()Description copied from interface:Admin
Returns default backup version retention time.- Specified by:
getBackupVersionDefaultRetentionMs
in interfaceAdmin
- See Also:
-
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:
-
wipeCluster
public void wipeCluster(String clusterName, String fabric, Optional<String> storeName, Optional<Integer> versionNum) Delete stores from the cluster by sending aControllerClient.wipeCluster(String, Optional, Optional)
request.- Specified by:
wipeCluster
in interfaceAdmin
-
compareStore
public StoreComparisonInfo compareStore(String clusterName, String storeName, String fabricA, String fabricB) throws IOException Description copied from interface:Admin
Compare store metadata and version states between two fabrics.- Specified by:
compareStore
in interfaceAdmin
- Throws:
IOException
- See Also:
-
copyOverStoreSchemasAndConfigs
public StoreInfo copyOverStoreSchemasAndConfigs(String clusterName, String srcFabric, String destFabric, String storeName) - Specified by:
copyOverStoreSchemasAndConfigs
in interfaceAdmin
- See Also:
-
createStoragePersona
public void createStoragePersona(String clusterName, String name, long quotaNumber, Set<String> storesToEnforce, Set<String> owners) Creates a new persona with the given parameters.- Specified by:
createStoragePersona
in interfaceAdmin
- See Also:
-
getStoragePersona
- Specified by:
getStoragePersona
in interfaceAdmin
- See Also:
-
deleteStoragePersona
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(String clusterName, String name, UpdateStoragePersonaQueryParams queryParams) Updates a persona with the given parameters by sending aUPDATE_STORAGE_PERSONA
admin message.- Specified by:
updateStoragePersona
in interfaceAdmin
-
getPersonaAssociatedWithStore
- Specified by:
getPersonaAssociatedWithStore
in interfaceAdmin
- See Also:
-
getClusterStoragePersonas
- Specified by:
getClusterStoragePersonas
in interfaceAdmin
- See Also:
-
cleanupInstanceCustomizedStates
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
- Specified by:
getStoreGraveyard
in interfaceAdmin
-
removeStoreFromGraveyard
- Specified by:
removeStoreFromGraveyard
in interfaceAdmin
-
getPushStatusStoreReader
- Specified by:
getPushStatusStoreReader
in interfaceAdmin
-
getPushStatusStoreWriter
- Specified by:
getPushStatusStoreWriter
in interfaceAdmin
-
sendHeartbeatToSystemStore
public void sendHeartbeatToSystemStore(String clusterName, String systemStoreName, long heartbeatTimestamp) Description copied from interface:Admin
Send a heartbeat timestamp to targeted system store.- Specified by:
sendHeartbeatToSystemStore
in interfaceAdmin
-
getHeartbeatFromSystemStore
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
- Specified by:
getHelixVeniceClusterResources
in interfaceAdmin
- Returns:
- the aggregate resources required by controller to manage a Venice cluster.
-
getPubSubTopicRepository
- Specified by:
getPubSubTopicRepository
in interfaceAdmin
-