tuplejump/calliope

error: could not find implicit value for parameter unmarshaller: (com.tuplejump.calliope.Types.CQLRowKeyMap, com.tuplejump.calliope.Types.CQLRowMap)

Closed this issue · 5 comments

Using Scala 2.10.3, cassandra 2.0.7, Spark 0.9.1 and calliope_2.10-0.9.0-U1-C2-EA.jar the following works:

Cassandra to a list

And the following doesn't:

Cassandra to a case class

Error reported:

val casrdd = sc.cql3Cassandra[Employee](cas) <console>:26: error: could not find implicit value for parameter unmarshaller: (com.tuplejump.calliope.Types.CQLRowKeyMap, com.tuplejump.calliope.Types.CQLRowMap) => Employee

I'm failing to see the reason for not being able to transform cassandra data to a custom scala case class, but being able to transform it to a list of values.

Am I missing something in the code? Any hints appreciated?

P.S.: I've posted this as an issue here and not on SO as I figured the calliope community is still quite small and thus the SO question could easily be missed.

@igorper Thanks for posting it here, its easier to keep a track of than SO.

If you are trying to run this in spark console, it may be due to a known issue in Spark console where it gives some package to classes defined in console and then is not able to correlate the implicits.

Try this - Wrapped in an object

P.S. I don't have access to my dev system so there may be a typo/syntax error, but that should give you the idea. Let me know if that doesn't work.

Thanks. Yes, I'm doing this in the spark console. I'm not seeing any changes in the Wrapped in an object link. Did you mistakenly put the wrong link?

I guess I did put in the wrong link! Here is the correct one - https://gist.github.com/milliondreams/bfc8444853b0ffdf0bc6

Thanks, I've been able to make it work with a slight modification (the class has to be marked serializable).

For future reference, here is the fixed version.

Glad to be of assistance!