Package dev.vortex.api
Interface VortexWriter
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
JNIWriter
Writer for creating Vortex files from Arrow data.
This class provides methods to write Arrow VectorSchemaRoot batches to Vortex format files.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the writer and finalizes the Vortex file.static VortexWriterCreates a new VortexWriter for writing to the specified file path.voidwriteBatch(byte[] arrowData) Writes a batch of Arrow data to the Vortex file.
-
Method Details
-
create
Creates a new VortexWriter for writing to the specified file path.- Parameters:
uri- The URI for where the file is openeddtype- The Vortex DType for data that gets writtenoptions- additional writer options- Returns:
- a new VortexWriter instance
- Throws:
IOException- if the writer cannot be created
-
writeBatch
Writes a batch of Arrow data to the Vortex file.- Parameters:
arrowData- the Arrow data in IPC format as byte array- Throws:
IOException- if writing fails
-
close
Closes the writer and finalizes the Vortex file.This method must be called to ensure the file is properly written with all necessary metadata and footers.
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException- if closing fails
-