Package org.apache.iceberg.data.avro
Class IcebergEncoder<D>
java.lang.Object
org.apache.iceberg.data.avro.IcebergEncoder<D>
- All Implemented Interfaces:
org.apache.avro.message.MessageEncoder<D>
-
Constructor Summary
ConstructorsConstructorDescriptionIcebergEncoder(Schema schema) Creates a newMessageEncoderthat will deconstruct datum instances described by theschema.IcebergEncoder(Schema schema, boolean shouldCopy) Creates a newMessageEncoderthat will deconstruct datum instances described by theschema. -
Method Summary
-
Constructor Details
-
IcebergEncoder
Creates a newMessageEncoderthat will deconstruct datum instances described by theschema.Buffers returned by
encodeare copied and will not be modified by future calls toencode.- Parameters:
schema- theSchemafor datum instances
-
IcebergEncoder
Creates a newMessageEncoderthat will deconstruct datum instances described by theschema.If
shouldCopyis true, then buffers returned byencodeare copied and will not be modified by future calls toencode.If
shouldCopyis false, then buffers returned byencodewrap a thread-local buffer that can be reused by future calls toencode, but may not be. Callers should only setshouldCopyto false if the buffer will be copied before the current thread's next call toencode.- Parameters:
schema- theSchemafor datum instancesshouldCopy- whether to copy buffers before returning encoded results
-
-
Method Details
-
encode
- Specified by:
encodein interfaceorg.apache.avro.message.MessageEncoder<D>- Throws:
IOException
-
encode
- Specified by:
encodein interfaceorg.apache.avro.message.MessageEncoder<D>- Throws:
IOException
-