Class ProtoWriteSupport<T extends com.google.protobuf.MessageOrBuilder>


  • public class ProtoWriteSupport<T extends com.google.protobuf.MessageOrBuilder>
    extends WriteSupport<T>
    Implementation of WriteSupport for writing Protocol Buffers.
    • Constructor Detail

      • ProtoWriteSupport

        public ProtoWriteSupport()
      • ProtoWriteSupport

        public ProtoWriteSupport​(Class<? extends com.google.protobuf.Message> protobufClass)
    • Method Detail

      • setSchema

        public static void setSchema​(org.apache.hadoop.conf.Configuration configuration,
                                     Class<? extends com.google.protobuf.Message> protoClass)
      • setWriteSpecsCompliant

        public static void setWriteSpecsCompliant​(org.apache.hadoop.conf.Configuration configuration,
                                                  boolean writeSpecsCompliant)
        Make parquet-protobuf use the LIST and MAP wrappers for collections. Set to false if you need backward compatibility with parquet before PARQUET-968 (1.9.0 and older).
        Parameters:
        configuration - The hadoop configuration
        writeSpecsCompliant - If set to true, the old schema style will be used (without wrappers).
      • write

        public void write​(T record)
        Writes Protocol buffer to parquet file.
        Specified by:
        write in class WriteSupport<T extends com.google.protobuf.MessageOrBuilder>
        Parameters:
        record - instance of Message.Builder or Message.