Class DummyRowDecoder

  • All Implemented Interfaces:
    RowDecoder

    public class DummyRowDecoder
    extends java.lang.Object
    implements RowDecoder
    The row decoder for the 'dummy' format. For an unstructured row format (bag of bytes), a specific decoder for a topic must exist. To start developing such a decoder, it is beneficial to be able to configure an arbitrary topic to be available through presto without any decoding at all (not even line parsing) and examine the internal rows that are exposed by Presto. By adding a table name to the catalog configuration file and not having and specific topic description JSON file (or by omitting the 'dataFormat' field in the table description file), this decoder should be selected by the appropriate connector.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String NAME  
    • Constructor Summary

      Constructors 
      Constructor Description
      DummyRowDecoder()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Optional<java.util.Map<DecoderColumnHandle,​FieldValueProvider>> decodeRow​(byte[] data, java.util.Map<java.lang.String,​java.lang.String> dataMap)
      Decodes a given set of bytes into field values.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DummyRowDecoder

        public DummyRowDecoder()
    • Method Detail

      • decodeRow

        public java.util.Optional<java.util.Map<DecoderColumnHandle,​FieldValueProvider>> decodeRow​(byte[] data,
                                                                                                         java.util.Map<java.lang.String,​java.lang.String> dataMap)
        Description copied from interface: RowDecoder
        Decodes a given set of bytes into field values.
        Specified by:
        decodeRow in interface RowDecoder
        Parameters:
        data - The row data to decode.
        dataMap - The row data as fields map
        Returns:
        Returns mapping from column handle to decoded value. Unmapped columns will be reported as null. Optional.empty() signals decoding error.