Class ArrowResultChunk
- java.lang.Object
-
- com.databricks.jdbc.api.impl.arrow.AbstractArrowResultChunk
-
- com.databricks.jdbc.api.impl.arrow.ArrowResultChunk
-
public class ArrowResultChunk extends AbstractArrowResultChunk
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classArrowResultChunk.Builder
-
Field Summary
-
Fields inherited from class com.databricks.jdbc.api.impl.arrow.AbstractArrowResultChunk
arrowMetadata, chunkIndex, chunkLink, chunkReadyFuture, chunkReadyTimeoutSeconds, errorMessage, expiryTime, numRows, recordBatchList, rootAllocator, rowOffset, SECONDS_BUFFER_FOR_EXPIRY, stateMachine, statementId
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ArrowResultChunk.Builderbuilder()protected voiddownloadData(IDatabricksHttpClient httpClient, CompressionCodec compressionCodec, double speedThreshold)Downloads and initializes data for this chunk using the provided HTTP client and compression codec.protected voidhandleFailure(Exception exception, ChunkStatus failedStatus)Handles a failure during the download or processing of this chunk.-
Methods inherited from class com.databricks.jdbc.api.impl.arrow.AbstractArrowResultChunk
getArrowMetadata, getChunkIndex, getChunkIterator, getChunkReadyFuture, getColumnVector, getNumRows, getRecordBatchCountInChunk, getRecordBatchList, getStatus, initializeData, isChunkLinkInvalid, releaseChunk, setChunkLink, setStatus, waitForChunkReady
-
-
-
-
Method Detail
-
builder
public static ArrowResultChunk.Builder builder()
-
downloadData
protected void downloadData(IDatabricksHttpClient httpClient, CompressionCodec compressionCodec, double speedThreshold) throws DatabricksParsingException, IOException
Downloads and initializes data for this chunk using the provided HTTP client and compression codec.Downloads and processes the Arrow data chunk using the provided HTTP client and compression codec. Makes a synchronous HTTP GET request to fetch the data, decompresses it, and initializes the chunk's data structures.
- Specified by:
downloadDatain classAbstractArrowResultChunk- Parameters:
httpClient- the HTTP client used to download the chunk datacompressionCodec- the codec used to decompress the downloaded dataspeedThreshold- the minimum expected download speed in MB/s for logging warnings- Throws:
DatabricksParsingException- if there is an error parsing or processing the dataIOException- if there is an error during download or data reading
-
handleFailure
protected void handleFailure(Exception exception, ChunkStatus failedStatus) throws DatabricksParsingException
Handles a failure during the download or processing of this chunk.Handles failures that occur during chunk download or processing. Sets the error message, logs the error, updates the chunk status, and throws a DatabricksParsingException.
- Specified by:
handleFailurein classAbstractArrowResultChunk- Parameters:
exception- the exception that caused the failurefailedStatus- the status to set for the chunk after failure (e.g.ChunkStatus.DOWNLOAD_FAILEDorChunkStatus.PROCESSING_FAILED)- Throws:
DatabricksParsingException- always thrown with the error message and original exception
-
-