Package dev.vortex.jni
Class NativeWriterMethods
java.lang.Object
dev.vortex.jni.NativeWriterMethods
Native JNI methods for writing Vortex files.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
close
(long writerPtr) Close and flush the writer, finalizing it to the storage system.static long
Creates a new native Vortex writer.static boolean
writeBatch
(long writerPtr, byte[] arrowData) Writes a batch of Arrow data to the Vortex file.
-
Method Details
-
create
Creates a new native Vortex writer.- Parameters:
uri
- the URI to the file, e.g. "file://path/to/file".dtype
- native pointer to a writer schema (Vortex DType)options
- additional writer options. For cloud storage this includes things like credentials.- Returns:
- a native pointer to the writer, or 0 on failure
-
writeBatch
public static boolean writeBatch(long writerPtr, byte[] arrowData) Writes a batch of Arrow data to the Vortex file.- Parameters:
writerPtr
- the native writer pointerarrowData
- the Arrow IPC format data- Returns:
- true if successful, false otherwise
-
close
public static void close(long writerPtr) Close and flush the writer, finalizing it to the storage system.- Parameters:
writerPtr
- the native writer pointer- Throws:
RuntimeException
- if the writer fails to close
-