Class NativeWriter

java.lang.Object
dev.vortex.jni.NativeWriter

public final class NativeWriter extends Object
JNI boundary for VortexWriter.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    close(long writerPointer)
    Flush and close the writer.
    static long
    create(long sessionPointer, String uri, long arrowSchemaAddress, Map<String,String> options)
    Open a writer at uri that accepts batches matching the Arrow schema at arrowSchemaAddress.
    static boolean
    writeBatch(long writerPointer, long arrowArrayAddress, long arrowSchemaAddress)
    Write a batch directly from Arrow C Data Interface addresses.

    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(long sessionPointer, String uri, long arrowSchemaAddress, Map<String,String> options)
      Open a writer at uri that accepts batches matching the Arrow schema at arrowSchemaAddress.
    • writeBatch

      public static boolean writeBatch(long writerPointer, long arrowArrayAddress, long arrowSchemaAddress)
      Write a batch directly from Arrow C Data Interface addresses.
      Parameters:
      writerPointer - pointer from create(long, java.lang.String, long, java.util.Map<java.lang.String, java.lang.String>)
      arrowArrayAddress - address of an ArrowArray struct
      arrowSchemaAddress - address of an ArrowSchema struct
      Returns:
      true on success
    • close

      public static void close(long writerPointer)
      Flush and close the writer. Must be called exactly once.