Package com.linkedin.venice.meta
Class AbstractStore
- java.lang.Object
-
- com.linkedin.venice.meta.AbstractStore
-
- All Implemented Interfaces:
Store
- Direct Known Subclasses:
SystemStore,ZKStore
public abstract class AbstractStore extends java.lang.Object implements Store
This is an abstraction of metadata maintained per Store.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interfaceAbstractStore.StoreVersionSupplier
-
Field Summary
Fields Modifier and Type Field Description static longDEFAULT_READ_QUOTADefault read quota 1800 QPS per nodestatic intDEFAULT_REPLICATION_FACTORstatic longDEFAULT_STORAGE_QUOTADefault storage quota 20GB-
Fields 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, storeNamePattern, SYSTEM_STORE_FORMAT, SYSTEM_STORE_NAME_PREFIX, UNLIMITED_STORAGE_QUOTA
-
-
Constructor Summary
Constructors Constructor Description AbstractStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddVersion(Version version)voidaddVersion(Version version, boolean isClonedVersion)voidcheckDisableStoreWrite(java.lang.String action, int version)booleancontainsVersion(int versionNumber)VersiondeleteVersion(int versionNumber)voidfixMissingFields()voidforceAddVersion(Version version, boolean isClonedVersion)VersiongetVersion(int versionNumber)VersiongetVersionOrThrow(int versionNumber)java.util.List<Version>getVersions()VersionStatusgetVersionStatus(int versionNumber)booleanisSystemStore()VersionpeekNextVersion()java.util.List<Version>retrieveVersionsToDelete(int clusterNumVersionsToPreserve)protected voidsetupVersionSupplier(AbstractStore.StoreVersionSupplier versionsSupplier)This function should be invoked only once.voidsetVersions(java.util.List<Version> versions)voidupdateVersionStatus(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, 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, 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, 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, setUnusedSchemaDeletionEnabled, setViewConfigs, setWriteComputationEnabled
-
-
-
-
Field Detail
-
DEFAULT_REPLICATION_FACTOR
public static final int DEFAULT_REPLICATION_FACTOR
- See Also:
- Constant Field Values
-
DEFAULT_STORAGE_QUOTA
public static final long DEFAULT_STORAGE_QUOTA
Default storage quota 20GB- See Also:
- Constant Field Values
-
DEFAULT_READ_QUOTA
public static final long DEFAULT_READ_QUOTA
Default read quota 1800 QPS per node- See Also:
- Constant Field Values
-
-
Method Detail
-
setupVersionSupplier
protected void setupVersionSupplier(AbstractStore.StoreVersionSupplier versionsSupplier)
This function should be invoked only once.
-
getVersions
public java.util.List<Version> getVersions()
- Specified by:
getVersionsin interfaceStore
-
setVersions
public void setVersions(java.util.List<Version> versions)
- Specified by:
setVersionsin interfaceStore
-
addVersion
public void addVersion(Version version)
- Specified by:
addVersionin interfaceStore
-
addVersion
public void addVersion(Version version, boolean isClonedVersion)
- Specified by:
addVersionin interfaceStore
-
forceAddVersion
public void forceAddVersion(Version version, boolean isClonedVersion)
- Specified by:
forceAddVersionin interfaceStore
-
checkDisableStoreWrite
public void checkDisableStoreWrite(java.lang.String action, int version)- Specified by:
checkDisableStoreWritein interfaceStore
-
deleteVersion
public Version deleteVersion(int versionNumber)
- Specified by:
deleteVersionin interfaceStore
-
containsVersion
public boolean containsVersion(int versionNumber)
- Specified by:
containsVersionin interfaceStore
-
updateVersionStatus
public void updateVersionStatus(int versionNumber, VersionStatus status)- Specified by:
updateVersionStatusin interfaceStore
-
peekNextVersion
public Version peekNextVersion()
- Specified by:
peekNextVersionin interfaceStore
-
getVersion
@Nullable public Version getVersion(int versionNumber)
- Specified by:
getVersionin interfaceStore- Parameters:
versionNumber- for which to get theVersion- Returns:
- the
Versioncorresponding to the provided {@param versionNumber}, or null if no such version exists
-
getVersionOrThrow
@Nonnull public Version getVersionOrThrow(int versionNumber) throws StoreVersionNotFoundException
- Specified by:
getVersionOrThrowin interfaceStore- Throws:
StoreVersionNotFoundException
-
getVersionStatus
public VersionStatus getVersionStatus(int versionNumber)
- Specified by:
getVersionStatusin interfaceStore
-
retrieveVersionsToDelete
public java.util.List<Version> retrieveVersionsToDelete(int clusterNumVersionsToPreserve)
- Specified by:
retrieveVersionsToDeletein interfaceStore
-
isSystemStore
public boolean isSystemStore()
- Specified by:
isSystemStorein interfaceStore
-
fixMissingFields
public void fixMissingFields()
- Specified by:
fixMissingFieldsin interfaceStore
-
-