RequestEntryT
- Writer Request Entry type@PublicEvolving public abstract class AsyncSinkWriterStateSerializer<RequestEntryT extends Serializable> extends Object implements SimpleVersionedSerializer<BufferedRequestState<RequestEntryT>>
AsyncSinkWriter
state.Constructor and Description |
---|
AsyncSinkWriterStateSerializer() |
Modifier and Type | Method and Description |
---|---|
BufferedRequestState<RequestEntryT> |
deserialize(int version,
byte[] serialized)
De-serializes the given data (bytes) which was serialized with the scheme of the indicated
version.
|
protected abstract RequestEntryT |
deserializeRequestFromStream(long requestSize,
DataInputStream in) |
byte[] |
serialize(BufferedRequestState<RequestEntryT> obj)
Serializes state in form of
[DATA_IDENTIFIER,NUM_OF_ELEMENTS,SIZE1,REQUEST1,SIZE2,REQUEST2....].
|
protected abstract void |
serializeRequestToStream(RequestEntryT request,
DataOutputStream out) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getVersion
public byte[] serialize(BufferedRequestState<RequestEntryT> obj) throws IOException
serialize
in interface SimpleVersionedSerializer<BufferedRequestState<RequestEntryT extends Serializable>>
obj
- The object to serialize.IOException
- Thrown, if the serialization fails.public BufferedRequestState<RequestEntryT> deserialize(int version, byte[] serialized) throws IOException
SimpleVersionedSerializer
deserialize
in interface SimpleVersionedSerializer<BufferedRequestState<RequestEntryT extends Serializable>>
version
- The version in which the data was serializedserialized
- The serialized dataIOException
- Thrown, if the deserialization fails.protected abstract void serializeRequestToStream(RequestEntryT request, DataOutputStream out) throws IOException
IOException
protected abstract RequestEntryT deserializeRequestFromStream(long requestSize, DataInputStream in) throws IOException
IOException
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.