Class WireTransferableContext

java.lang.Object
org.apache.druid.query.rowsandcols.serde.WireTransferableContext

public class WireTransferableContext extends Object
Object that holds the components and configuration needed for serde of RowsAndColumns via WireTransferable.
  • Field Details

    • DEFAULT_LEGACY_FRAME_SERIALIZATION

      public static final boolean DEFAULT_LEGACY_FRAME_SERIALIZATION
      See Also:
  • Constructor Details

    • WireTransferableContext

      public WireTransferableContext(com.fasterxml.jackson.databind.ObjectMapper smileMapper, WireTransferable.ConcreteDeserializer concreteDeserializer, boolean useLegacyFrameSerialization)
  • Method Details

    • serializedBytes

      public WireTransferable.ByteArrayOffsetAndLen serializedBytes(WireTransferable wireTransferable) throws IOException
      Serializes an object into bytes.
      Returns:
      bytes that represent the wire-format of this object
      Throws:
      IOException - a problem with IO
    • deserialize

      public RowsAndColumns deserialize(ByteBuffer theBytes)
      Deserializes a ByteBuffer into a RowsAndColumns. The deserialized object owns the passed-in buffer as well as the data it points to. It is safe for the deserializer to mutate the buffer, retain a reference to it, etc.
      Parameters:
      theBytes - ByteBuffer to be deserialized, in little-endian order
      Returns:
      RowsAndColumns object deserialized from the ByteBuffer
    • smileMapper

      public com.fasterxml.jackson.databind.ObjectMapper smileMapper()
      Returns the Smile ObjectMapper for serialization, or null if not available.
    • concreteDeserializer

      public WireTransferable.ConcreteDeserializer concreteDeserializer()
      Returns the deserializer for RowsAndColumns wire format, or null if not available.
    • useLegacyFrameSerialization

      public boolean useLegacyFrameSerialization()
      Returns true if legacy frame serialization formats should be used in RowsAndColumnsSerializer and FrameFileWriter. Returns false if the WireTransferable mechanism should be used.