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 -
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
ConstructorsConstructorDescriptionVeniceParentHelixAdmin(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, DelegatingClusterLeaderInitializationRoutine initRoutineForParentControllerMetadataSystemStore, io.tehuti.metrics.MetricsRepository metricsRepository) VeniceParentHelixAdmin(VeniceHelixAdmin veniceHelixAdmin, VeniceControllerMultiClusterConfig multiClusterConfigs, boolean sslEnabled, Optional<SSLConfig> sslConfig, Optional<DynamicAccessController> accessController, Optional<AuthorizerService> authorizerService, LingeringStoreVersionChecker lingeringStoreVersionChecker, io.tehuti.metrics.MetricsRepository metricsRepository) VeniceParentHelixAdmin(VeniceHelixAdmin veniceHelixAdmin, VeniceControllerMultiClusterConfig multiClusterConfigs, boolean sslEnabled, Optional<SSLConfig> sslConfig, Optional<AuthorizerService> authorizerService, io.tehuti.metrics.MetricsRepository metricsRepository) VeniceParentHelixAdmin(VeniceHelixAdmin veniceHelixAdmin, VeniceControllerMultiClusterConfig multiClusterConfigs, io.tehuti.metrics.MetricsRepository metricsRepository) -
Method Summary
Modifier and TypeMethodDescriptionvoidabortMigration(String srcClusterName, String destClusterName, String storeName) Abort store migration by sending aABORT_MIGRATIONadmin 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_CREATIONadmin message.voidaddInstanceToAllowlist(String clusterName, String helixNodeId) Unsupported operation in the parent controller.addReplicationMetadataSchema(String clusterName, String storeName, int valueSchemaId, int replicationMetadataVersionId, String replicationMetadataSchemaStr) Create a newReplicationMetadataSchemaEntryobject with the given properties and add it into schema repository by sendingREPLICATION_METADATA_SCHEMA_CREATIONadmin 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_CREATIONadmin message.voidaddVersionAndStartIngestion(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 inVeniceHelixAdminandVeniceParentHelixAdmin.voidautoMigrateStore(String srcClusterName, String destClusterName, String storeName, Optional<Integer> currStep, Optional<Boolean> abortOnFailure) This method is used to auto-migrate a store from one cluster to another.intcalculateNumberOfPartitions(String clusterName, String storeName) Calculate how many partitions are needed for the given store.voidcheckResourceCleanupBeforeStoreCreation(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.voidclose()CauseVeniceParentHelixAdminand its associated services to stop executing.compareStore(String clusterName, String storeName, String fabricA, String fabricB) Compare store metadata and version states between two fabrics.voidcompleteMigration(String srcClusterName, String destClusterName, String storeName) voidconfigureActiveActiveReplication(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) voidcreateStoragePersona(String clusterName, String name, long quotaNumber, Set<String> storesToEnforce, Set<String> owners) Creates a new persona with the given parameters.voidcreateStore(String clusterName, String storeName, String owner, String keySchema, String valueSchema, boolean isSystemStore, Optional<String> accessPermissions) Create a store by sendingSTORE_CREATIONadmin message to the Kafka admin topic, sendingMETA_SYSTEM_STORE_AUTO_CREATION_VALIDATIONadmin message, and performing initialization steps for using authorize server to manage ACLs for the input store.voiddeleteAclForStore(String clusterName, String storeName) Delete the current set of ACL provisioned for a venice store and its associated kafka topic.protected voiddeleteAclsForStore(Store store, String storeName) Deletes the acls associated with a storedeleteAllVersionsInStore(String clusterName, String storeName) Delete all of venice versions in given store(including venice resource, kafka topic, offline pushs and all related resources).voiddeleteOldVersionInStore(String clusterName, String storeName, int versionNum) Delete the given version from the store.voiddeleteStoragePersona(String clusterName, String name) Deletes the persona with the given name.voiddeleteStore(String clusterName, String storeName, boolean isAbortMigrationCleanup, int largestUsedVersionNumber, boolean waitOnRTTopicDeletion) Delete a store by sendingDELETE_STOREadmin message to the Kafka admin topic and clearing all ACLs and release resource for the target store from authorize service.voiddeleteValueSchemas(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.getAdminConsumerService(String clusterName) getAdminOperationVersionFromControllers(String clusterName) getAdminTopicMetadata(String clusterName, Optional<String> storeName) Get AdminTopicMetadata from parent controllergetAggregatedHealthStatus(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.intgetBackupVersion(String clusterName, String storeName) longReturns 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.getControllerConfig(String clusterName) intgetCurrentVersion(String clusterName, String storeName) Unsupported operation in the parent controller.getCurrentVersionsForMultiColos(String clusterName, String storeName) Query the current version for the given store.intgetDatacenterCount(String clusterName) number of datacenters, 1 if in single cluster mode.intgetDerivedSchemaId(String clusterName, String storeName, String schemaStr) getDerivedSchemas(String clusterName, String storeName) getEmergencySourceRegion(String clusterName) Return the emergency source region configuration.protected static ExecutionStatusgetFinalReturnStatus(Map<String, ExecutionStatus> statuses, Set<String> childRegions, int numChildRegionsFailedToFetchStatus, StringBuilder currentReturnStatusDetails) Based on the global information, start determining the final status to returnintgetFutureVersion(String clusterName, String storeName) Unsupported operation in the parent controller and returns Store.NON_EXISTING_VERSION.getFutureVersionsForMultiColos(String clusterName, String storeName) longgetHeartbeatFromSystemStore(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) intgetLargestUsedVersion(String clusterName, String storeName) intgetLargestUsedVersionFromStoreGraveyard(String clusterName, String storeName) Deprecated but remain here to keep compatibility untilAdmin.getLargestUsedVersion(String, String)is used.getLastSucceedExecutionId(String clustername) Get the id of the last succeed execution in this controller.getLeaderController(String clusterName) Get instance of leader controller.longgetMetaStoreValue(StoreMetaKey metaKey, String storeName) Return aMetaStoreWriter, which can be shared across different Venice clusters.intgetNativeReplicationKafkaBootstrapServerAddress(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, boolean isTargetRegionPushWithDeferredSwap) 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.intgetReplicationFactor(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) getRouterD2Service(String clusterName) Find the router d2 service associated with a given cluster name.getRoutersClusterConfig(String clusterName) Unsupported operation in the parent controller.getServerD2Service(String clusterName) Find the server d2 service associated with a given cluster name.doublegetStorageEngineOverheadRatio(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.getStoresForCompaction(String clusterName) getTopicManager(String pubSubServerAddress) getValueSchema(String clusterName, String storeName, int id) intgetValueSchemaId(String clusterName, String storeName, String valueSchemaStr) getValueSchemas(String clusterName, String storeName) booleanbooleanhasWritePermissionToBatchJobHeartbeatStore(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) voidinitiateDataRecovery(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.voidinitStorageCluster(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.booleanisActiveActiveReplicationEnabledInAllRegion(String clusterName, String storeName, boolean checkCurrentVersion) Returns true if A/A replication is enabled in all child controller and parent controller.booleanisClusterValid(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.booleanisLeaderControllerFor(String clusterName) Check if this controller itself is the leader controller for a given cluster or not.booleanThis function can be used to perform cluster-wide operations which need to be performed by a single process only in the whole cluster.booleanisParent()Check whether the controller works as a parent controllerbooleanisResourceStillAlive(String resourceName) Unsupported operation in the parent controller.booleanisRTTopicDeletionPermittedByAllControllers(String clusterName, String storeName) booleanisSSLEnabledForPush(String clusterName, String storeName) Return whether ssl is enabled for the given store for push.booleanbooleanisStorageNodeNewerOrEqualTo(String clusterName, String instanceId, StorageNodeStatus oldServerStatus) Unsupported operation in the parent controller.booleanisStoreMigrationAllowed(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.booleanisTopicTruncated(String kafkaTopicName) booleanisTopicTruncatedBasedOnRetention(long retention) booleanisTopicTruncatedBasedOnRetention(String kafkaTopicName, long retentionTime) voidkillOfflinePush(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.voidmigrateStore(String srcClusterName, String destClusterName, String storeName) Migrate a store from its source cluster to a new destination cluster by sending aMIGRATE_STOREadmin message.nodeReplicaReadiness(String cluster, String helixNodeId) Unsupported operation in the parent controller.voidprepareDataRecovery(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.voidremoveInstanceFromAllowList(String clusterName, String helixNodeId) Unsupported operation in the parent controller.voidremoveStorageNode(String clusterName, String instanceId) Unsupported operation in the parent controller.voidremoveStoreFromGraveyard(String clusterName, String storeName) repushStore(RepushJobRequest repushJobRequest) This is the entry/exit common point for manual and scheduled repush codepaths.voidrollbackToBackupVersion(String clusterName, String storeName, String regionFilter) Set backup version as current version in all child regions.voidrollForwardToFutureVersion(String clusterName, String storeName, String regionFilter) voidsendHeartbeatToSystemStore(String clusterName, String systemStoreName, long heartbeatTimestamp) Send a heartbeat timestamp to targeted system store.voidsendPushJobDetails(PushJobStatusRecordKey key, PushJobDetails value) voidsetAdminConsumerService(String clusterName, AdminConsumerService service) voidsetStoreCurrentVersion(String clusterName, String storeName, int versionNumber) Unsupported operation in the parent controller.voidsetStoreLargestUsedRTVersion(String clusterName, String storeName, int versionNumber) Unsupported operation in the parent controller.voidsetStoreLargestUsedVersion(String clusterName, String storeName, int versionNumber) Unsupported operation in the parent controller.voidsetStoreOwner(String clusterName, String storeName, String owner) Update the owner of a specified store by sendingSET_STORE_OWNERadmin message to the admin topic.voidsetStorePartitionCount(String clusterName, String storeName, int partitionCount) Update the partition count of a specified store by sendingSET_STORE_PARTITIONadmin message to the admin topic.voidsetStorePushStrategyForMigration(String voldemortStoreName, String strategy) Set a push-strategy in the ZK pathMigrationPushStrategyZKAccessor.MIGRATION_PUSH_STRATEGY_PATH.voidsetStoreReadability(String clusterName, String storeName, boolean desiredReadability) Update the readability of a specified store by sendingENABLE_STORE_READorDISABLE_STORE_READadmin message.voidsetStoreReadWriteability(String clusterName, String storeName, boolean isAccessible) Update both readability and writability of a specified store.voidsetStoreWriteability(String clusterName, String storeName, boolean desiredWriteability) Update the writability of a specified store by sendingENABLE_STORE_WRITEorDISABLE_STORE_WRITEadmin message.voidskipAdminMessage(String clusterName, long offset, boolean skipDIV, long executionId) The admin consumption task tries to deal with failures to process an admin message by retrying.voidStop the helix controller for a single cluster.voidStop the entire controller but not only the helix controller for a single cluster.booleantruncateKafkaTopic(String kafkaTopicName) booleantruncateKafkaTopic(String kafkaTopicName, long retentionTime) Truncate a Kafka topic by setting its retention time to the input value.voidupdateAclForStore(String clusterName, String storeName, String accessPermissions) Provision a new set of ACL for a venice store and its associated kafka topic.voidupdateAdminOperationProtocolVersion(String clusterName, Long adminOperationProtocolVersion) Update AdminOperationProtocolVersion in metadatavoidupdateAdminTopicMetadata(String clusterName, long executionId, Optional<String> storeName, Optional<Long> offset, Optional<Long> upstreamOffset) Unsupported operation in the parent controller.voidupdateClusterConfig(String clusterName, UpdateClusterConfigQueryParams params) voidupdateClusterDiscovery(String storeName, String oldCluster, String newCluster, String initiatingCluster) Update the cluster discovery of a given store by writing to the StoreConfig ZNode.voidupdateDarkClusterConfig(String clusterName, UpdateDarkClusterConfigQueryParams params) voidupdateRoutersClusterConfig(String clusterName, Optional<Boolean> isThrottlingEnable, Optional<Boolean> isQuotaRebalancedEnable, Optional<Boolean> isMaxCapacityProtectionEnabled, Optional<Integer> expectedRouterCount) Unsupported operation in the parent controller.voidupdateStoragePersona(String clusterName, String name, UpdateStoragePersonaQueryParams queryParams) Updates a persona with the given parameters by sending aUPDATE_STORAGE_PERSONAadmin message.voidupdateStore(String clusterName, String storeName, UpdateStoreQueryParams params) Update a target store properties by first applying the provided deltas and then sendingUPDATE_STOREadmin message.voidupdateSystemStoreAclForStore(String clusterName, String regularStoreName, AclBinding systemStoreAclBinding) Set the AceEntries in provided AclBinding object to be the current set of ACL's for the resource.voidvalidateAndMaybeRetrySystemStoreAutoCreation(String clusterName, String storeName, VeniceSystemStoreType veniceSystemStoreType) Unsupported operation in the parent controller.validateStoreDeleted(String clusterName, String storeName) Validates that a store has been completely deleted from all venice clusters cross-regionallyversionsForStore(String clusterName, String storeName) booleanwhetherEnableBatchPushFromAdmin(String clusterName, String storeName) voidwipeCluster(String clusterName, String fabric, Optional<String> storeName, Optional<Integer> versionNum) Delete stores from the cluster by sending aControllerClient.wipeCluster(String, Optional, Optional)request.voidwriteEndOfPush(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, waitMethods inherited from interface com.linkedin.venice.controller.Admin
addValueSchema, clearInstanceMonitor, createStore, createStore, incrementVersionIdempotent, incrementVersionIdempotent, isAdminTopicConsumptionEnabled, startInstanceMonitor
-
Field Details
-
RETRY_FAILURE_TYPES
-
-
Constructor Details
-
VeniceParentHelixAdmin
public VeniceParentHelixAdmin(VeniceHelixAdmin veniceHelixAdmin, VeniceControllerMultiClusterConfig multiClusterConfigs, io.tehuti.metrics.MetricsRepository metricsRepository) -
VeniceParentHelixAdmin
public VeniceParentHelixAdmin(VeniceHelixAdmin veniceHelixAdmin, VeniceControllerMultiClusterConfig multiClusterConfigs, boolean sslEnabled, Optional<SSLConfig> sslConfig, Optional<AuthorizerService> authorizerService, io.tehuti.metrics.MetricsRepository metricsRepository) -
VeniceParentHelixAdmin
public VeniceParentHelixAdmin(VeniceHelixAdmin veniceHelixAdmin, VeniceControllerMultiClusterConfig multiClusterConfigs, boolean sslEnabled, Optional<SSLConfig> sslConfig, Optional<DynamicAccessController> accessController, Optional<AuthorizerService> authorizerService, LingeringStoreVersionChecker lingeringStoreVersionChecker, io.tehuti.metrics.MetricsRepository metricsRepository) -
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, DelegatingClusterLeaderInitializationRoutine initRoutineForParentControllerMetadataSystemStore, io.tehuti.metrics.MetricsRepository metricsRepository)
-
-
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:
initStorageClusterin interfaceAdmin- Parameters:
clusterName- Venice cluster name.
-
isClusterValid
Test if a cluster is valid (in Helix cluster list).- Specified by:
isClusterValidin interfaceAdmin- Parameters:
clusterName- Venice cluster name.- Returns:
trueif input cluster is in Helix cluster list;falseotherwise.
-
deleteValueSchemas
public void deleteValueSchemas(String clusterName, String storeName, Set<Integer> unusedValueSchemaIds) Description copied from interface:AdminDeletes a store's values schema with ids `except` the ids passed in the argument inuseValueSchemaIds- Specified by:
deleteValueSchemasin interfaceAdmin
-
autoMigrateStore
public void autoMigrateStore(String srcClusterName, String destClusterName, String storeName, Optional<Integer> currStep, Optional<Boolean> abortOnFailure) This method is used to auto-migrate a store from one cluster to another.- Specified by:
autoMigrateStorein interfaceAdmin- Parameters:
srcClusterName-destClusterName-storeName-currStep-abortOnFailure-
-
getInUseValueSchemaIds
- Specified by:
getInUseValueSchemaIdsin 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_CREATIONadmin message to the Kafka admin topic, sendingMETA_SYSTEM_STORE_AUTO_CREATION_VALIDATIONadmin message, and performing initialization steps for using authorize server to manage ACLs for the input store.- Specified by:
createStorein interfaceAdmin
-
deleteStore
public void deleteStore(String clusterName, String storeName, boolean isAbortMigrationCleanup, int largestUsedVersionNumber, boolean waitOnRTTopicDeletion) Delete a store by sendingDELETE_STOREadmin message to the Kafka admin topic and clearing all ACLs and release resource for the target store from authorize service.- Specified by:
deleteStorein interfaceAdmin
-
deleteAclsForStore
Deletes the acls associated with a store- Parameters:
store-storeName-
-
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:AdminThis method behaves differently inVeniceHelixAdminandVeniceParentHelixAdmin.- Specified by:
addVersionAndStartIngestionin 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:
hasWritePermissionToBatchJobHeartbeatStorein interfaceAdmin- Parameters:
requesterCert- X.509 certificate object.batchJobHeartbeatStoreName- name of the batch-job heartbeat store.- Returns:
trueif input certificate has write-access permission for the given store;falseotherwise.- Throws:
AclException
-
isActiveActiveReplicationEnabledInAllRegion
public boolean isActiveActiveReplicationEnabledInAllRegion(String clusterName, String storeName, boolean checkCurrentVersion) Description copied from interface:AdminReturns 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:
isActiveActiveReplicationEnabledInAllRegionin 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:
incrementVersionIdempotentin 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:
getIncrementalPushVersionin interfaceAdmin
-
getReferenceVersionForStreamingWrites
public Version getReferenceVersionForStreamingWrites(String clusterName, String storeName, String pushJobId) - Specified by:
getReferenceVersionForStreamingWritesin interfaceAdmin
-
getCurrentVersion
Unsupported operation in the parent controller.- Specified by:
getCurrentVersionin 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:
getCurrentVersionsForMultiColosin interfaceAdmin
-
getRepushInfo
- Specified by:
getRepushInfoin interfaceAdmin- Returns:
- a RepushInfo object with store information retrieved from the specified cluster and fabric.
-
getFutureVersionsForMultiColos
- Specified by:
getFutureVersionsForMultiColosin interfaceAdmin- See Also:
-
getBackupVersionsForMultiColos
- Specified by:
getBackupVersionsForMultiColosin interfaceAdmin
-
getFutureVersion
Unsupported operation in the parent controller and returns Store.NON_EXISTING_VERSION.- Specified by:
getFutureVersionin interfaceAdmin
-
getBackupVersion
- Specified by:
getBackupVersionin interfaceAdmin
-
deleteAllVersionsInStore
Description copied from interface:AdminDelete all of venice versions in given store(including venice resource, kafka topic, offline pushs and all related resources).- Specified by:
deleteAllVersionsInStorein interfaceAdmin- See Also:
-
deleteOldVersionInStore
Description copied from interface:AdminDelete the given version from the store. If the given version is the current version, an exception will be thrown.- Specified by:
deleteOldVersionInStorein interfaceAdmin- See Also:
-
versionsForStore
- Specified by:
versionsForStorein interfaceAdmin- Returns:
- all versions of the specified store from a cluster.
-
getAllStores
- Specified by:
getAllStoresin interfaceAdmin- Returns:
- all stores in the specified cluster.
-
getAllStoreStatuses
Unsupported operation in the parent controller.- Specified by:
getAllStoreStatusesin 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:
setStoreCurrentVersionin interfaceAdmin
-
rollForwardToFutureVersion
- Specified by:
rollForwardToFutureVersionin interfaceAdmin
-
rollbackToBackupVersion
Set backup version as current version in all child regions.- Specified by:
rollbackToBackupVersionin interfaceAdmin
-
setStoreLargestUsedVersion
Unsupported operation in the parent controller.- Specified by:
setStoreLargestUsedVersionin interfaceAdmin
-
setStoreLargestUsedRTVersion
Unsupported operation in the parent controller.- Specified by:
setStoreLargestUsedRTVersionin interfaceAdmin
-
setStoreOwner
Update the owner of a specified store by sendingSET_STORE_OWNERadmin message to the admin topic.- Specified by:
setStoreOwnerin interfaceAdmin
-
setStorePartitionCount
Update the partition count of a specified store by sendingSET_STORE_PARTITIONadmin message to the admin topic.- Specified by:
setStorePartitionCountin interfaceAdmin
-
setStoreReadability
Update the readability of a specified store by sendingENABLE_STORE_READorDISABLE_STORE_READadmin message.- Specified by:
setStoreReadabilityin interfaceAdmin
-
setStoreWriteability
Update the writability of a specified store by sendingENABLE_STORE_WRITEorDISABLE_STORE_WRITEadmin message.- Specified by:
setStoreWriteabilityin interfaceAdmin
-
setStoreReadWriteability
Update both readability and writability of a specified store.- Specified by:
setStoreReadWriteabilityin interfaceAdmin
-
updateStore
Update a target store properties by first applying the provided deltas and then sendingUPDATE_STOREadmin message.- Specified by:
updateStorein 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:
updateClusterConfigin interfaceAdmin- See Also:
-
updateDarkClusterConfig
- Specified by:
updateDarkClusterConfigin interfaceAdmin
-
getStorageEngineOverheadRatio
- Specified by:
getStorageEngineOverheadRatioin interfaceAdmin- See Also:
-
getKeySchema
- Specified by:
getKeySchemain interfaceAdmin- See Also:
-
getValueSchemas
- Specified by:
getValueSchemasin interfaceAdmin- See Also:
-
getDerivedSchemas
- Specified by:
getDerivedSchemasin interfaceAdmin- See Also:
-
getValueSchemaId
- Specified by:
getValueSchemaIdin interfaceAdmin- See Also:
-
getDerivedSchemaId
- Specified by:
getDerivedSchemaIdin interfaceAdmin- See Also:
-
getValueSchema
- Specified by:
getValueSchemain 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_CREATIONadmin message.- Specified by:
addValueSchemain interfaceAdmin- Returns:
- an
SchemaEntryobject 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:
addSupersetSchemain interfaceAdmin
-
addValueSchema
public SchemaEntry addValueSchema(String clusterName, String storeName, String newValueSchemaStr, int schemaId, DirectionalSchemaCompatibilityType expectedCompatibilityType) - Specified by:
addValueSchemain 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_CREATIONadmin message.- Specified by:
addDerivedSchemain interfaceAdmin- Returns:
- an
DerivedSchemaEntryobject 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:
addDerivedSchemain interfaceAdmin
-
removeDerivedSchema
public DerivedSchemaEntry removeDerivedSchema(String clusterName, String storeName, int valueSchemaId, int derivedSchemaId) Unsupported operation in the parent controller.- Specified by:
removeDerivedSchemain 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:
getReplicationMetadataSchemasin interfaceAdmin- See Also:
-
getReplicationMetadataSchema
public Optional<org.apache.avro.Schema> getReplicationMetadataSchema(String clusterName, String storeName, int valueSchemaID, int rmdVersionID) - Specified by:
getReplicationMetadataSchemain interfaceAdmin- See Also:
-
addReplicationMetadataSchema
public RmdSchemaEntry addReplicationMetadataSchema(String clusterName, String storeName, int valueSchemaId, int replicationMetadataVersionId, String replicationMetadataSchemaStr) Create a newReplicationMetadataSchemaEntryobject with the given properties and add it into schema repository by sendingREPLICATION_METADATA_SCHEMA_CREATIONadmin message.- Specified by:
addReplicationMetadataSchemain interfaceAdmin
-
validateAndMaybeRetrySystemStoreAutoCreation
public void validateAndMaybeRetrySystemStoreAutoCreation(String clusterName, String storeName, VeniceSystemStoreType veniceSystemStoreType) Unsupported operation in the parent controller.- Specified by:
validateAndMaybeRetrySystemStoreAutoCreationin interfaceAdmin
-
getStorageNodes
Unsupported operation in the parent controller.- Specified by:
getStorageNodesin interfaceAdmin
-
getStorageNodesStatus
Unsupported operation in the parent controller.- Specified by:
getStorageNodesStatusin interfaceAdmin
-
removeStorageNode
Unsupported operation in the parent controller.- Specified by:
removeStorageNodein 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:
getOffLinePushStatusin interfaceAdmin- Parameters:
clusterName-kafkaTopic-- Returns:
-
getOffLinePushStatus
public Admin.OfflinePushStatusInfo getOffLinePushStatus(String clusterName, String kafkaTopic, Optional<String> incrementalPushVersion, String region, String targetedRegions, boolean isTargetRegionPushWithDeferredSwap) - Specified by:
getOffLinePushStatusin 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:AdminReturn the ssl or non-ssl bootstrap servers based on the given flag.- Specified by:
getKafkaBootstrapServersin interfaceAdmin- Returns:
- kafka bootstrap servers url, if there are multiple will be comma separated.
- See Also:
-
getRegionName
Description copied from interface:AdminReturn the region name of this Admin- Specified by:
getRegionNamein interfaceAdmin- Returns:
- the region name of this controller
-
getNativeReplicationKafkaBootstrapServerAddress
- Specified by:
getNativeReplicationKafkaBootstrapServerAddressin interfaceAdmin- See Also:
-
getNativeReplicationSourceFabric
public String getNativeReplicationSourceFabric(String clusterName, Store store, Optional<String> sourceGridFabric, Optional<String> emergencySourceRegion, String targetedRegions) - Specified by:
getNativeReplicationSourceFabricin interfaceAdmin- See Also:
-
isSSLEnabledForPush
Description copied from interface:AdminReturn whether ssl is enabled for the given store for push.- Specified by:
isSSLEnabledForPushin interfaceAdmin- See Also:
-
isSslToKafka
public boolean isSslToKafka()- Specified by:
isSslToKafkain interfaceAdmin- See Also:
-
getTopicManager
- Specified by:
getTopicManagerin interfaceAdmin- See Also:
-
getTopicManager
- Specified by:
getTopicManagerin interfaceAdmin- See Also:
-
getAggregatedHealthStatus
public InstanceRemovableStatuses getAggregatedHealthStatus(String cluster, List<String> instances, List<String> toBeStoppedInstances, boolean isSSLEnabled) - Specified by:
getAggregatedHealthStatusin interfaceAdmin
-
isRTTopicDeletionPermittedByAllControllers
- Specified by:
isRTTopicDeletionPermittedByAllControllersin interfaceAdmin
-
isLeaderControllerFor
Description copied from interface:AdminCheck 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:
isLeaderControllerForin interfaceAdmin- See Also:
-
calculateNumberOfPartitions
Description copied from interface:AdminCalculate how many partitions are needed for the given store.- Specified by:
calculateNumberOfPartitionsin interfaceAdmin- See Also:
-
getReplicationFactor
- Specified by:
getReplicationFactorin interfaceAdmin- See Also:
-
getDatacenterCount
Description copied from interface:Adminnumber of datacenters, 1 if in single cluster mode. Could be more if this is a parent controller- Specified by:
getDatacenterCountin interfaceAdmin- See Also:
-
getReplicas
- Specified by:
getReplicasin interfaceAdmin- See Also:
-
getReplicasOfStorageNode
Unsupported operation in the parent controller.- Specified by:
getReplicasOfStorageNodein interfaceAdmin
-
isInstanceRemovable
public NodeRemovableResult isInstanceRemovable(String clusterName, String instanceId, List<String> lockedNodes) Unsupported operation in the parent controller.- Specified by:
isInstanceRemovablein 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:
nodeReplicaReadinessin interfaceAdmin
-
initiateDataRecovery
public void initiateDataRecovery(String clusterName, String storeName, int version, String sourceFabric, String destinationFabric, boolean copyAllVersionConfigs, Optional<Version> ignored) Description copied from interface:AdminInitiate data recovery for a store version given a source fabric.- Specified by:
initiateDataRecoveryin 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:AdminPrepare 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:
prepareDataRecoveryin 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:AdminCheck if the store version's previous states and resources are cleaned up and ready to start data recovery.- Specified by:
isStoreVersionReadyForDataRecoveryin interfaceAdmin- Returns:
- whether is ready to start data recovery and the reason if it's not ready.
- See Also:
-
getLeaderController
Description copied from interface:AdminGet instance of leader controller. If there is no leader controller for the given cluster, throw a VeniceException.- Specified by:
getLeaderControllerin interfaceAdmin- See Also:
-
addInstanceToAllowlist
Unsupported operation in the parent controller.- Specified by:
addInstanceToAllowlistin interfaceAdmin
-
removeInstanceFromAllowList
Unsupported operation in the parent controller.- Specified by:
removeInstanceFromAllowListin interfaceAdmin
-
getAllowlist
Unsupported operation in the parent controller.- Specified by:
getAllowlistin interfaceAdmin
-
killOfflinePush
Description copied from interface:AdminKill an offline push if it ran into errors or the corresponding version is being retired.- Specified by:
killOfflinePushin interfaceAdminisForcedKill- 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:
getStorageNodesStatusin interfaceAdmin
-
isStorageNodeNewerOrEqualTo
public boolean isStorageNodeNewerOrEqualTo(String clusterName, String instanceId, StorageNodeStatus oldServerStatus) Unsupported operation in the parent controller.- Specified by:
isStorageNodeNewerOrEqualToin interfaceAdmin
-
setAdminConsumerService
- Specified by:
setAdminConsumerServicein interfaceAdmin- See Also:
-
getAdminConsumerService
- Specified by:
getAdminConsumerServicein interfaceAdmin
-
skipAdminMessage
Description copied from interface:AdminThe 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:
skipAdminMessagein interfaceAdminskipDIV- tries to skip only the DIV check for the blocking message.- See Also:
-
getLastSucceedExecutionId
Description copied from interface:AdminGet the id of the last succeed execution in this controller.- Specified by:
getLastSucceedExecutionIdin interfaceAdmin- See Also:
-
getAdminCommandExecutionTracker
Description copied from interface:AdminGet the tracker used to track the execution of the admin command for the given cluster.- Specified by:
getAdminCommandExecutionTrackerin interfaceAdmin- See Also:
-
getAdminTopicMetadata
Get AdminTopicMetadata from parent controller- Specified by:
getAdminTopicMetadatain 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:
updateAdminTopicMetadatain interfaceAdmin
-
updateAdminOperationProtocolVersion
public void updateAdminOperationProtocolVersion(String clusterName, Long adminOperationProtocolVersion) Update AdminOperationProtocolVersion in metadata- Specified by:
updateAdminOperationProtocolVersionin interfaceAdmin
-
getAdminOperationVersionFromControllers
- Specified by:
getAdminOperationVersionFromControllersin interfaceAdmin
-
getLocalAdminOperationProtocolVersion
public long getLocalAdminOperationProtocolVersion()- Specified by:
getLocalAdminOperationProtocolVersionin interfaceAdmin
-
getControllerName
- Specified by:
getControllerNamein interfaceAdmin
-
getRoutersClusterConfig
Unsupported operation in the parent controller.- Specified by:
getRoutersClusterConfigin 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:
updateRoutersClusterConfigin interfaceAdmin
-
getAllStorePushStrategyForMigration
- Specified by:
getAllStorePushStrategyForMigrationin 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:
setStorePushStrategyForMigrationin interfaceAdmin
-
discoverCluster
Description copied from interface:AdminFind 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:
discoverClusterin interfaceAdmin- See Also:
-
getRouterD2Service
Description copied from interface:AdminFind the router d2 service associated with a given cluster name.- Specified by:
getRouterD2Servicein interfaceAdmin- See Also:
-
getServerD2Service
Description copied from interface:AdminFind the server d2 service associated with a given cluster name.- Specified by:
getServerD2Servicein interfaceAdmin- See Also:
-
findAllBootstrappingVersions
Unsupported operation in the parent controller.- Specified by:
findAllBootstrappingVersionsin interfaceAdmin
-
getVeniceWriterFactory
- Specified by:
getVeniceWriterFactoryin interfaceAdmin- Returns:
- a
VeniceWriterFactoryobject used by the Venice controller to create the venice writer.
-
getPubSubSSLProperties
- Specified by:
getPubSubSSLPropertiesin interfaceAdmin
-
stop
Description copied from interface:AdminStop the helix controller for a single cluster. -
stopVeniceController
public void stopVeniceController()Description copied from interface:AdminStop the entire controller but not only the helix controller for a single cluster.- Specified by:
stopVeniceControllerin interfaceAdmin- See Also:
-
close
public void close()CauseVeniceParentHelixAdminand its associated services to stop executing. -
isLeaderControllerOfControllerCluster
public boolean isLeaderControllerOfControllerCluster()Description copied from interface:AdminThis 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:
isLeaderControllerOfControllerClusterin interfaceAdmin- See Also:
-
isTopicTruncated
- Specified by:
isTopicTruncatedin interfaceAdmin- See Also:
-
isTopicTruncatedBasedOnRetention
public boolean isTopicTruncatedBasedOnRetention(long retention) - Specified by:
isTopicTruncatedBasedOnRetentionin interfaceAdmin- See Also:
-
isTopicTruncatedBasedOnRetention
- Specified by:
isTopicTruncatedBasedOnRetentionin interfaceAdmin
-
getMinNumberOfUnusedKafkaTopicsToPreserve
public int getMinNumberOfUnusedKafkaTopicsToPreserve()- Specified by:
getMinNumberOfUnusedKafkaTopicsToPreservein interfaceAdmin- See Also:
-
truncateKafkaTopic
- Specified by:
truncateKafkaTopicin 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:AdminTruncate a Kafka topic by setting its retention time to the input value.- Specified by:
truncateKafkaTopicin 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:
isResourceStillAlivein interfaceAdmin
-
updateClusterDiscovery
public void updateClusterDiscovery(String storeName, String oldCluster, String newCluster, String initiatingCluster) Description copied from interface:AdminUpdate the cluster discovery of a given store by writing to the StoreConfig ZNode.- Specified by:
updateClusterDiscoveryin 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:
sendPushJobDetailsin interfaceAdmin- See Also:
-
getPushJobDetails
- Specified by:
getPushJobDetailsin interfaceAdmin- See Also:
-
getBatchJobHeartbeatValue
- Specified by:
getBatchJobHeartbeatValuein interfaceAdmin- See Also:
-
writeEndOfPush
public void writeEndOfPush(String clusterName, String storeName, int versionNumber, boolean alsoWriteStartOfPush) - Specified by:
writeEndOfPushin interfaceAdmin- See Also:
-
whetherEnableBatchPushFromAdmin
- Specified by:
whetherEnableBatchPushFromAdminin interfaceAdmin
-
isStoreMigrationAllowed
- Specified by:
isStoreMigrationAllowedin interfaceAdmin- See Also:
-
migrateStore
Migrate a store from its source cluster to a new destination cluster by sending aMIGRATE_STOREadmin message.- Specified by:
migrateStorein interfaceAdmin
-
completeMigration
- Specified by:
completeMigrationin interfaceAdmin- See Also:
-
abortMigration
Abort store migration by sending aABORT_MIGRATIONadmin message.- Specified by:
abortMigrationin interfaceAdmin
-
getMetaStoreValue
- Specified by:
getMetaStoreValuein interfaceAdmin
-
updateAclForStore
Description copied from interface:AdminProvision a new set of ACL for a venice store and its associated kafka topic.- Specified by:
updateAclForStorein 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:AdminFetch the current set of ACL provisioned for a venice store and its associated kafka topic.- Specified by:
getAclForStorein 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:AdminDelete the current set of ACL provisioned for a venice store and its associated kafka topic.- Specified by:
deleteAclForStorein interfaceAdmin- See Also:
-
configureActiveActiveReplication
public void configureActiveActiveReplication(String clusterName, VeniceUserStoreType storeType, Optional<String> storeName, boolean enableNativeReplicationForCluster, Optional<String> regionsFilter) Description copied from interface:AdminEnable/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:
configureActiveActiveReplicationin 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:
getClusterStaleStoresin interfaceAdmin
-
getStoresForCompaction
- Specified by:
getStoresForCompactionin interfaceAdmin- Parameters:
clusterName- , the name of the cluster to search for stores that are ready for compaction- Returns:
- the list of stores ready for compaction
-
repushStore
This is the entry/exit common point for manual and scheduled repush codepaths. This being the common point allows streamlined logging for the repushStore endpoint. This function triggers repush store downstream. seeAdmin.repushStore(com.linkedin.venice.controller.repush.RepushJobRequest)- Specified by:
repushStorein interfaceAdmin- Parameters:
repushJobRequest- contains params for repush job- Returns:
- data model of repush job run info
- Throws:
Exception
-
getCompactionManager
- Specified by:
getCompactionManagerin interfaceAdmin
-
getDeadStores
public List<StoreInfo> getDeadStores(String clusterName, String storeName, Map<String, String> params) - Specified by:
getDeadStoresin interfaceAdminparams- Parameters for dead store detection including: - "includeSystemStores": boolean (default: false) - "lookBackMS": long (optional) - Future extension points- Returns:
- list of stores infos that are considered dead. A store is considered dead if it exists but has no user traffic in it's read or write path.
-
getLargestUsedVersionFromStoreGraveyard
Description copied from interface:AdminDeprecated but remain here to keep compatibility untilAdmin.getLargestUsedVersion(String, String)is used.- Specified by:
getLargestUsedVersionFromStoreGraveyardin interfaceAdmin
-
getLargestUsedVersion
- Specified by:
getLargestUsedVersionin interfaceAdmin
-
getClusterStores
Unsupported operation in the parent controller.- Specified by:
getClusterStoresin interfaceAdmin
-
getRegionPushDetails
public RegionPushDetails getRegionPushDetails(String clusterName, String storeName, boolean isPartitionDetailAdded) Unsupported operation in the parent controller.- Specified by:
getRegionPushDetailsin 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:
listStorePushInfoin 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:
checkResourceCleanupBeforeStoreCreationin interfaceAdmin
-
isParent
public boolean isParent()Description copied from interface:AdminCheck whether the controller works as a parent controller -
getParentControllerRegionState
Description copied from interface:AdminReturn the state of the region of the parent controller.- Specified by:
getParentControllerRegionStatein interfaceAdmin- Returns:
ParentControllerRegionState.ACTIVEwhich means that the parent controller in the region is serving requests. Otherwise, returnParentControllerRegionState.PASSIVE- See Also:
-
getChildDataCenterControllerUrlMap
Description copied from interface:AdminGet child datacenter to child controller url mapping.- Specified by:
getChildDataCenterControllerUrlMapin interfaceAdmin- Returns:
- A map of child datacenter -> child controller url
- See Also:
-
getChildDataCenterControllerD2Map
Description copied from interface:AdminGet child datacenter to child controller d2 zk host mapping- Specified by:
getChildDataCenterControllerD2Mapin interfaceAdmin- Returns:
- A map of child datacenter -> child controller d2 zk host
- See Also:
-
getChildControllerD2ServiceName
Description copied from interface:AdminGet child datacenter controller d2 service name- Specified by:
getChildControllerD2ServiceNamein interfaceAdmin- Returns:
- d2 service name
- See Also:
-
getStoreConfigRepo
Description copied from interface:AdminReturn a shared store config repository.- Specified by:
getStoreConfigRepoin interfaceAdmin- See Also:
-
getMetaStoreWriter
Description copied from interface:AdminReturn aMetaStoreWriter, which can be shared across different Venice clusters.- Specified by:
getMetaStoreWriterin interfaceAdmin- See Also:
-
getMetaStoreReader
- Specified by:
getMetaStoreReaderin interfaceAdmin
-
getEmergencySourceRegion
Description copied from interface:AdminReturn the emergency source region configuration.- Specified by:
getEmergencySourceRegionin interfaceAdmin- See Also:
-
getAggregateRealTimeTopicSource
Description copied from interface:AdminReturn the source Kafka boostrap server url for aggregate real-time topic updates- Specified by:
getAggregateRealTimeTopicSourcein interfaceAdmin- See Also:
-
getClustersLeaderOf
Description copied from interface:AdminGet a list of clusters this controller is a leader of.- Specified by:
getClustersLeaderOfin interfaceAdmin- Returns:
- a list of clusters this controller is a leader of.
- See Also:
-
getVeniceHelixAdmin
-
getBackupVersionDefaultRetentionMs
public long getBackupVersionDefaultRetentionMs()Description copied from interface:AdminReturns default backup version retention time.- Specified by:
getBackupVersionDefaultRetentionMsin interfaceAdmin- See Also:
-
getDefaultMaxRecordSizeBytes
public int getDefaultMaxRecordSizeBytes()- Specified by:
getDefaultMaxRecordSizeBytesin interfaceAdmin- Returns:
- The default value of
VeniceWriter.maxRecordSizeByteswhich 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:
wipeClusterin interfaceAdmin
-
compareStore
public StoreComparisonInfo compareStore(String clusterName, String storeName, String fabricA, String fabricB) throws IOException Description copied from interface:AdminCompare store metadata and version states between two fabrics.- Specified by:
compareStorein interfaceAdmin- Throws:
IOException- See Also:
-
copyOverStoreSchemasAndConfigs
public StoreInfo copyOverStoreSchemasAndConfigs(String clusterName, String srcFabric, String destFabric, String storeName) - Specified by:
copyOverStoreSchemasAndConfigsin 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:
createStoragePersonain interfaceAdmin- See Also:
-
getStoragePersona
- Specified by:
getStoragePersonain interfaceAdmin- See Also:
-
deleteStoragePersona
Deletes the persona with the given name. If no persona is found, this method does nothing.- Specified by:
deleteStoragePersonain interfaceAdmin
-
updateStoragePersona
public void updateStoragePersona(String clusterName, String name, UpdateStoragePersonaQueryParams queryParams) Updates a persona with the given parameters by sending aUPDATE_STORAGE_PERSONAadmin message.- Specified by:
updateStoragePersonain interfaceAdmin
-
getPersonaAssociatedWithStore
- Specified by:
getPersonaAssociatedWithStorein interfaceAdmin- See Also:
-
getClusterStoragePersonas
- Specified by:
getClusterStoragePersonasin interfaceAdmin- See Also:
-
cleanupInstanceCustomizedStates
Description copied from interface:AdminScan 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:
cleanupInstanceCustomizedStatesin interfaceAdmin- Parameters:
clusterName- to perform the cleanup.- Returns:
- list of deleted ZNode paths.
-
getStoreGraveyard
- Specified by:
getStoreGraveyardin interfaceAdmin
-
removeStoreFromGraveyard
- Specified by:
removeStoreFromGraveyardin interfaceAdmin
-
getPushStatusStoreReader
- Specified by:
getPushStatusStoreReaderin interfaceAdmin
-
getPushStatusStoreWriter
- Specified by:
getPushStatusStoreWriterin interfaceAdmin
-
sendHeartbeatToSystemStore
public void sendHeartbeatToSystemStore(String clusterName, String systemStoreName, long heartbeatTimestamp) Description copied from interface:AdminSend a heartbeat timestamp to targeted system store.- Specified by:
sendHeartbeatToSystemStorein interfaceAdmin
-
getHeartbeatFromSystemStore
Description copied from interface:AdminRead the latest heartbeat timestamp from system store. If it failed to read from system store, this method should return -1.- Specified by:
getHeartbeatFromSystemStorein interfaceAdmin
-
getHelixVeniceClusterResources
- Specified by:
getHelixVeniceClusterResourcesin interfaceAdmin- Returns:
- the aggregate resources required by controller to manage a Venice cluster.
-
getPubSubTopicRepository
- Specified by:
getPubSubTopicRepositoryin interfaceAdmin
-
getLogContext
- Specified by:
getLogContextin interfaceAdmin
-
getControllerConfig
- Specified by:
getControllerConfigin interfaceAdmin
-
validateStoreDeleted
Validates that a store has been completely deleted from all venice clusters cross-regionally- Specified by:
validateStoreDeletedin interfaceAdmin- Parameters:
clusterName- the name of the cluster to checkstoreName- the name of the store to validate deletion for- Returns:
- StoreDeletedValidation indicating whether the store is fully deleted or what resources remain
- See Also:
-