Class NativeFileMethods

java.lang.Object
dev.vortex.jni.NativeFileMethods

public final class NativeFileMethods extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    close(long pointer)
    Close the file associated with the given pointer.
    static void
    delete(String[] uris, Map<String,String> options)
    Delete the files at the provided URIs.
    static long
    dtype(long pointer)
    Get the data type of the file associated with the given pointer.
    static List<String>
    List all Vortex files underneath the current file path.
    static long
    open(String uri, Map<String,String> options)
    Open a file using the native library with the provided URI and options.
    static long
    rowCount(long pointer)
    Get the total row count contained in the file associated with the given pointer.
    static long
    scan(long pointer, List<String> columns, byte[] predicateProto, long[] rowRange, long[] rowIndices)
    Build a new native scan operator that will materialize Arrays from the file, pushing down the optional predicate, row range or row indices to perform data skipping.

    Methods inherited from class java.lang.Object

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

    • listVortexFiles

      public static List<String> listVortexFiles(String uri, Map<String,String> options)
      List all Vortex files underneath the current file path.
      Parameters:
      uri - The URI describing both the object store and the path to the file
      options - Any options required to initialize the object store client
      Returns:
      A list of URIs for the Vortex files below the provided path
    • delete

      public static void delete(String[] uris, Map<String,String> options)
      Delete the files at the provided URIs. Use the options to configure an object store client.
    • open

      public static long open(String uri, Map<String,String> options)
      Open a file using the native library with the provided URI and options.
      Parameters:
      uri - The URI of the file to open. e.g. "file://path/to/file".
      options - A map of options to provide for opening the file.
      Returns:
      A native pointer to the opened file. This will be 0 if the open call failed.
    • rowCount

      public static long rowCount(long pointer)
      Get the total row count contained in the file associated with the given pointer.
      Parameters:
      pointer - The native pointer to a file. Must be a value returned by open(String, Map).
      Returns:
      The number of rows of data encoded in the file. This includes null values.
    • dtype

      public static long dtype(long pointer)
      Get the data type of the file associated with the given pointer.
      Parameters:
      pointer - The native pointer to a file. Must be a value returned by open(String, Map).
      Returns:
      Native pointer to the DType of the file. This pointer is owned by the file and should not be freed.
    • close

      public static void close(long pointer)
      Close the file associated with the given pointer.
      Parameters:
      pointer - The native pointer to a file. Must be a value returned by open(String, Map).
    • scan

      public static long scan(long pointer, List<String> columns, byte[] predicateProto, long[] rowRange, long[] rowIndices)
      Build a new native scan operator that will materialize Arrays from the file, pushing down the optional predicate, row range or row indices to perform data skipping.