2015-09-21 34 views
0

進出口新的Scala和火花,並可能與有關上述錯誤一些幫助做。 這裏是我的代碼片段,是造成問題:無法找到的證據類型參數內含價值 - 星火

case class Session (user_id: String, creation_date: BigInt, offline: Boolean) 
case class User (user_id: String, app_id: Int, vendor_code: String, app_version: String) 

val users = sc.cassandraTable[User]("leech_seed", "user").select("user_id", "app_id", "vendor_code", "app_version").where("last_active >=" + (timestamp - 86400000)) 
val sessions = sc.cassandraTable[Session]("leech_seed", "session").select("user_id", "creation_date", "offline").where("creation_date < " + timestamp + " AND creation_date >=" + (timestamp - 86400000)) 

當我使用的火花這段代碼外殼,它工作正常,但是當我試圖建立與SBT罐子我收到以下錯誤could not find implicit value for evidence parameter of type com.datastax.spark.connector.rdd.reader.RowReaderFactory[User]

這一直做我的頭比ID更喜歡承認所以任何幫助/見解將不勝感激。

注:我現在用的是datastax cassandra connector火花

+0

您使用的是spark-cassandra連接器? – Gillespie

+0

即時通訊使用斯卡拉2.10連接 –

+0

我應該也問過哪個版本的卡桑德拉? – Gillespie

回答

1

檢查火花卡桑德拉連接器版本是最新的最新與星火的版本所使用。我遇到了使用Spark 1.4.1之前版本高於2.10-1.4.0-M3的連接器的問題。

此外,還要確保你的情況類的主要方法之外定義的 - 否則你會遇到No RowReaderFactory can be found for this type或相似。

相關問題