Class CassandraTypeDeserializer

java.lang.Object
io.debezium.connector.cassandra.transforms.CassandraTypeDeserializer

@ThreadSafe @Immutable public final class CassandraTypeDeserializer extends Object
  • Field Details

  • Constructor Details

    • CassandraTypeDeserializer

      private CassandraTypeDeserializer()
  • Method Details

    • getInstance

      public static CassandraTypeDeserializer getInstance()
    • init

      public static void init(DebeziumTypeDeserializer typeDeserializer)
    • initInternal

      private void initInternal(DebeziumTypeDeserializer deserializer)
    • deserialize

      public static Object deserialize(com.datastax.oss.driver.api.core.type.DataType dataType, ByteBuffer bb)
      Deserialize from snapshot/datastax-sourced cassandra data.
      Parameters:
      dataType - the DataType of the object
      bb - 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 - the AbstractType of the non-collection column
      bb - 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 - the CollectionType of the collection column
      ccd - 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 - the AbstractType of a column in cassandra
      Returns:
      the TypeDeserializer of the AbstractType.