I am having trouble with getting a list including maps with |Cassandra Java Driver|.

For below version:

|List<Map<Integer,Integer>>myList =state.getList(5,TypeTokens.mapOf(Integer.class,Integer.class));|

The error is like:

|InvalidRequest:Errorfrom server:code=2200[Invalidquery]message="Java source compilation failed: Line 3: TypeTokens cannot be resolved"|

And for version like below:

|List<Map<Integer,Integer>>myList =state.getList(5,Map.class);|

The error is like:

|InvalidRequest:Errorfrom server:code=2200[Invalidquery]message="Java source compilation failed: Line 3: Type mismatch: cannot convert from List<Map> to List<Map<Integer,Integer>>|

|state| is a UDT defined as:

|CREATE TYPE count_min_udt(n int,m int,p bigint,hash_a list <bigint>,hash_b list <bigint>,values list<frozen <map<int,int>>>);|

Am I using them wrong? I'd appreciate some help.

Thanks, Andreas

Reply via email to