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 SummaryConstructorsConstructorDescriptionIcebergEncoder(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- 
IcebergEncoderCreates 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- the- Schemafor datum instances
 
- 
IcebergEncoderCreates 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- the- Schemafor datum instances
- shouldCopy- whether to copy buffers before returning encoded results
 
 
- 
- 
Method Details- 
encode- Specified by:
- encodein interface- org.apache.avro.message.MessageEncoder<D>
- Throws:
- IOException
 
- 
encode- Specified by:
- encodein interface- org.apache.avro.message.MessageEncoder<D>
- Throws:
- IOException
 
 
-