我正在使用 datastax 3.2.0
连接器。
当我尝试读取数据类型为 timeuuid
的列时,出现以下错误。
Exception in thread "main"
com.datastax.driver.core.exceptions.CodecNotFoundException: Codec not found for requested operation: [timeuuid <-> java.lang.String]
我该如何解决这个问题?
最佳答案
您正在尝试将字符串插入 timeuuid 字段。
插入前将字符串转成uuid
String your_string = "38400000-8cf0-11bd-b23e-10b96e4ef00d";
UUID uid = UUID.fromString(your_string); //Use this uid to insert
关于java - 从 Cassandra 读取 timeuuid 值 - 使用 DataStax 连接器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43857463/