Package com.linkedin.venice.meta
Interface Version
-
- All Superinterfaces:
java.lang.Comparable<Version>
,DataModelBackedStructure<StoreVersion>
- All Known Implementing Classes:
ReadOnlyStore.ReadOnlyVersion
,VersionImpl
public interface Version extends java.lang.Comparable<Version>, DataModelBackedStructure<StoreVersion>
This interface defines all the public APIs, and if you need to add accessors to some new fields, this interface needs to be changed accordingly.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Version.PushType
Producer type for writing data to Venice
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
REAL_TIME_TOPIC_SUFFIX
static int
REPLICATION_METADATA_VERSION_ID_UNSET
Special number indicating no replication metadata version is set.static java.lang.String
SEPARATE_REAL_TIME_TOPIC_SUFFIX
static java.lang.String
STREAM_REPROCESSING_TOPIC_SUFFIX
static java.lang.String
VENICE_RE_PUSH_PUSH_ID_PREFIX
Prefix used in push id to indicate the version's data source is coming from an existing version topic.static java.lang.String
VERSION_SEPARATOR
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description static boolean
checkVersionSRTopic(java.lang.String kafkaTopic, boolean checkSR)
Version
cloneVersion()
static java.lang.String
composeKafkaTopic(java.lang.String storeName, int versionNumber)
static java.lang.String
composeRealTimeTopic(java.lang.String storeName)
static java.lang.String
composeSeparateRealTimeTopic(java.lang.String storeName)
static java.lang.String
composeStreamReprocessingTopic(java.lang.String storeName, int versionNumber)
static java.lang.String
composeStreamReprocessingTopicFromVersionTopic(java.lang.String versionTopic)
static java.lang.String
composeVersionTopicFromStreamReprocessingTopic(java.lang.String kafkaTopic)
static boolean
containsHybridVersion(java.util.List<Version> versions)
static java.lang.String
generateRePushId(java.lang.String pushId)
java.time.Duration
getAge()
CompressionStrategy
getCompressionStrategy()
long
getCreatedTime()
DataRecoveryVersionConfig
getDataRecoveryVersionConfig()
HybridStoreConfig
getHybridStoreConfig()
static int
getLastIndexOfVersionSeparator(java.lang.String kafkaTopic)
int
getMinActiveReplicas()
java.lang.String
getNativeReplicationSourceFabric()
int
getNumber()
int
getPartitionCount()
PartitionerConfig
getPartitionerConfig()
java.lang.String
getPushJobId()
java.lang.String
getPushStreamSourceAddress()
Version.PushType
getPushType()
int
getReplicationFactor()
int
getRepushSourceVersion()
int
getRmdVersionId()
VersionStatus
getStatus()
java.lang.String
getStoreName()
default int
getTimestampMetadataVersionId()
Deprecated.UsegetRmdVersionId()
insteadjava.util.Map<java.lang.String,ViewConfig>
getViewConfigs()
static java.lang.String
guidBasedDummyPushId()
boolean
isActiveActiveReplicationEnabled()
static boolean
isATopicThatIsVersioned(java.lang.String kafkaTopic)
Determines if the the inputted topic is a topic which is versioned.boolean
isBlobTransferEnabled()
boolean
isChunkingEnabled()
boolean
isIncrementalPushEnabled()
default boolean
isLeaderFollowerModelEnabled()
boolean
isNativeReplicationEnabled()
static boolean
isPushIdRePush(java.lang.String pushId)
static boolean
isRealTimeTopic(java.lang.String kafkaTopic)
boolean
isRmdChunkingEnabled()
boolean
isSeparateRealTimeTopicEnabled()
static boolean
isStreamReprocessingTopic(java.lang.String kafkaTopic)
boolean
isUseVersionLevelHybridConfig()
boolean
isUseVersionLevelIncrementalPushEnabled()
boolean
isVersionSwapDeferred()
static boolean
isVersionTopic(java.lang.String kafkaTopic)
Only return true if the input topic name is a version topic.static boolean
isVersionTopicOrStreamReprocessingTopic(java.lang.String kafkaTopic)
Return true if the input topic name is a version topic or stream-reprocessing topic.java.lang.String
kafkaTopicName()
Kafka topic name is composed by store name and version.static java.lang.String
numberBasedDummyPushId(int number)
static java.lang.String
parseStoreFromKafkaTopicName(java.lang.String kafkaTopic)
Parse the store name of the given topic accordingly depending on the type of the kafka topic.static java.lang.String
parseStoreFromRealTimeTopic(java.lang.String kafkaTopic)
static java.lang.String
parseStoreFromStreamReprocessingTopic(java.lang.String kafkaTopic)
static java.lang.String
parseStoreFromVersionTopic(java.lang.String kafkaTopic)
static int
parseVersionFromKafkaTopicName(java.lang.String kafkaTopic)
This API works for both version topic and stream-reprocessing topics; other topic names will fail with IllegalArgumentException.static int
parseVersionFromVersionTopicName(java.lang.String kafkaTopic)
This API only works for version topic; other topic names will fail with IllegalArgumentException.void
setActiveActiveReplicationEnabled(boolean activeActiveReplicationEnabled)
void
setAge(java.time.Duration age)
void
setBlobTransferEnabled(boolean blobTransferEnabled)
void
setBufferReplayEnabledForHybrid(boolean bufferReplayEnabledForHybrid)
void
setChunkingEnabled(boolean chunkingEnabled)
void
setCompressionStrategy(CompressionStrategy compressionStrategy)
void
setDataRecoveryVersionConfig(DataRecoveryVersionConfig dataRecoveryVersionConfig)
void
setHybridStoreConfig(HybridStoreConfig hybridConfig)
void
setIncrementalPushEnabled(boolean incrementalPushEnabled)
default void
setLeaderFollowerModelEnabled(boolean leaderFollowerModelEnabled)
Deprecated.void
setNativeReplicationEnabled(boolean nativeReplicationEnabled)
void
setNativeReplicationSourceFabric(java.lang.String nativeReplicationSourceFabric)
void
setNumber(int number)
void
setPartitionCount(int partitionCount)
void
setPartitionerConfig(PartitionerConfig partitionerConfig)
void
setPushJobId(java.lang.String pushJobId)
void
setPushStreamSourceAddress(java.lang.String address)
void
setPushType(Version.PushType pushType)
void
setReplicationFactor(int replicationFactor)
void
setRepushSourceVersion(int version)
void
setRmdChunkingEnabled(boolean rmdChunkingEnabled)
void
setRmdVersionId(int replicationMetadataVersionId)
void
setSeparateRealTimeTopicEnabled(boolean separateRealTimeTopicEnabled)
void
setStatus(VersionStatus status)
default void
setTimestampMetadataVersionId(int replicationMetadataVersionId)
Deprecated.UsesetRmdVersionId(int)
insteadvoid
setUseVersionLevelHybridConfig(boolean versionLevelHybridConfig)
void
setUseVersionLevelIncrementalPushEnabled(boolean versionLevelIncrementalPushEnabled)
void
setVersionSwapDeferred(boolean versionSwapDeferred)
void
setViewConfigs(java.util.Map<java.lang.String,ViewConfig> viewConfigMap)
-
Methods inherited from interface com.linkedin.venice.meta.DataModelBackedStructure
dataModel
-
-
-
-
Field Detail
-
VERSION_SEPARATOR
static final java.lang.String VERSION_SEPARATOR
- See Also:
- Constant Field Values
-
REAL_TIME_TOPIC_SUFFIX
static final java.lang.String REAL_TIME_TOPIC_SUFFIX
- See Also:
- Constant Field Values
-
STREAM_REPROCESSING_TOPIC_SUFFIX
static final java.lang.String STREAM_REPROCESSING_TOPIC_SUFFIX
- See Also:
- Constant Field Values
-
SEPARATE_REAL_TIME_TOPIC_SUFFIX
static final java.lang.String SEPARATE_REAL_TIME_TOPIC_SUFFIX
- See Also:
- Constant Field Values
-
REPLICATION_METADATA_VERSION_ID_UNSET
static final int REPLICATION_METADATA_VERSION_ID_UNSET
Special number indicating no replication metadata version is set.- See Also:
- Constant Field Values
-
VENICE_RE_PUSH_PUSH_ID_PREFIX
static final java.lang.String VENICE_RE_PUSH_PUSH_ID_PREFIX
Prefix used in push id to indicate the version's data source is coming from an existing version topic.- See Also:
- Constant Field Values
-
-
Method Detail
-
getNumber
int getNumber()
-
setNumber
void setNumber(int number)
-
getCreatedTime
long getCreatedTime()
-
getAge
java.time.Duration getAge()
-
setAge
void setAge(java.time.Duration age)
-
getStatus
VersionStatus getStatus()
-
setStatus
void setStatus(VersionStatus status)
-
getCompressionStrategy
CompressionStrategy getCompressionStrategy()
-
setCompressionStrategy
void setCompressionStrategy(CompressionStrategy compressionStrategy)
-
isLeaderFollowerModelEnabled
default boolean isLeaderFollowerModelEnabled()
-
isNativeReplicationEnabled
boolean isNativeReplicationEnabled()
-
setLeaderFollowerModelEnabled
@Deprecated default void setLeaderFollowerModelEnabled(boolean leaderFollowerModelEnabled)
Deprecated.
-
setNativeReplicationEnabled
void setNativeReplicationEnabled(boolean nativeReplicationEnabled)
-
getPushStreamSourceAddress
java.lang.String getPushStreamSourceAddress()
-
setPushStreamSourceAddress
void setPushStreamSourceAddress(java.lang.String address)
-
setBufferReplayEnabledForHybrid
void setBufferReplayEnabledForHybrid(boolean bufferReplayEnabledForHybrid)
-
isChunkingEnabled
boolean isChunkingEnabled()
-
setChunkingEnabled
void setChunkingEnabled(boolean chunkingEnabled)
-
isRmdChunkingEnabled
boolean isRmdChunkingEnabled()
-
setRmdChunkingEnabled
void setRmdChunkingEnabled(boolean rmdChunkingEnabled)
-
getStoreName
java.lang.String getStoreName()
-
getPushJobId
java.lang.String getPushJobId()
-
setPushJobId
void setPushJobId(java.lang.String pushJobId)
-
getPushType
Version.PushType getPushType()
-
setPushType
void setPushType(Version.PushType pushType)
-
setPartitionCount
void setPartitionCount(int partitionCount)
-
getPartitionCount
int getPartitionCount()
-
getPartitionerConfig
PartitionerConfig getPartitionerConfig()
-
setPartitionerConfig
void setPartitionerConfig(PartitionerConfig partitionerConfig)
-
isVersionSwapDeferred
boolean isVersionSwapDeferred()
-
setVersionSwapDeferred
void setVersionSwapDeferred(boolean versionSwapDeferred)
-
getReplicationFactor
int getReplicationFactor()
-
setReplicationFactor
void setReplicationFactor(int replicationFactor)
-
getMinActiveReplicas
int getMinActiveReplicas()
-
getNativeReplicationSourceFabric
java.lang.String getNativeReplicationSourceFabric()
-
setNativeReplicationSourceFabric
void setNativeReplicationSourceFabric(java.lang.String nativeReplicationSourceFabric)
-
isIncrementalPushEnabled
boolean isIncrementalPushEnabled()
-
setIncrementalPushEnabled
void setIncrementalPushEnabled(boolean incrementalPushEnabled)
-
isSeparateRealTimeTopicEnabled
boolean isSeparateRealTimeTopicEnabled()
-
setSeparateRealTimeTopicEnabled
void setSeparateRealTimeTopicEnabled(boolean separateRealTimeTopicEnabled)
-
isBlobTransferEnabled
boolean isBlobTransferEnabled()
-
setBlobTransferEnabled
void setBlobTransferEnabled(boolean blobTransferEnabled)
-
isUseVersionLevelIncrementalPushEnabled
boolean isUseVersionLevelIncrementalPushEnabled()
-
setUseVersionLevelIncrementalPushEnabled
void setUseVersionLevelIncrementalPushEnabled(boolean versionLevelIncrementalPushEnabled)
-
getHybridStoreConfig
HybridStoreConfig getHybridStoreConfig()
-
setHybridStoreConfig
void setHybridStoreConfig(HybridStoreConfig hybridConfig)
-
getViewConfigs
java.util.Map<java.lang.String,ViewConfig> getViewConfigs()
-
setViewConfigs
void setViewConfigs(java.util.Map<java.lang.String,ViewConfig> viewConfigMap)
-
isUseVersionLevelHybridConfig
boolean isUseVersionLevelHybridConfig()
-
setUseVersionLevelHybridConfig
void setUseVersionLevelHybridConfig(boolean versionLevelHybridConfig)
-
isActiveActiveReplicationEnabled
boolean isActiveActiveReplicationEnabled()
-
setActiveActiveReplicationEnabled
void setActiveActiveReplicationEnabled(boolean activeActiveReplicationEnabled)
-
getDataRecoveryVersionConfig
DataRecoveryVersionConfig getDataRecoveryVersionConfig()
-
setDataRecoveryVersionConfig
void setDataRecoveryVersionConfig(DataRecoveryVersionConfig dataRecoveryVersionConfig)
-
getTimestampMetadataVersionId
@Deprecated default int getTimestampMetadataVersionId()
Deprecated.UsegetRmdVersionId()
insteadGet the replication metadata version id.- Returns:
- the replication metadata version id
-
setTimestampMetadataVersionId
@Deprecated default void setTimestampMetadataVersionId(int replicationMetadataVersionId)
Deprecated.UsesetRmdVersionId(int)
insteadSet the replication metadata version id.
-
cloneVersion
Version cloneVersion()
-
setRepushSourceVersion
void setRepushSourceVersion(int version)
-
getRepushSourceVersion
int getRepushSourceVersion()
-
getRmdVersionId
int getRmdVersionId()
-
setRmdVersionId
void setRmdVersionId(int replicationMetadataVersionId)
-
kafkaTopicName
java.lang.String kafkaTopicName()
Kafka topic name is composed by store name and version.The Json deserializer will think it should be a field called kafkaTopicName if we use "getKafkaTopicName" here. So use "kafkaTopicName" directly here to avoid error when deserialize.
- Returns:
- kafka topic name.
-
parseStoreFromVersionTopic
static java.lang.String parseStoreFromVersionTopic(java.lang.String kafkaTopic)
-
parseVersionFromKafkaTopicName
static int parseVersionFromKafkaTopicName(java.lang.String kafkaTopic)
This API works for both version topic and stream-reprocessing topics; other topic names will fail with IllegalArgumentException.
-
parseVersionFromVersionTopicName
static int parseVersionFromVersionTopicName(java.lang.String kafkaTopic)
This API only works for version topic; other topic names will fail with IllegalArgumentException.
-
getLastIndexOfVersionSeparator
static int getLastIndexOfVersionSeparator(java.lang.String kafkaTopic)
-
composeKafkaTopic
static java.lang.String composeKafkaTopic(java.lang.String storeName, int versionNumber)
-
composeRealTimeTopic
static java.lang.String composeRealTimeTopic(java.lang.String storeName)
-
composeSeparateRealTimeTopic
static java.lang.String composeSeparateRealTimeTopic(java.lang.String storeName)
-
composeStreamReprocessingTopic
static java.lang.String composeStreamReprocessingTopic(java.lang.String storeName, int versionNumber)
-
composeStreamReprocessingTopicFromVersionTopic
static java.lang.String composeStreamReprocessingTopicFromVersionTopic(java.lang.String versionTopic)
-
composeVersionTopicFromStreamReprocessingTopic
static java.lang.String composeVersionTopicFromStreamReprocessingTopic(java.lang.String kafkaTopic)
-
parseStoreFromRealTimeTopic
static java.lang.String parseStoreFromRealTimeTopic(java.lang.String kafkaTopic)
-
parseStoreFromStreamReprocessingTopic
static java.lang.String parseStoreFromStreamReprocessingTopic(java.lang.String kafkaTopic)
-
parseStoreFromKafkaTopicName
static java.lang.String parseStoreFromKafkaTopicName(java.lang.String kafkaTopic)
Parse the store name of the given topic accordingly depending on the type of the kafka topic.- Parameters:
kafkaTopic
- to parse.- Returns:
- the store name or an empty string if the topic format doesn't match any of the known Venice topic formats.
-
isRealTimeTopic
static boolean isRealTimeTopic(java.lang.String kafkaTopic)
-
isStreamReprocessingTopic
static boolean isStreamReprocessingTopic(java.lang.String kafkaTopic)
-
isVersionTopicOrStreamReprocessingTopic
static boolean isVersionTopicOrStreamReprocessingTopic(java.lang.String kafkaTopic)
Return true if the input topic name is a version topic or stream-reprocessing topic.
-
isATopicThatIsVersioned
static boolean isATopicThatIsVersioned(java.lang.String kafkaTopic)
Determines if the the inputted topic is a topic which is versioned. Today that includes reprocessing topics, version topics, and view topics. This method is named this way in order to avoid confusion with the isVersionTopic (where the alternative would be isVersionedTopic).- Parameters:
kafkaTopic
-- Returns:
-
checkVersionSRTopic
static boolean checkVersionSRTopic(java.lang.String kafkaTopic, boolean checkSR)
-
isVersionTopic
static boolean isVersionTopic(java.lang.String kafkaTopic)
Only return true if the input topic name is a version topic.
-
guidBasedDummyPushId
static java.lang.String guidBasedDummyPushId()
-
numberBasedDummyPushId
static java.lang.String numberBasedDummyPushId(int number)
-
generateRePushId
static java.lang.String generateRePushId(java.lang.String pushId)
-
isPushIdRePush
static boolean isPushIdRePush(java.lang.String pushId)
-
containsHybridVersion
static boolean containsHybridVersion(java.util.List<Version> versions)
-
-