Package com.linkedin.venice.meta
Enum VersionStatus
- java.lang.Object
-
- java.lang.Enum<VersionStatus>
-
- com.linkedin.venice.meta.VersionStatus
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<VersionStatus>
public enum VersionStatus extends java.lang.Enum<VersionStatus>
Enums of status of verion.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CREATED
ERROR
KILLED
NOT_CREATED
ONLINE
PARTIALLY_ONLINE
PUSHED
STARTED
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
canDelete(VersionStatus status)
check if a status can be deleted immediately.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
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static VersionStatus[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NOT_CREATED
public static final VersionStatus NOT_CREATED
-
STARTED
public static final VersionStatus STARTED
-
PUSHED
public static final VersionStatus PUSHED
-
ONLINE
public static final VersionStatus ONLINE
-
ERROR
public static final VersionStatus ERROR
-
CREATED
public static final VersionStatus CREATED
-
PARTIALLY_ONLINE
public static final VersionStatus PARTIALLY_ONLINE
-
KILLED
public static final VersionStatus KILLED
-
-
Method Detail
-
values
public static VersionStatus[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (VersionStatus c : VersionStatus.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static VersionStatus valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getVersionStatusFromInt
public static VersionStatus getVersionStatusFromInt(int v)
-
canDelete
public static boolean canDelete(VersionStatus status)
check if a status can be deleted immediately.- Parameters:
status
-- Returns:
- true if it can be deleted immediately, false otherwise
-
preserveLastFew
public static boolean preserveLastFew(VersionStatus status)
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
public static boolean isBootstrapCompleted(VersionStatus status)
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
public static boolean isVersionKilled(VersionStatus status)
-
isVersionErrored
public static boolean isVersionErrored(VersionStatus status)
-
-