Class DevNullValuesWriter

java.lang.Object
org.apache.parquet.column.values.ValuesWriter
org.apache.parquet.column.values.bitpacking.DevNullValuesWriter
All Implemented Interfaces:
AutoCloseable

public class DevNullValuesWriter extends ValuesWriter
This is a special writer that doesn't write anything. The idea being that some columns will always be the same value, and this will capture that. An example is the set of repetition levels for a schema with no repeated fields.
  • Constructor Details

    • DevNullValuesWriter

      public DevNullValuesWriter()
  • Method Details

    • getBufferedSize

      public long getBufferedSize()
      Description copied from class: ValuesWriter
      used to decide if we want to work to the next page
      Specified by:
      getBufferedSize in class ValuesWriter
      Returns:
      the size of the currently buffered data (in bytes)
    • reset

      public void reset()
      Description copied from class: ValuesWriter
      called after getBytes() to reset the current buffer and start writing the next page
      Specified by:
      reset in class ValuesWriter
    • writeInteger

      public void writeInteger(int v)
      Overrides:
      writeInteger in class ValuesWriter
      Parameters:
      v - the value to encode
    • writeByte

      public void writeByte(int value)
      Overrides:
      writeByte in class ValuesWriter
      Parameters:
      value - the value to encode
    • writeBoolean

      public void writeBoolean(boolean v)
      Overrides:
      writeBoolean in class ValuesWriter
      Parameters:
      v - the value to encode
    • writeBytes

      public void writeBytes(Binary v)
      Overrides:
      writeBytes in class ValuesWriter
      Parameters:
      v - the value to encode
    • writeLong

      public void writeLong(long v)
      Overrides:
      writeLong in class ValuesWriter
      Parameters:
      v - the value to encode
    • writeDouble

      public void writeDouble(double v)
      Overrides:
      writeDouble in class ValuesWriter
      Parameters:
      v - the value to encode
    • writeFloat

      public void writeFloat(float v)
      Overrides:
      writeFloat in class ValuesWriter
      Parameters:
      v - the value to encode
    • getBytes

      public org.apache.parquet.bytes.BytesInput getBytes()
      Specified by:
      getBytes in class ValuesWriter
      Returns:
      the bytes buffered so far to write to the current page
    • getAllocatedSize

      public long getAllocatedSize()
      Description copied from class: ValuesWriter
      Specified by:
      getAllocatedSize in class ValuesWriter
      Returns:
      the allocated size of the buffer
    • getEncoding

      public Encoding getEncoding()
      Description copied from class: ValuesWriter
      called after getBytes() and before reset()
      Specified by:
      getEncoding in class ValuesWriter
      Returns:
      the encoding that was used to encode the bytes
    • memUsageString

      public String memUsageString(String prefix)
      Specified by:
      memUsageString in class ValuesWriter