Package com.linkedin.venice.meta
Class VersionImpl
- java.lang.Object
-
- com.linkedin.venice.meta.VersionImpl
-
- All Implemented Interfaces:
DataModelBackedStructure<StoreVersion>
,Version
,java.lang.Comparable<Version>
public class VersionImpl extends java.lang.Object implements Version
Class defines the version of Venice store.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.linkedin.venice.meta.Version
Version.PushType
-
-
Field Summary
-
Fields inherited from interface com.linkedin.venice.meta.Version
REAL_TIME_TOPIC_SUFFIX, REPLICATION_METADATA_VERSION_ID_UNSET, SEPARATE_REAL_TIME_TOPIC_SUFFIX, STREAM_REPROCESSING_TOPIC_SUFFIX, VENICE_RE_PUSH_PUSH_ID_PREFIX, VENICE_TTL_RE_PUSH_PUSH_ID_PREFIX, VERSION_SEPARATOR
-
-
Constructor Summary
Constructors Constructor Description VersionImpl(java.lang.String storeName, int number)
Deprecated.VersionImpl(java.lang.String storeName, int number, long createdTime, java.lang.String pushJobId, int partitionCount, PartitionerConfig partitionerConfig, DataRecoveryVersionConfig dataRecoveryVersionConfig)
VersionImpl(java.lang.String storeName, int number, java.lang.String pushJobId)
VersionImpl(java.lang.String storeName, int number, java.lang.String pushJobId, int partitionCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Version
cloneVersion()
Clone a new version based on current data in this version.int
compareTo(Version o)
StoreVersion
dataModel()
Return the backed data model.boolean
equals(java.lang.Object o)
java.time.Duration
getAge()
CompressionStrategy
getCompressionStrategy()
long
getCreatedTime()
DataRecoveryVersionConfig
getDataRecoveryVersionConfig()
HybridStoreConfig
getHybridStoreConfig()
boolean
getIsDavinciHeartbeatReported()
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()
java.lang.String
getTargetSwapRegion()
int
getTargetSwapRegionWaitTime()
java.util.Map<java.lang.String,ViewConfig>
getViewConfigs()
int
hashCode()
boolean
isActiveActiveReplicationEnabled()
boolean
isBlobTransferEnabled()
boolean
isChunkingEnabled()
boolean
isHybrid()
boolean
isIncrementalPushEnabled()
boolean
isNativeReplicationEnabled()
boolean
isRmdChunkingEnabled()
boolean
isSeparateRealTimeTopicEnabled()
boolean
isUseVersionLevelHybridConfig()
boolean
isUseVersionLevelIncrementalPushEnabled()
boolean
isVersionSwapDeferred()
java.lang.String
kafkaTopicName()
Kafka topic name is composed by store name and version.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)
void
setIsDavinciHeartbeatReported(boolean isReported)
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)
void
setTargetSwapRegion(java.lang.String targetRegion)
void
setTargetSwapRegionWaitTime(int waitTime)
void
setUseVersionLevelHybridConfig(boolean versionLevelHybridConfig)
void
setUseVersionLevelIncrementalPushEnabled(boolean versionLevelIncrementalPushEnabled)
void
setVersionSwapDeferred(boolean deferVersionSwap)
void
setViewConfigs(java.util.Map<java.lang.String,ViewConfig> viewConfigList)
java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.linkedin.venice.meta.Version
getTimestampMetadataVersionId, isLeaderFollowerModelEnabled, setLeaderFollowerModelEnabled, setTimestampMetadataVersionId
-
-
-
-
Constructor Detail
-
VersionImpl
@Deprecated public VersionImpl(java.lang.String storeName, int number)
Deprecated.Use the constructor that specifies a pushJobId instead Currently used in tests only.
-
VersionImpl
public VersionImpl(java.lang.String storeName, int number, java.lang.String pushJobId)
-
VersionImpl
public VersionImpl(java.lang.String storeName, int number, java.lang.String pushJobId, int partitionCount)
-
VersionImpl
public VersionImpl(java.lang.String storeName, int number, long createdTime, java.lang.String pushJobId, int partitionCount, PartitionerConfig partitionerConfig, DataRecoveryVersionConfig dataRecoveryVersionConfig)
-
-
Method Detail
-
getCreatedTime
public long getCreatedTime()
- Specified by:
getCreatedTime
in interfaceVersion
-
getStatus
public VersionStatus getStatus()
-
setStatus
public void setStatus(VersionStatus status)
-
getCompressionStrategy
public CompressionStrategy getCompressionStrategy()
- Specified by:
getCompressionStrategy
in interfaceVersion
-
setCompressionStrategy
public void setCompressionStrategy(CompressionStrategy compressionStrategy)
- Specified by:
setCompressionStrategy
in interfaceVersion
-
isNativeReplicationEnabled
public boolean isNativeReplicationEnabled()
- Specified by:
isNativeReplicationEnabled
in interfaceVersion
-
setNativeReplicationEnabled
public void setNativeReplicationEnabled(boolean nativeReplicationEnabled)
- Specified by:
setNativeReplicationEnabled
in interfaceVersion
-
getPushStreamSourceAddress
public java.lang.String getPushStreamSourceAddress()
- Specified by:
getPushStreamSourceAddress
in interfaceVersion
-
setPushStreamSourceAddress
public void setPushStreamSourceAddress(java.lang.String address)
- Specified by:
setPushStreamSourceAddress
in interfaceVersion
-
setBufferReplayEnabledForHybrid
public void setBufferReplayEnabledForHybrid(boolean bufferReplayEnabledForHybrid)
- Specified by:
setBufferReplayEnabledForHybrid
in interfaceVersion
-
isChunkingEnabled
public boolean isChunkingEnabled()
- Specified by:
isChunkingEnabled
in interfaceVersion
-
setChunkingEnabled
public void setChunkingEnabled(boolean chunkingEnabled)
- Specified by:
setChunkingEnabled
in interfaceVersion
-
isRmdChunkingEnabled
public boolean isRmdChunkingEnabled()
- Specified by:
isRmdChunkingEnabled
in interfaceVersion
-
setRmdChunkingEnabled
public void setRmdChunkingEnabled(boolean rmdChunkingEnabled)
- Specified by:
setRmdChunkingEnabled
in interfaceVersion
-
getStoreName
public final java.lang.String getStoreName()
- Specified by:
getStoreName
in interfaceVersion
-
getPushJobId
public java.lang.String getPushJobId()
- Specified by:
getPushJobId
in interfaceVersion
-
setPushJobId
public void setPushJobId(java.lang.String pushJobId)
- Specified by:
setPushJobId
in interfaceVersion
-
getPushType
public Version.PushType getPushType()
- Specified by:
getPushType
in interfaceVersion
-
setPushType
public void setPushType(Version.PushType pushType)
- Specified by:
setPushType
in interfaceVersion
-
setPartitionCount
public void setPartitionCount(int partitionCount)
- Specified by:
setPartitionCount
in interfaceVersion
-
getPartitionCount
public int getPartitionCount()
- Specified by:
getPartitionCount
in interfaceVersion
-
getPartitionerConfig
public PartitionerConfig getPartitionerConfig()
- Specified by:
getPartitionerConfig
in interfaceVersion
-
setPartitionerConfig
public void setPartitionerConfig(PartitionerConfig partitionerConfig)
- Specified by:
setPartitionerConfig
in interfaceVersion
-
isVersionSwapDeferred
public boolean isVersionSwapDeferred()
- Specified by:
isVersionSwapDeferred
in interfaceVersion
-
setVersionSwapDeferred
public void setVersionSwapDeferred(boolean deferVersionSwap)
- Specified by:
setVersionSwapDeferred
in interfaceVersion
-
getReplicationFactor
public int getReplicationFactor()
- Specified by:
getReplicationFactor
in interfaceVersion
-
setReplicationFactor
public void setReplicationFactor(int replicationFactor)
- Specified by:
setReplicationFactor
in interfaceVersion
-
getMinActiveReplicas
public int getMinActiveReplicas()
- Specified by:
getMinActiveReplicas
in interfaceVersion
-
getNativeReplicationSourceFabric
public java.lang.String getNativeReplicationSourceFabric()
- Specified by:
getNativeReplicationSourceFabric
in interfaceVersion
-
setNativeReplicationSourceFabric
public void setNativeReplicationSourceFabric(java.lang.String nativeReplicationSourceFabric)
- Specified by:
setNativeReplicationSourceFabric
in interfaceVersion
-
isIncrementalPushEnabled
public boolean isIncrementalPushEnabled()
- Specified by:
isIncrementalPushEnabled
in interfaceVersion
-
setIncrementalPushEnabled
public void setIncrementalPushEnabled(boolean incrementalPushEnabled)
- Specified by:
setIncrementalPushEnabled
in interfaceVersion
-
isSeparateRealTimeTopicEnabled
public boolean isSeparateRealTimeTopicEnabled()
- Specified by:
isSeparateRealTimeTopicEnabled
in interfaceVersion
-
setSeparateRealTimeTopicEnabled
public void setSeparateRealTimeTopicEnabled(boolean separateRealTimeTopicEnabled)
- Specified by:
setSeparateRealTimeTopicEnabled
in interfaceVersion
-
isBlobTransferEnabled
public boolean isBlobTransferEnabled()
- Specified by:
isBlobTransferEnabled
in interfaceVersion
-
setBlobTransferEnabled
public void setBlobTransferEnabled(boolean blobTransferEnabled)
- Specified by:
setBlobTransferEnabled
in interfaceVersion
-
isUseVersionLevelIncrementalPushEnabled
public boolean isUseVersionLevelIncrementalPushEnabled()
- Specified by:
isUseVersionLevelIncrementalPushEnabled
in interfaceVersion
-
setUseVersionLevelIncrementalPushEnabled
public void setUseVersionLevelIncrementalPushEnabled(boolean versionLevelIncrementalPushEnabled)
- Specified by:
setUseVersionLevelIncrementalPushEnabled
in interfaceVersion
-
getHybridStoreConfig
public HybridStoreConfig getHybridStoreConfig()
- Specified by:
getHybridStoreConfig
in interfaceVersion
-
setHybridStoreConfig
public void setHybridStoreConfig(HybridStoreConfig hybridConfig)
- Specified by:
setHybridStoreConfig
in interfaceVersion
-
getViewConfigs
public java.util.Map<java.lang.String,ViewConfig> getViewConfigs()
- Specified by:
getViewConfigs
in interfaceVersion
-
setViewConfigs
public void setViewConfigs(java.util.Map<java.lang.String,ViewConfig> viewConfigList)
- Specified by:
setViewConfigs
in interfaceVersion
-
isUseVersionLevelHybridConfig
public boolean isUseVersionLevelHybridConfig()
- Specified by:
isUseVersionLevelHybridConfig
in interfaceVersion
-
setUseVersionLevelHybridConfig
public void setUseVersionLevelHybridConfig(boolean versionLevelHybridConfig)
- Specified by:
setUseVersionLevelHybridConfig
in interfaceVersion
-
isActiveActiveReplicationEnabled
public boolean isActiveActiveReplicationEnabled()
- Specified by:
isActiveActiveReplicationEnabled
in interfaceVersion
-
setActiveActiveReplicationEnabled
public void setActiveActiveReplicationEnabled(boolean activeActiveReplicationEnabled)
- Specified by:
setActiveActiveReplicationEnabled
in interfaceVersion
-
getDataRecoveryVersionConfig
public DataRecoveryVersionConfig getDataRecoveryVersionConfig()
- Specified by:
getDataRecoveryVersionConfig
in interfaceVersion
-
setDataRecoveryVersionConfig
public void setDataRecoveryVersionConfig(DataRecoveryVersionConfig dataRecoveryVersionConfig)
- Specified by:
setDataRecoveryVersionConfig
in interfaceVersion
-
setRepushSourceVersion
public void setRepushSourceVersion(int version)
- Specified by:
setRepushSourceVersion
in interfaceVersion
-
getRepushSourceVersion
public int getRepushSourceVersion()
- Specified by:
getRepushSourceVersion
in interfaceVersion
-
getRmdVersionId
public int getRmdVersionId()
- Specified by:
getRmdVersionId
in interfaceVersion
-
setRmdVersionId
public void setRmdVersionId(int replicationMetadataVersionId)
- Specified by:
setRmdVersionId
in interfaceVersion
-
setTargetSwapRegion
public void setTargetSwapRegion(java.lang.String targetRegion)
- Specified by:
setTargetSwapRegion
in interfaceVersion
-
getTargetSwapRegion
public java.lang.String getTargetSwapRegion()
- Specified by:
getTargetSwapRegion
in interfaceVersion
-
setTargetSwapRegionWaitTime
public void setTargetSwapRegionWaitTime(int waitTime)
- Specified by:
setTargetSwapRegionWaitTime
in interfaceVersion
-
getTargetSwapRegionWaitTime
public int getTargetSwapRegionWaitTime()
- Specified by:
getTargetSwapRegionWaitTime
in interfaceVersion
-
setIsDavinciHeartbeatReported
public void setIsDavinciHeartbeatReported(boolean isReported)
- Specified by:
setIsDavinciHeartbeatReported
in interfaceVersion
-
getIsDavinciHeartbeatReported
public boolean getIsDavinciHeartbeatReported()
- Specified by:
getIsDavinciHeartbeatReported
in interfaceVersion
-
dataModel
public StoreVersion dataModel()
Description copied from interface:DataModelBackedStructure
Return the backed data model.- Specified by:
dataModel
in interfaceDataModelBackedStructure<StoreVersion>
- Returns:
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
compareTo
public int compareTo(Version o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<Version>
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
cloneVersion
public Version cloneVersion()
Clone a new version based on current data in this version.- Specified by:
cloneVersion
in interfaceVersion
- Returns:
- cloned version.
-
kafkaTopicName
public 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 deserializing.
- Specified by:
kafkaTopicName
in interfaceVersion
- Returns:
- kafka topic name.
-
-