public class MessageSerializer extends Object
| Constructor and Description |
|---|
MessageSerializer() |
| Modifier and Type | Method and Description |
|---|---|
static int |
bytesToInt(byte[] bytes) |
static ArrowDictionaryBatch |
deserializeDictionaryBatch(ReadChannel in,
ArrowBlock block,
BufferAllocator alloc)
Deserializes a DictionaryBatch knowing the size of the entire message up front.
|
static ArrowDictionaryBatch |
deserializeDictionaryBatch(ReadChannel in,
Message message,
BufferAllocator alloc)
Deserializes a DictionaryBatch
|
static ArrowMessage |
deserializeMessageBatch(ReadChannel in,
BufferAllocator alloc) |
static ArrowRecordBatch |
deserializeRecordBatch(ReadChannel in,
ArrowBlock block,
BufferAllocator alloc)
Deserializes a RecordBatch knowing the size of the entire message up front.
|
static ArrowRecordBatch |
deserializeRecordBatch(ReadChannel in,
Message message,
BufferAllocator alloc)
Deserializes a RecordBatch
|
static ArrowRecordBatch |
deserializeRecordBatch(RecordBatch recordBatchFB,
ArrowBuf body) |
static Schema |
deserializeSchema(ReadChannel in)
Deserializes a schema object.
|
static ArrowBlock |
serialize(WriteChannel out,
ArrowDictionaryBatch batch)
Serializes a dictionary ArrowRecordBatch.
|
static ArrowBlock |
serialize(WriteChannel out,
ArrowRecordBatch batch)
Serializes an ArrowRecordBatch.
|
static long |
serialize(WriteChannel out,
Schema schema)
Serialize a schema object.
|
static ByteBuffer |
serializeMessage(com.google.flatbuffers.FlatBufferBuilder builder,
byte headerType,
int headerOffset,
int bodyLength)
Serializes a message header.
|
static long |
writeBatchBuffers(WriteChannel out,
ArrowRecordBatch batch) |
public static int bytesToInt(byte[] bytes)
public static long serialize(WriteChannel out, Schema schema) throws IOException
out - where to write the schemaschema - the object to serialize to outIOException - if something went wrongpublic static Schema deserializeSchema(ReadChannel in) throws IOException
in - the channel to deserialize fromIOException - if something went wrongpublic static ArrowBlock serialize(WriteChannel out, ArrowRecordBatch batch) throws IOException
out - where to write the batchbatch - the object to serialize to outIOException - if something went wrongpublic static long writeBatchBuffers(WriteChannel out, ArrowRecordBatch batch) throws IOException
IOExceptionpublic static ArrowRecordBatch deserializeRecordBatch(ReadChannel in, Message message, BufferAllocator alloc) throws IOException
in - the channel to deserialize frommessage - the object to derialize toalloc - to allocate buffersIOException - if something went wrongpublic static ArrowRecordBatch deserializeRecordBatch(ReadChannel in, ArrowBlock block, BufferAllocator alloc) throws IOException
in - the channel to deserialize fromblock - the object to derialize toalloc - to allocate buffersIOException - if something went wrongpublic static ArrowRecordBatch deserializeRecordBatch(RecordBatch recordBatchFB, ArrowBuf body) throws IOException
IOExceptionpublic static ArrowBlock serialize(WriteChannel out, ArrowDictionaryBatch batch) throws IOException
out - where to serializebatch - the batch to serializeIOException - if something went wrongpublic static ArrowDictionaryBatch deserializeDictionaryBatch(ReadChannel in, Message message, BufferAllocator alloc) throws IOException
in - where to read frommessage - the message message metadata to deserializealloc - the allocator for new buffersIOException - if something went wrongpublic static ArrowDictionaryBatch deserializeDictionaryBatch(ReadChannel in, ArrowBlock block, BufferAllocator alloc) throws IOException
in - where to read fromblock - block metadata for deserializingalloc - to allocate new buffersIOException - if something went wrongpublic static ArrowMessage deserializeMessageBatch(ReadChannel in, BufferAllocator alloc) throws IOException
IOExceptionpublic static ByteBuffer serializeMessage(com.google.flatbuffers.FlatBufferBuilder builder, byte headerType, int headerOffset, int bodyLength)
builder - to write the flatbuf toheaderType - headerType fieldheaderOffset - header offset fieldbodyLength - body length fieldCopyright © 2017 The Apache Software Foundation. All rights reserved.