Enum ChunkStatus
- java.lang.Object
-
- java.lang.Enum<ChunkStatus>
-
- com.databricks.jdbc.api.impl.arrow.ChunkStatus
-
- All Implemented Interfaces:
Serializable,Comparable<ChunkStatus>
public enum ChunkStatus extends Enum<ChunkStatus>
Represents the lifecycle states of a data chunk during the download and processing pipeline. A chunk transitions through these states as it moves from initial request to final consumption.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CANCELLEDThe download operation was explicitly cancelled.CHUNK_RELEASEDThe chunk's data has been fully consumed and its memory resources have been released back to the system.DOWNLOAD_FAILEDThe download operation encountered an error.DOWNLOAD_IN_PROGRESSThe chunk download operation has been initiated and is currently executing.DOWNLOAD_RETRYIndicates that a failed download is being retried.DOWNLOAD_SUCCEEDEDThe chunk data has been successfully downloaded and is available locally.PENDINGInitial state where the chunk is awaiting URL assignment.PROCESSING_FAILEDThe conversion of Arrow data into record batch lists failed.PROCESSING_SUCCEEDEDArrow data has been successfully processed: Decompression completed (if compression was enabled) Data converted into record batch lists Ready for consumption by the application.URL_FETCHEDThe download URL has been successfully retrieved.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanTransitionTo(ChunkStatus targetStatus)Checks if a transition to the target state is valid from this state.Set<ChunkStatus>getValidTransitions()Returns the set of valid target states from this state.static ChunkStatusvalueOf(String name)Returns the enum constant of this type with the specified name.static ChunkStatus[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PENDING
public static final ChunkStatus PENDING
Initial state where the chunk is awaiting URL assignment. No download URL has been fetched or assigned yet.
-
URL_FETCHED
public static final ChunkStatus URL_FETCHED
The download URL has been successfully retrieved. Chunk is ready to begin the download process.
-
DOWNLOAD_IN_PROGRESS
public static final ChunkStatus DOWNLOAD_IN_PROGRESS
The chunk download operation has been initiated and is currently executing. Data transfer is in progress.
-
DOWNLOAD_SUCCEEDED
public static final ChunkStatus DOWNLOAD_SUCCEEDED
The chunk data has been successfully downloaded and is available locally. Ready for extraction and processing.
-
PROCESSING_SUCCEEDED
public static final ChunkStatus PROCESSING_SUCCEEDED
Arrow data has been successfully processed:- Decompression completed (if compression was enabled)
- Data converted into record batch lists
-
DOWNLOAD_FAILED
public static final ChunkStatus DOWNLOAD_FAILED
The download operation encountered an error. System will attempt to retry the download.
-
PROCESSING_FAILED
public static final ChunkStatus PROCESSING_FAILED
The conversion of Arrow data into record batch lists failed. Indicates a processing error after successful download.
-
CANCELLED
public static final ChunkStatus CANCELLED
The download operation was explicitly cancelled. No further processing will occur for this chunk.
-
CHUNK_RELEASED
public static final ChunkStatus CHUNK_RELEASED
The chunk's data has been fully consumed and its memory resources have been released back to the system.
-
DOWNLOAD_RETRY
public static final ChunkStatus DOWNLOAD_RETRY
Indicates that a failed download is being retried. Transitional state between DOWNLOAD_FAILED and DOWNLOAD_IN_PROGRESS.
-
-
Method Detail
-
values
public static ChunkStatus[] 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 (ChunkStatus c : ChunkStatus.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ChunkStatus valueOf(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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getValidTransitions
public Set<ChunkStatus> getValidTransitions()
Returns the set of valid target states from this state.- Returns:
- Set of valid target states
-
canTransitionTo
public boolean canTransitionTo(ChunkStatus targetStatus)
Checks if a transition to the target state is valid from this state.- Parameters:
targetStatus- The target state to check- Returns:
- true if the transition is valid, false otherwise
-
-