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 interface
AbstractStore.StoreVersionSupplier
-
Field Summary
Fields Modifier and Type Field Description static long
DEFAULT_READ_QUOTA
Default read quota 1800 QPS per nodestatic int
DEFAULT_REPLICATION_FACTOR
static long
DEFAULT_STORAGE_QUOTA
Default 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 void
addVersion(Version version)
void
addVersion(Version version, boolean isClonedVersion)
void
checkDisableStoreWrite(java.lang.String action, int version)
boolean
containsVersion(int versionNumber)
Version
deleteVersion(int versionNumber)
void
fixMissingFields()
void
forceAddVersion(Version version, boolean isClonedVersion)
Version
getVersion(int versionNumber)
Version
getVersionOrThrow(int versionNumber)
java.util.List<Version>
getVersions()
VersionStatus
getVersionStatus(int versionNumber)
boolean
isSystemStore()
Version
peekNextVersion()
java.util.List<Version>
retrieveVersionsToDelete(int clusterNumVersionsToPreserve)
protected void
setupVersionSupplier(AbstractStore.StoreVersionSupplier versionsSupplier)
This function should be invoked only once.void
setVersions(java.util.List<Version> versions)
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, 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:
getVersions
in interfaceStore
-
setVersions
public void setVersions(java.util.List<Version> versions)
- Specified by:
setVersions
in interfaceStore
-
addVersion
public void addVersion(Version version)
- Specified by:
addVersion
in interfaceStore
-
addVersion
public void addVersion(Version version, boolean isClonedVersion)
- Specified by:
addVersion
in interfaceStore
-
forceAddVersion
public void forceAddVersion(Version version, boolean isClonedVersion)
- Specified by:
forceAddVersion
in interfaceStore
-
checkDisableStoreWrite
public void checkDisableStoreWrite(java.lang.String action, int version)
- Specified by:
checkDisableStoreWrite
in interfaceStore
-
deleteVersion
public Version deleteVersion(int versionNumber)
- Specified by:
deleteVersion
in interfaceStore
-
containsVersion
public boolean containsVersion(int versionNumber)
- Specified by:
containsVersion
in interfaceStore
-
updateVersionStatus
public void updateVersionStatus(int versionNumber, VersionStatus status)
- Specified by:
updateVersionStatus
in interfaceStore
-
peekNextVersion
public Version peekNextVersion()
- Specified by:
peekNextVersion
in interfaceStore
-
getVersion
@Nullable public Version getVersion(int versionNumber)
- Specified by:
getVersion
in interfaceStore
- Parameters:
versionNumber
- for which to get theVersion
- Returns:
- the
Version
corresponding to the provided {@param versionNumber}, or null if no such version exists
-
getVersionOrThrow
@Nonnull public Version getVersionOrThrow(int versionNumber) throws StoreVersionNotFoundException
- Specified by:
getVersionOrThrow
in interfaceStore
- Throws:
StoreVersionNotFoundException
-
getVersionStatus
public VersionStatus getVersionStatus(int versionNumber)
- Specified by:
getVersionStatus
in interfaceStore
-
retrieveVersionsToDelete
public java.util.List<Version> retrieveVersionsToDelete(int clusterNumVersionsToPreserve)
- Specified by:
retrieveVersionsToDelete
in interfaceStore
-
isSystemStore
public boolean isSystemStore()
- Specified by:
isSystemStore
in interfaceStore
-
fixMissingFields
public void fixMissingFields()
- Specified by:
fixMissingFields
in interfaceStore
-
-