Interface WriterContext


public interface WriterContext
  • Method Details

    • createStream

      OutStream createStream(StreamName name) throws IOException
      Create a stream to store part of a column.
      Parameters:
      name - the name of the stream
      Returns:
      The output outStream that the section needs to be written to.
      Throws:
      IOException
    • getRowIndexStride

      int getRowIndexStride()
      Get the stride rate of the row index.
    • buildIndex

      boolean buildIndex()
      Should be building the row index.
      Returns:
      true if we are building the index
    • isCompressed

      boolean isCompressed()
      Is the ORC file compressed?
      Returns:
      are the streams compressed
    • getEncodingStrategy

      OrcFile.EncodingStrategy getEncodingStrategy()
      Get the encoding strategy to use.
      Returns:
      encoding strategy
    • getBloomFilterColumns

      boolean[] getBloomFilterColumns()
      Get the bloom filter columns
      Returns:
      bloom filter columns
    • getBloomFilterFPP

      double getBloomFilterFPP()
      Get bloom filter false positive percentage.
      Returns:
      fpp
    • getConfiguration

      Configuration getConfiguration()
      Get the writer's configuration.
      Returns:
      configuration
    • getVersion

      OrcFile.Version getVersion()
      Get the version of the file to write.
    • getBloomFilterVersion

      @Deprecated OrcFile.BloomFilterVersion getBloomFilterVersion()
      Deprecated.
    • writeIndex

      void writeIndex(StreamName name, OrcProto.RowIndex.Builder index) throws IOException
      Throws:
      IOException
    • writeBloomFilter

      void writeBloomFilter(StreamName name, OrcProto.BloomFilterIndex.Builder bloom) throws IOException
      Throws:
      IOException
    • getUnencryptedMask

      DataMask getUnencryptedMask(int columnId)
      Get the mask for the unencrypted variant.
      Parameters:
      columnId - the column id
      Returns:
      the mask to apply to the unencrypted data or null if there is none
    • getEncryption

      WriterEncryptionVariant getEncryption(int columnId)
      Get the encryption for the given column.
      Parameters:
      columnId - the root column id
      Returns:
      the column encryption or null if it isn't encrypted
    • getPhysicalWriter

      PhysicalWriter getPhysicalWriter()
      Get the PhysicalWriter.
      Returns:
      the file's physical writer.
    • setEncoding

      void setEncoding(int column, WriterEncryptionVariant variant, OrcProto.ColumnEncoding encoding)
      Set the encoding for the current stripe.
      Parameters:
      column - the column identifier
      variant - the encryption variant
      encoding - the encoding for this stripe
    • writeStatistics

      void writeStatistics(StreamName name, OrcProto.ColumnStatistics.Builder stats) throws IOException
      Set the column statistics for the stripe or file.
      Parameters:
      name - the name of the statistics stream
      stats - the statistics for this column in this stripe
      Throws:
      IOException
    • getUseUTCTimestamp

      boolean getUseUTCTimestamp()
      Should the writer use UTC as the timezone?
    • getDictionaryKeySizeThreshold

      double getDictionaryKeySizeThreshold(int columnId)
      Get the dictionary key size threshold.
      Parameters:
      columnId - the column id
      Returns:
      the minimum ratio for using a dictionary
    • getProlepticGregorian

      boolean getProlepticGregorian()
      Should we write the data using the proleptic Gregorian calendar?
      Returns:
      true if we should use the proleptic Gregorian calendar