Class HadoopWritable

java.lang.Object
dev.vortex.spark.io.HadoopWritable
All Implemented Interfaces:
dev.vortex.io.NativeWritable, Closeable, AutoCloseable

public final class HadoopWritable extends Object implements dev.vortex.io.NativeWritable
A NativeWritable that streams a Vortex file into a Hadoop FileSystem.

Vortex writes and flushes but never closes; the file is finalized when the owner closes this.

  • Method Details

    • create

      public static HadoopWritable create(org.apache.hadoop.conf.Configuration conf, String path)
      Creates (or overwrites) the file at path, along with any missing parent directories.
    • write

      public void write(byte[] buffer, int offset, int length) throws IOException
      Specified by:
      write in interface dev.vortex.io.NativeWritable
      Throws:
      IOException
    • flush

      public void flush() throws IOException
      Specified by:
      flush in interface dev.vortex.io.NativeWritable
      Throws:
      IOException
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException