Package com.linkedin.venice.meta
Interface Version
- All Superinterfaces:
Comparable<Version>
,DataModelBackedStructure<StoreVersion>
- All Known Implementing Classes:
ReadOnlyStore.ReadOnlyVersion
,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
Modifier and TypeInterfaceDescriptionstatic enum
Producer type for writing data to Venice -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final int
Special number indicating no replication metadata version is set.static final String
static final String
static final String
Prefix used in push id to indicate the version's data source is coming from an existing version topic.static final String
static final String
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
checkVersionSRTopic
(String kafkaTopic, boolean checkSR) static String
composeKafkaTopic
(String storeName, int versionNumber) static String
composeRealTimeTopic
(String storeName) static String
composeSeparateRealTimeTopic
(String storeName) static String
composeStreamReprocessingTopic
(String storeName, int versionNumber) static String
composeStreamReprocessingTopicFromVersionTopic
(String versionTopic) static String
composeVersionTopicFromStreamReprocessingTopic
(String kafkaTopic) static boolean
containsHybridVersion
(List<Version> versions) static String
generateRePushId
(String pushId) static String
generateTTLRePushId
(String pushId) getAge()
long
boolean
static int
getLastIndexOfVersionSeparator
(String kafkaTopic) int
int
int
int
int
int
int
default int
Deprecated.static String
boolean
static boolean
isATopicThatIsVersioned
(String kafkaTopic) Determines if the the inputted topic is a topic which is versioned.boolean
boolean
boolean
isHybrid()
boolean
default boolean
boolean
static boolean
isPushIdRePush
(String pushId) static boolean
isPushIdTTLRePush
(String pushId) static boolean
isRealTimeTopic
(String kafkaTopic) boolean
boolean
static boolean
isStreamReprocessingTopic
(String kafkaTopic) boolean
boolean
boolean
static boolean
isVersionTopic
(String kafkaTopic) Only return true if the input topic name is a version topic.static boolean
isVersionTopicOrStreamReprocessingTopic
(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 String
numberBasedDummyPushId
(int number) static String
parseStoreFromKafkaTopicName
(String kafkaTopic) Parse the store name of the given topic accordingly depending on the type of the kafka topic.static String
parseStoreFromRealTimeTopic
(String kafkaTopic) static String
parseStoreFromStreamReprocessingTopic
(String kafkaTopic) static String
parseStoreFromVersionTopic
(String kafkaTopic) static int
parseVersionFromKafkaTopicName
(String kafkaTopic) This API works for both version topic and stream-reprocessing topics; other topic names will fail with IllegalArgumentException.static int
parseVersionFromVersionTopicName
(String kafkaTopic) This API only works for version topic; other topic names will fail with IllegalArgumentException.void
setActiveActiveReplicationEnabled
(boolean activeActiveReplicationEnabled) void
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) void
setIsDavinciHeartbeatReported
(boolean isReported) default void
setLeaderFollowerModelEnabled
(boolean leaderFollowerModelEnabled) Deprecated.void
setNativeReplicationEnabled
(boolean nativeReplicationEnabled) void
setNativeReplicationSourceFabric
(String nativeReplicationSourceFabric) void
setNumber
(int number) void
setPartitionCount
(int partitionCount) void
setPartitionerConfig
(PartitionerConfig partitionerConfig) void
setPushJobId
(String pushJobId) void
setPushStreamSourceAddress
(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) void
setTargetSwapRegion
(String targetRegion) void
setTargetSwapRegionWaitTime
(int waitTime) default void
setTimestampMetadataVersionId
(int replicationMetadataVersionId) Deprecated.UsesetRmdVersionId(int)
insteadvoid
setUseVersionLevelHybridConfig
(boolean versionLevelHybridConfig) void
setUseVersionLevelIncrementalPushEnabled
(boolean versionLevelIncrementalPushEnabled) void
setVersionSwapDeferred
(boolean versionSwapDeferred) void
setViewConfigs
(Map<String, ViewConfig> viewConfigMap) Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.linkedin.venice.meta.DataModelBackedStructure
dataModel
-
Field Details
-
VERSION_SEPARATOR
- See Also:
-
REAL_TIME_TOPIC_SUFFIX
- See Also:
-
STREAM_REPROCESSING_TOPIC_SUFFIX
- See Also:
-
SEPARATE_REAL_TIME_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:
-
-
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) -
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) -
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
-
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. -
getLastIndexOfVersionSeparator
-
composeKafkaTopic
-
composeRealTimeTopic
-
composeSeparateRealTimeTopic
-
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
-
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
-
isPushIdTTLRePush
-
isPushIdRePush
-
containsHybridVersion
-
getRmdVersionId()
instead