Class CassandraTypeDeserializer
- java.lang.Object
-
- io.debezium.connector.cassandra.transforms.CassandraTypeDeserializer
-
@ThreadSafe @Immutable public final class CassandraTypeDeserializer extends Object
-
-
Field Summary
Fields Modifier and Type Field Description private static Map<Class<? extends org.apache.cassandra.db.marshal.AbstractType>,TypeDeserializer>TYPE_MAP
-
Constructor Summary
Constructors Modifier Constructor Description privateCassandraTypeDeserializer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Objectdeserialize(com.datastax.driver.core.DataType dataType, ByteBuffer bb)Deserialize from snapshot/datastax-sourced cassandra data.static Objectdeserialize(org.apache.cassandra.db.marshal.AbstractType<?> abstractType, ByteBuffer bb)Deserialize from cdc-log-sourced cassandra data.static Objectdeserialize(org.apache.cassandra.db.marshal.CollectionType<?> collectionType, org.apache.cassandra.db.rows.ComplexColumnData ccd)Deserialize from cdc-log-sourced cassandra data.static org.apache.kafka.connect.data.SchemaBuildergetSchemaBuilder(org.apache.cassandra.db.marshal.AbstractType<?> abstractType)Construct a kafka connect SchemaBuilder object from a Cassandra data typestatic TypeDeserializergetTypeDeserializer(org.apache.cassandra.db.marshal.AbstractType<?> abstractType)Get TypeDeserializer of AbstractType
-
-
-
Field Detail
-
TYPE_MAP
private static final Map<Class<? extends org.apache.cassandra.db.marshal.AbstractType>,TypeDeserializer> TYPE_MAP
-
-
Method Detail
-
deserialize
public static Object deserialize(com.datastax.driver.core.DataType dataType, ByteBuffer bb)
Deserialize from snapshot/datastax-sourced cassandra data.- Parameters:
dataType- theDataTypeof the objectbb- the bytes of the column to deserialize- Returns:
- the deserialized object.
-
deserialize
public static Object deserialize(org.apache.cassandra.db.marshal.AbstractType<?> abstractType, ByteBuffer bb)
Deserialize from cdc-log-sourced cassandra data.- Parameters:
abstractType- theAbstractTypeof the non-collection columnbb- the bytes of the non-collection column to deserialize- Returns:
- the deserialized object.
-
deserialize
public static Object deserialize(org.apache.cassandra.db.marshal.CollectionType<?> collectionType, org.apache.cassandra.db.rows.ComplexColumnData ccd)
Deserialize from cdc-log-sourced cassandra data.- Parameters:
collectionType- theCollectionTypeof the collection columnccd- the ComplexColumnData of the collection column to deserialize- Returns:
- the deserialized object.
-
getSchemaBuilder
public static org.apache.kafka.connect.data.SchemaBuilder getSchemaBuilder(org.apache.cassandra.db.marshal.AbstractType<?> abstractType)
Construct a kafka connect SchemaBuilder object from a Cassandra data type- Parameters:
abstractType- implementation of Cassandra's AbstractType- Returns:
- the kafka connect SchemaBuilder object
-
getTypeDeserializer
public static TypeDeserializer getTypeDeserializer(org.apache.cassandra.db.marshal.AbstractType<?> abstractType)
Get TypeDeserializer of AbstractType- Parameters:
abstractType- theAbstractTypeof a column in cassandra- Returns:
- the TypeDeserializer of the AbstractType.
-
-