Package com.linkedin.venice.meta
Interface Version
- All Superinterfaces:
Comparable<Version>,DataModelBackedStructure<StoreVersion>
- All Known Implementing Classes:
ReadOnlyStore.ReadOnlyVersion,ReadOnlyViewStore.ReadOnlyMaterializedViewVersion,VersionImpl
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 ClassesModifier and TypeInterfaceDescriptionstatic enumProducer type for writing data to Venice -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final Stringstatic final Stringstatic final intSpecial number indicating no replication metadata version is set.static final Stringstatic final StringPrefix used in push id to indicate the version's data source is coming from an existing version topic.static final StringPrefix used in push id to indicate a regular batch push is made to a store with TTL re-push enabled.static final Stringstatic final String -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckVersionSRTopic(String kafkaTopic, boolean checkSR) static StringcomposeKafkaTopic(String storeName, int versionNumber) static StringcomposeStreamReprocessingTopic(String storeName, int versionNumber) static StringcomposeStreamReprocessingTopicFromVersionTopic(String versionTopic) static StringcomposeVersionTopicFromStreamReprocessingTopic(String kafkaTopic) static booleancontainsHybridVersion(List<Version> versions) static Stringstatic StringgenerateRePushId(String pushId) static StringgenerateTTLRePushId(String pushId) getAge()longbooleanstatic intgetLastIndexOfVersionSeparator(String kafkaTopic) intintintintintintintdefault intDeprecated.static Stringbooleanstatic booleanisATopicThatIsVersioned(String kafkaTopic) Determines if the the inputted topic is a topic which is versioned.booleanbooleanbooleanbooleanisHybrid()booleanstatic booleanisIncrementalPushTopic(String topicName) booleandefault booleanbooleanstatic booleanstatic booleanisPushIdRePush(String pushId) static booleanisPushIdTTLRePush(String pushId) static booleanisRealTimeTopic(String topicName) booleanbooleanstatic booleanisStreamReprocessingTopic(String kafkaTopic) booleanbooleanbooleanstatic booleanisVersionTopic(String kafkaTopic) Only return true if the input topic name is a version topic.static booleanisVersionTopicOrStreamReprocessingTopic(String kafkaTopic) Return true if the input topic name is a version topic or stream-reprocessing topic.Kafka topic name is composed by store name and version.static StringnumberBasedDummyPushId(int number) static StringparseStoreFromKafkaTopicName(String kafkaTopic) Parse the store name of the given topic accordingly depending on the type of the kafka topic.static StringparseStoreFromRealTimeTopic(String kafkaTopic) static StringparseStoreFromStreamReprocessingTopic(String kafkaTopic) static StringparseStoreFromVersionTopic(String kafkaTopic) static intparseVersionFromKafkaTopicName(String kafkaTopic) This API works for both version topic and stream-reprocessing topics; other topic names will fail with IllegalArgumentException.static intparseVersionFromVersionTopicName(String kafkaTopic) This API only works for version topic; other topic names will fail with IllegalArgumentException.static intparseVersionFromVersionTopicPartition(String kafkaTopic) static StringremoveRTVersionSuffix(String kafkaTopic) voidsetActiveActiveReplicationEnabled(boolean activeActiveReplicationEnabled) voidvoidsetBlobTransferEnabled(boolean blobTransferEnabled) voidsetBlobTransferInServerEnabled(String blobTransferInServerEnabled) voidsetBufferReplayEnabledForHybrid(boolean bufferReplayEnabledForHybrid) voidsetChunkingEnabled(boolean chunkingEnabled) voidsetCompressionStrategy(CompressionStrategy compressionStrategy) voidsetDataRecoveryVersionConfig(DataRecoveryVersionConfig dataRecoveryVersionConfig) voidsetGlobalRtDivEnabled(boolean globalRtDivEnabled) voidsetHybridStoreConfig(HybridStoreConfig hybridConfig) voidsetIncrementalPushEnabled(boolean incrementalPushEnabled) voidsetIsDavinciHeartbeatReported(boolean isReported) voidsetKeyUrnCompressionEnabled(boolean keyUrnCompressionEnabled) voidsetKeyUrnFields(List<String> keyUrnFields) default voidsetLeaderFollowerModelEnabled(boolean leaderFollowerModelEnabled) Deprecated.voidsetNativeReplicationEnabled(boolean nativeReplicationEnabled) voidsetNativeReplicationSourceFabric(String nativeReplicationSourceFabric) voidsetNumber(int number) voidsetPartitionCount(int partitionCount) voidsetPartitionerConfig(PartitionerConfig partitionerConfig) voidsetPushJobId(String pushJobId) voidsetPushStreamSourceAddress(String address) voidsetPushType(Version.PushType pushType) voidsetReplicationFactor(int replicationFactor) voidsetRepushSourceVersion(int version) voidsetRmdChunkingEnabled(boolean rmdChunkingEnabled) voidsetRmdVersionId(int replicationMetadataVersionId) voidsetSeparateRealTimeTopicEnabled(boolean separateRealTimeTopicEnabled) voidsetStatus(VersionStatus status) voidsetTargetSwapRegion(String targetRegion) voidsetTargetSwapRegionWaitTime(int waitTime) default voidsetTimestampMetadataVersionId(int replicationMetadataVersionId) Deprecated.UsesetRmdVersionId(int)insteadvoidsetUseVersionLevelHybridConfig(boolean versionLevelHybridConfig) voidsetUseVersionLevelIncrementalPushEnabled(boolean versionLevelIncrementalPushEnabled) voidsetVersionSwapDeferred(boolean versionSwapDeferred) voidsetViewConfigs(Map<String, ViewConfig> viewConfigMap) Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.linkedin.venice.meta.DataModelBackedStructure
dataModel
-
Field Details
-
VERSION_SEPARATOR
- See Also:
-
REAL_TIME_TOPIC_SUFFIX
- See Also:
-
REAL_TIME_TOPIC_TEMPLATE
- See Also:
-
STREAM_REPROCESSING_TOPIC_SUFFIX
- See Also:
-
REPLICATION_METADATA_VERSION_ID_UNSET
static final int REPLICATION_METADATA_VERSION_ID_UNSETSpecial number indicating no replication metadata version is set.- See Also:
-
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:
-
VENICE_TTL_RE_PUSH_PUSH_ID_PREFIX
- See Also:
-
VENICE_REGULAR_PUSH_WITH_TTL_RE_PUSH_PREFIX
Prefix used in push id to indicate a regular batch push is made to a store with TTL re-push enabled. This disables the TTL re-push enabled flag for the corresponding store.- See Also:
-
DEFAULT_RT_VERSION_NUMBER
static final int DEFAULT_RT_VERSION_NUMBER- See Also:
-
-
Method Details
-
getNumber
int getNumber() -
setNumber
void setNumber(int number) -
getCreatedTime
long getCreatedTime() -
getAge
Duration getAge() -
setAge
-
getStatus
VersionStatus getStatus() -
setStatus
-
getCompressionStrategy
CompressionStrategy getCompressionStrategy() -
setCompressionStrategy
-
isLeaderFollowerModelEnabled
default boolean isLeaderFollowerModelEnabled() -
isNativeReplicationEnabled
boolean isNativeReplicationEnabled() -
setLeaderFollowerModelEnabled
Deprecated. -
setNativeReplicationEnabled
void setNativeReplicationEnabled(boolean nativeReplicationEnabled) -
getPushStreamSourceAddress
String getPushStreamSourceAddress() -
setPushStreamSourceAddress
-
setBufferReplayEnabledForHybrid
void setBufferReplayEnabledForHybrid(boolean bufferReplayEnabledForHybrid) -
isChunkingEnabled
boolean isChunkingEnabled() -
setChunkingEnabled
void setChunkingEnabled(boolean chunkingEnabled) -
isRmdChunkingEnabled
boolean isRmdChunkingEnabled() -
setRmdChunkingEnabled
void setRmdChunkingEnabled(boolean rmdChunkingEnabled) -
getStoreName
String getStoreName() -
getPushJobId
String getPushJobId() -
setPushJobId
-
getPushType
Version.PushType getPushType() -
setPushType
-
setPartitionCount
void setPartitionCount(int partitionCount) -
getPartitionCount
int getPartitionCount() -
getPartitionerConfig
PartitionerConfig getPartitionerConfig() -
setPartitionerConfig
-
isVersionSwapDeferred
boolean isVersionSwapDeferred() -
setVersionSwapDeferred
void setVersionSwapDeferred(boolean versionSwapDeferred) -
getReplicationFactor
int getReplicationFactor() -
setReplicationFactor
void setReplicationFactor(int replicationFactor) -
getMinActiveReplicas
int getMinActiveReplicas() -
getNativeReplicationSourceFabric
String getNativeReplicationSourceFabric() -
setNativeReplicationSourceFabric
-
isIncrementalPushEnabled
boolean isIncrementalPushEnabled() -
setIncrementalPushEnabled
void setIncrementalPushEnabled(boolean incrementalPushEnabled) -
isSeparateRealTimeTopicEnabled
boolean isSeparateRealTimeTopicEnabled() -
setSeparateRealTimeTopicEnabled
void setSeparateRealTimeTopicEnabled(boolean separateRealTimeTopicEnabled) -
isBlobTransferEnabled
boolean isBlobTransferEnabled() -
setBlobTransferEnabled
void setBlobTransferEnabled(boolean blobTransferEnabled) -
getBlobTransferInServerEnabled
String getBlobTransferInServerEnabled() -
setBlobTransferInServerEnabled
-
isUseVersionLevelIncrementalPushEnabled
boolean isUseVersionLevelIncrementalPushEnabled() -
setUseVersionLevelIncrementalPushEnabled
void setUseVersionLevelIncrementalPushEnabled(boolean versionLevelIncrementalPushEnabled) -
isHybrid
boolean isHybrid() -
getHybridStoreConfig
HybridStoreConfig getHybridStoreConfig() -
setHybridStoreConfig
-
getViewConfigs
Map<String,ViewConfig> getViewConfigs() -
setViewConfigs
-
isUseVersionLevelHybridConfig
boolean isUseVersionLevelHybridConfig() -
setUseVersionLevelHybridConfig
void setUseVersionLevelHybridConfig(boolean versionLevelHybridConfig) -
isActiveActiveReplicationEnabled
boolean isActiveActiveReplicationEnabled() -
setActiveActiveReplicationEnabled
void setActiveActiveReplicationEnabled(boolean activeActiveReplicationEnabled) -
getDataRecoveryVersionConfig
DataRecoveryVersionConfig getDataRecoveryVersionConfig() -
setDataRecoveryVersionConfig
-
setTargetSwapRegion
-
getTargetSwapRegion
String getTargetSwapRegion() -
setTargetSwapRegionWaitTime
void setTargetSwapRegionWaitTime(int waitTime) -
getTargetSwapRegionWaitTime
int getTargetSwapRegionWaitTime() -
setIsDavinciHeartbeatReported
void setIsDavinciHeartbeatReported(boolean isReported) -
getIsDavinciHeartbeatReported
boolean getIsDavinciHeartbeatReported() -
getTimestampMetadataVersionId
Deprecated.UsegetRmdVersionId()insteadGet the replication metadata version id.- Returns:
- the replication metadata version id
-
setTimestampMetadataVersionId
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) -
isGlobalRtDivEnabled
boolean isGlobalRtDivEnabled() -
setGlobalRtDivEnabled
void setGlobalRtDivEnabled(boolean globalRtDivEnabled) -
setKeyUrnCompressionEnabled
void setKeyUrnCompressionEnabled(boolean keyUrnCompressionEnabled) -
isKeyUrnCompressionEnabled
boolean isKeyUrnCompressionEnabled() -
setKeyUrnFields
-
getKeyUrnFields
-
kafkaTopicName
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
-
removeRTVersionSuffix
-
parseVersionFromKafkaTopicName
This API works for both version topic and stream-reprocessing topics; other topic names will fail with IllegalArgumentException. -
parseVersionFromVersionTopicName
This API only works for version topic; other topic names will fail with IllegalArgumentException. -
parseVersionFromVersionTopicPartition
-
getLastIndexOfVersionSeparator
-
composeKafkaTopic
-
composeStreamReprocessingTopic
-
composeStreamReprocessingTopicFromVersionTopic
-
composeVersionTopicFromStreamReprocessingTopic
-
parseStoreFromRealTimeTopic
-
parseStoreFromStreamReprocessingTopic
-
parseStoreFromKafkaTopicName
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
-
isIncrementalPushTopic
-
isStreamReprocessingTopic
-
isVersionTopicOrStreamReprocessingTopic
Return true if the input topic name is a version topic or stream-reprocessing topic. -
isATopicThatIsVersioned
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
-
isVersionTopic
Only return true if the input topic name is a version topic. -
guidBasedDummyPushId
-
numberBasedDummyPushId
-
generateRePushId
-
generateTTLRePushId
-
generateRegularPushWithTTLRePushId
-
isPushIdTTLRePush
-
isPushIdRePush
-
isPushIdRegularPushWithTTLRePush
-
containsHybridVersion
-
getRmdVersionId()instead