Class FileSystemOutputFile

java.lang.Object
com.jerolba.carpet.io.FileSystemOutputFile
All Implemented Interfaces:
org.apache.parquet.io.OutputFile

public class FileSystemOutputFile extends Object implements org.apache.parquet.io.OutputFile
Class for writing to a file on the file system using the Parquet output file interface.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a FileSystemOutputFile with the specified file.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.parquet.io.PositionOutputStream
    create(long blockSizeHint)
    Creates an output stream for writing to the file.
    org.apache.parquet.io.PositionOutputStream
    createOrOverwrite(long blockSizeHint)
    Creates or overwrites an output stream for writing to the file.
    long
    Returns 0 to indicate that this implementation does not support block sizes.
    boolean
    Returns false to indicate that this implementation does not support block sizes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.parquet.io.OutputFile

    getPath
  • Constructor Details

    • FileSystemOutputFile

      public FileSystemOutputFile(File file)
      Constructs a FileSystemOutputFile with the specified file.
      Parameters:
      file - the file to write to
  • Method Details

    • create

      public org.apache.parquet.io.PositionOutputStream create(long blockSizeHint) throws IOException
      Creates an output stream for writing to the file.
      Specified by:
      create in interface org.apache.parquet.io.OutputFile
      Parameters:
      blockSizeHint - the block size hint, ignored by this implementation
      Returns:
      a new PositionOutputStream for writing to the file
      Throws:
      IOException - if the file already exists or an error occurs while creating the output stream
    • createOrOverwrite

      public org.apache.parquet.io.PositionOutputStream createOrOverwrite(long blockSizeHint) throws IOException
      Creates or overwrites an output stream for writing to the file.
      Specified by:
      createOrOverwrite in interface org.apache.parquet.io.OutputFile
      Parameters:
      blockSizeHint - the block size hint, ignored by this implementation
      Returns:
      a new PositionOutputStream for writing to the file
      Throws:
      IOException - if an error occurs while creating the output stream
    • supportsBlockSize

      public boolean supportsBlockSize()
      Returns false to indicate that this implementation does not support block sizes.
      Specified by:
      supportsBlockSize in interface org.apache.parquet.io.OutputFile
      Returns:
      false
    • defaultBlockSize

      public long defaultBlockSize()
      Returns 0 to indicate that this implementation does not support block sizes.
      Specified by:
      defaultBlockSize in interface org.apache.parquet.io.OutputFile
      Returns:
      0