You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Brian O'Neill <bo...@alumni.brown.edu> on 2014/01/31 01:15:07 UTC

CQL3 Example (Scala Noobie Question)

I¹m trying to upgrade the CassandraTest in Spark to use CQL3.

This is the new InputFormat from Cassandra:
public class CqlPagingInputFormat extends
AbstractColumnFamilyInputFormat<Map<String, ByteBuffer>, Map<String,
ByteBuffer>>

For that, I have the following Scala/RDD code:
    val casRdd = sc.newAPIHadoopRDD(
      job.getConfiguration(),
      classOf[CqlPagingInputFormat],
      classOf[Map[String, ByteBuffer]],
      classOf[Map[String, ByteBuffer]])

The Scala compiler is complaining that:
inferred type arguments
[Map[String,java.nio.ByteBuffer],Map[String,java.nio.ByteBuffer],
org.apache.cassandra.hadoop.cql3.CqlPagingInputFormat]
do not conform to method newAPIHadoopRDD's type parameter bounds [K,V,F <:
org.apache.hadoop.mapreduce.InputFormat[K,V]]
    val casRdd = sc.newAPIHadoopRDD(
                    ^

Can anyone help a noob out?

-brian

---
Brian O'Neill
Chief Architect
Health Market Science
The Science of Better Results
2700 Horizon Drive € King of Prussia, PA € 19406
M: 215.588.6024 € @boneill42 <http://www.twitter.com/boneill42>   €
healthmarketscience.com


This information transmitted in this email message is for the intended
recipient only and may contain confidential and/or privileged material. If
you received this email in error and are not the intended recipient, or the
person responsible to deliver it to the intended recipient, please contact
the sender at the email above and delete this email and any attachments and
destroy any copies thereof. Any review, retransmission, dissemination,
copying or other use of, or taking any action in reliance upon, this
information by persons or entities other than the intended recipient is
strictly prohibited.