public class PulsarPartitionSplitSerializer extends Object implements SimpleVersionedSerializer<PulsarPartitionSplit>
serializer
for PulsarPartitionSplit
.Modifier and Type | Field and Description |
---|---|
static int |
CURRENT_VERSION |
static PulsarPartitionSplitSerializer |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
PulsarPartitionSplit |
deserialize(int version,
byte[] serialized)
De-serializes the given data (bytes) which was serialized with the scheme of the indicated
version.
|
PulsarPartitionSplit |
deserializePulsarPartitionSplit(int version,
DataInputStream in) |
TopicPartition |
deserializeTopicPartition(int version,
DataInputStream in) |
int |
getVersion()
Gets the version with which this serializer serializes.
|
byte[] |
serialize(PulsarPartitionSplit obj)
Serializes the given object.
|
void |
serializePulsarPartitionSplit(DataOutputStream out,
PulsarPartitionSplit split) |
void |
serializeTopicPartition(DataOutputStream out,
TopicPartition partition) |
public static final PulsarPartitionSplitSerializer INSTANCE
public static final int CURRENT_VERSION
public int getVersion()
SimpleVersionedSerializer
getVersion
in interface SimpleVersionedSerializer<PulsarPartitionSplit>
getVersion
in interface Versioned
public byte[] serialize(PulsarPartitionSplit obj) throws IOException
SimpleVersionedSerializer
SimpleVersionedSerializer.getVersion()
.serialize
in interface SimpleVersionedSerializer<PulsarPartitionSplit>
obj
- The object to serialize.IOException
- Thrown, if the serialization fails.public PulsarPartitionSplit deserialize(int version, byte[] serialized) throws IOException
SimpleVersionedSerializer
deserialize
in interface SimpleVersionedSerializer<PulsarPartitionSplit>
version
- The version in which the data was serializedserialized
- The serialized dataIOException
- Thrown, if the deserialization fails.public void serializePulsarPartitionSplit(DataOutputStream out, PulsarPartitionSplit split) throws IOException
IOException
public PulsarPartitionSplit deserializePulsarPartitionSplit(int version, DataInputStream in) throws IOException
IOException
public void serializeTopicPartition(DataOutputStream out, TopicPartition partition) throws IOException
IOException
public TopicPartition deserializeTopicPartition(int version, DataInputStream in) throws IOException
IOException
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.