Package com.linkedin.venice.meta
Enum Class VersionStatus
- All Implemented Interfaces:
VeniceEnumValue
,Serializable
,Comparable<VersionStatus>
,Constable
Enums of status of version.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionVersion is created and persisted inside ZK.Version is not serving read requests, and it's relevant push job has failedVersion is killed.This version hasn't been created yet.Version is serving read requestsVersion has been pushed to Venice and is serving read traffic in some regions, but failed in other regions.Version has been pushed to venice and is ready to serve read request.Version has been created and started to ingest new data, but has not completed ingestion and is not ready to serve read traffic -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
canDelete
(VersionStatus status) check if a status can be deleted immediately.int
getValue()
static VersionStatus
getVersionStatusFromInt
(int v) static boolean
isBootstrapCompleted
(VersionStatus status) Check if the Version has completed the bootstrap.static boolean
isVersionErrored
(VersionStatus status) static boolean
isVersionKilled
(VersionStatus status) static boolean
preserveLastFew
(VersionStatus status) For all the status which returns true, last few versions (few count, controlled by config) will be preserved.static VersionStatus
Returns the enum constant of this class with the specified name.static VersionStatus[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NOT_CREATED
This version hasn't been created yet. It is not persisted in ZK -
STARTED
Version has been created and started to ingest new data, but has not completed ingestion and is not ready to serve read traffic -
PUSHED
Version has been pushed to venice and is ready to serve read request. Intermediate status after a push job succeeds in all child regions before DeferredVersionSwapService flips the status to ONLINE. This status only exists in the parent -
ONLINE
Version is serving read requests -
ERROR
Version is not serving read requests, and it's relevant push job has failed -
CREATED
Version is created and persisted inside ZK. Currently not used -
PARTIALLY_ONLINE
Version has been pushed to Venice and is serving read traffic in some regions, but failed in other regions. This status only exists in the parent -
KILLED
Version is killed. Intermediate status after a push job is killed or fails before DeferredVersionSwapService flips the status to either ERROR or PARTIALLY_ONLINE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getVersionStatusFromInt
-
canDelete
check if a status can be deleted immediately.- Parameters:
status
-- Returns:
- true if it can be deleted immediately, false otherwise
-
preserveLastFew
For all the status which returns true, last few versions (few count, controlled by config) will be preserved. For a store typically last few online versions should be preserved.- Parameters:
status
-- Returns:
- true if it should be considered, false otherwise
-
isBootstrapCompleted
Check if the Version has completed the bootstrap. We need to make sure that Kafka topic for uncompleted offline job should NOT be deleted. Otherwise Kafka MM would crash. Attention: For streaming case, even version is ONLINE or PUSHED, it might be not safe to delete kafka topic. -
isVersionKilled
-
isVersionErrored
-
getValue
public int getValue()- Specified by:
getValue
in interfaceVeniceEnumValue
-