Class NativeWriterMethods

java.lang.Object
dev.vortex.jni.NativeWriterMethods

public final class NativeWriterMethods extends Object
Native JNI methods for writing Vortex files.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    close(long writerPtr)
    Close and flush the writer, finalizing it to the storage system.
    static long
    create(String uri, long dtype, Map<String,String> options)
    Creates a new native Vortex writer.
    static boolean
    writeBatch(long writerPtr, byte[] arrowData)
    Writes a batch of Arrow data to the Vortex file.
    static boolean
    writeBatchFfi(long writerPtr, long arrowArrayAddr, long arrowSchemaAddr)
    Writes a batch of Arrow data to the Vortex file directly from Arrow C Data Interface pointers.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • create

      public static long create(String uri, long dtype, Map<String,String> options)
      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 pointer
      arrowData - the Arrow IPC format data
      Returns:
      true if successful, false otherwise
    • writeBatchFfi

      public static boolean writeBatchFfi(long writerPtr, long arrowArrayAddr, long arrowSchemaAddr)
      Writes a batch of Arrow data to the Vortex file directly from Arrow C Data Interface pointers.
      Parameters:
      writerPtr - the native writer pointer
      arrowArrayAddr - memory address of the ArrowArray struct
      arrowSchemaAddr - memory address of the ArrowSchema struct
      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