Java/Cassandra throwing error with making Frozen attribute -
i have java class using datastax cassandra driver write pojo cassandra table. works fine, until comes having write class object cassandra table. throws error:
caused by: com.datastax.driver.core.exceptions.codecnotfoundexception: codec not found requested operation: [frozen< projkeyspace.smi > <-> code.generic.common.data.mycustomsmiobject]
so have tried lot of different things try , make attribute "frozen", nothing works , keep getting same error. here example of class object.
@table(keyspace="projkeyspace", name="summarytable") public class datagroupingobject implements serializable { @column(name = "objid") private string objid; @column(name = "timeofjob") private date timeofjob; @column(name = "smiobjectinput") @frozen //have tried: //@frozen("frozen<projkeyspace.smi>") //@frozen("frozen<smi>") //@frozen("frozen<mycustomsmiobject>") //and other permutations can think of... private mycustomsmiobject mycustomsmiobject; //the problem attribute @column(name = "column5") private string dataforcolumn5; //getters , setters.... } so overlooking? digging datastax documentation didn't show beyond this, http://docs.datastax.com/en/drivers/java/2.2/com/datastax/driver/mapping/annotations/frozen.html , tried.
i have tried having mycustomsmiobject mapped frozen 'projkeyspace.smi' , didn't work (of course didn't think since there isn't table in cassandra called smi, type) here example of it:
@table(keyspace="projkeyspace", name="smi") public class mycustomsmiobject implements serializable { @column(name = "idstring") private string idstring; @column(name = "valuenum") private double valuenum; //getters , setters.... } so said, @ loss. appreciated , in advance!
smi udt isn't it? in case mycustomsmiobject should annotated @udt(keyspace="projkeyspace", name="smi") instead of @table. doing that, driver should detect udt , register custom codec allow able serialize , deserialize it.
on note @frozen annotation has no impact on mapper, informational @ time until mapper has support schema generation.
Comments
Post a Comment