· 9 years ago · Oct 25, 2016, 02:36 PM
1create table if not exists mytable(id uuid primary key, data text, timestamp lastupdated);
2
3// Extra setup to allow Cassandra Timestamp to map to Java 8 Instant
4 CodecRegistry myCodecRegistry;
5 myCodecRegistry = CodecRegistry.DEFAULT_INSTANCE;
6 myCodecRegistry.register(InstantCodec.instance);
7
8 Cluster cluster = Cluster.builder().
9 addContactPoints(extractAddresses(config())).
10 withCodecRegistry(myCodecRegistry).build();
11
12com.datastax.driver.core.exceptions.InvalidQueryException: Unknown type xxx.lastupdated