Package com.linkedin.venice.meta
Class AbstractStore
java.lang.Object
com.linkedin.venice.meta.AbstractStore
- All Implemented Interfaces:
Store
- Direct Known Subclasses:
SystemStore
,ZKStore
This is an abstraction of metadata maintained per Store.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final long
Default read quota 1800 QPS per nodestatic final int
static final long
Default storage quota 20GBFields inherited from interface com.linkedin.venice.meta.Store
BOOTSTRAP_TO_ONLINE_TIMEOUT_IN_HOURS, DEFAULT_BATCH_GET_LIMIT, DEFAULT_RT_RETENTION_TIME, IGNORE_VERSION, NON_EXISTING_VERSION, NUM_VERSION_PRESERVE_NOT_SET, SYSTEM_STORE_FORMAT, SYSTEM_STORE_NAME_PREFIX, UNLIMITED_STORAGE_QUOTA
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addVersion
(Version version) void
addVersion
(Version version, boolean isClonedVersion) void
checkDisableStoreWrite
(String action, int version) boolean
containsVersion
(int versionNumber) deleteVersion
(int versionNumber) void
void
forceAddVersion
(Version version, boolean isClonedVersion) getVersion
(int versionNumber) getVersionOrThrow
(int versionNumber) getVersionStatus
(int versionNumber) boolean
retrieveVersionsToDelete
(int clusterNumVersionsToPreserve) protected void
setupVersionSupplier
(AbstractStore.StoreVersionSupplier versionsSupplier) This function should be invoked only once.void
setVersions
(List<Version> versions) void
updateVersionForDaVinciHeartbeat
(int versionNumber, boolean reported) void
updateVersionStatus
(int versionNumber, VersionStatus status) 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.meta.Store
cloneStore, getBackupStrategy, getBackupVersionRetentionMs, getBatchGetLimit, getBootstrapToOnlineTimeoutInHours, getClientDecompressionEnabled, getCompressionStrategy, getCreatedTime, getCurrentVersion, getEtlStoreConfig, getHybridStoreConfig, getIsDavinciHeartbeatReported, getLargestUsedVersionNumber, getLatestSuperSetValueSchemaId, getLatestVersionPromoteToCurrentTimestamp, getLowWatermark, getMaxCompactionLagSeconds, getMaxNearlineRecordSizeBytes, getMaxRecordSizeBytes, getMinCompactionLagSeconds, getName, getNativeReplicationSourceFabric, getNearlineProducerCountPerWriter, getNumVersionsToPreserve, getOffLinePushStrategy, getOwner, getPartitionCount, getPartitionerConfig, getPersistenceType, getPushStreamSourceAddress, getReadQuotaInCU, getReadStrategy, getReplicationFactor, getRetentionTime, getRmdVersion, getRoutingStrategy, getStorageQuotaInByte, getSystemStores, getTargetSwapRegion, getTargetSwapRegionWaitTime, getViewConfigs, isAccessControlled, isActiveActiveReplicationEnabled, isBlobTransferEnabled, isChunkingEnabled, isDaVinciPushStatusStoreEnabled, isEnableReads, isEnableWrites, isHybrid, isHybridStoreDiskQuotaEnabled, isIncrementalPushEnabled, isMigrating, isMigrationDuplicateStore, isNativeReplicationEnabled, isNearlineProducerCompressionEnabled, isReadComputationEnabled, isRmdChunkingEnabled, isSchemaAutoRegisterFromPushJobEnabled, isSeparateRealTimeTopicEnabled, isStorageNodeReadQuotaEnabled, isStoreMetadataSystemStoreEnabled, isStoreMetaSystemStoreEnabled, isUnusedSchemaDeletionEnabled, isWriteComputationEnabled, putSystemStore, setAccessControlled, setActiveActiveReplicationEnabled, setBackupStrategy, setBackupVersionRetentionMs, setBatchGetLimit, setBlobTransferEnabled, setBootstrapToOnlineTimeoutInHours, setChunkingEnabled, setClientDecompressionEnabled, setCompressionStrategy, setCurrentVersion, setCurrentVersionWithoutCheck, setDaVinciPushStatusStoreEnabled, setEnableReads, setEnableWrites, setEtlStoreConfig, setHybridStoreConfig, setHybridStoreDiskQuotaEnabled, setIncrementalPushEnabled, setIsDavinciHeartbeatReported, setLargestUsedVersionNumber, setLatestSuperSetValueSchemaId, setLatestVersionPromoteToCurrentTimestamp, setLowWatermark, setMaxCompactionLagSeconds, setMaxNearlineRecordSizeBytes, setMaxRecordSizeBytes, setMigrating, setMigrationDuplicateStore, setMinCompactionLagSeconds, setNativeReplicationEnabled, setNativeReplicationSourceFabric, setNearlineProducerCompressionEnabled, setNearlineProducerCountPerWriter, setNumVersionsToPreserve, setOwner, setPartitionCount, setPartitionerConfig, setPersistenceType, setPushStreamSourceAddress, setReadComputationEnabled, setReadQuotaInCU, setReplicationFactor, setRmdChunkingEnabled, setRmdVersion, setSchemaAutoRegisterFromPushJobEnabled, setSeparateRealTimeTopicEnabled, setStorageNodeReadQuotaEnabled, setStorageQuotaInByte, setStoreMetadataSystemStoreEnabled, setStoreMetaSystemStoreEnabled, setSystemStores, setTargetSwapRegion, setTargetSwapRegionWaitTime, setUnusedSchemaDeletionEnabled, setViewConfigs, setWriteComputationEnabled
-
Field Details
-
DEFAULT_REPLICATION_FACTOR
public static final int DEFAULT_REPLICATION_FACTOR- See Also:
-
DEFAULT_STORAGE_QUOTA
public static final long DEFAULT_STORAGE_QUOTADefault storage quota 20GB- See Also:
-
DEFAULT_READ_QUOTA
public static final long DEFAULT_READ_QUOTADefault read quota 1800 QPS per node- See Also:
-
-
Constructor Details
-
AbstractStore
public AbstractStore()
-
-
Method Details
-
setupVersionSupplier
This function should be invoked only once. -
getVersions
- Specified by:
getVersions
in interfaceStore
-
setVersions
- Specified by:
setVersions
in interfaceStore
-
addVersion
- Specified by:
addVersion
in interfaceStore
-
addVersion
- Specified by:
addVersion
in interfaceStore
-
forceAddVersion
- Specified by:
forceAddVersion
in interfaceStore
-
checkDisableStoreWrite
- Specified by:
checkDisableStoreWrite
in interfaceStore
-
deleteVersion
- Specified by:
deleteVersion
in interfaceStore
-
containsVersion
public boolean containsVersion(int versionNumber) - Specified by:
containsVersion
in interfaceStore
-
updateVersionStatus
- Specified by:
updateVersionStatus
in interfaceStore
-
peekNextVersion
- Specified by:
peekNextVersion
in interfaceStore
-
getVersion
- Specified by:
getVersion
in interfaceStore
- Parameters:
versionNumber
- for which to get theVersion
- Returns:
- the
Version
corresponding to the provided , or null if no such version exists
-
getVersionOrThrow
- Specified by:
getVersionOrThrow
in interfaceStore
- Throws:
StoreVersionNotFoundException
-
getVersionStatus
- Specified by:
getVersionStatus
in interfaceStore
-
retrieveVersionsToDelete
- Specified by:
retrieveVersionsToDelete
in interfaceStore
-
isSystemStore
public boolean isSystemStore()- Specified by:
isSystemStore
in interfaceStore
-
fixMissingFields
public void fixMissingFields()- Specified by:
fixMissingFields
in interfaceStore
-
updateVersionForDaVinciHeartbeat
public void updateVersionForDaVinciHeartbeat(int versionNumber, boolean reported) - Specified by:
updateVersionForDaVinciHeartbeat
in interfaceStore
-