首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >通过星火查询Cassandra表

通过星火查询Cassandra表
EN

Stack Overflow用户
提问于 2016-02-09 07:09:42
回答 1查看 793关注 0票数 1

我正试图通过Smart-1.6.0和scala-2.11.7从Cassandra 2.0.17表中获得值,步骤如下

  1. 启动卡桑德拉-服务卡桑德拉启动
  2. 启动火花-- sbin/start-all.sh
  3. 声明火花scala

在scala中执行这些命令

代码语言:javascript
运行
复制
import org.apache.spark.SparkContext
import org.apache.spark.SparkConf
import org.apache.spark.SparkContext._

sc.stop

val conf = new SparkConf(true).set("spark.cassandra.connection.host","127.0.0.1")

val sc=new SparkContext("local[2]","test",conf)

import com.datastax.spark.connector._

在这里之前一切都很顺利,但当我执行-

代码语言:javascript
运行
复制
val rdd=sc.cassandraTable("tutorialspoint","emp")

它给了我下面的错误

代码语言:javascript
运行
复制
error: bad symbolic reference. A signature in CassandraTableScanRDD.class refers to term driver
in package com.datastax which is not available.
It may be completely missing from the current classpath, or the version on
the classpath might be incompatible with the version used when compiling CassandraTableScanRDD.class.
error: bad symbolic reference. A signature in CassandraTableScanRDD.class refers to term core
in value com.datastax.driver which is not available.
It may be completely missing from the current classpath, or the version on
the classpath might be incompatible with the version used when compiling CassandraTableScanRDD.class.
error: bad symbolic reference. A signature in CassandraTableScanRDD.class refers to term core
in value com.datastax.driver which is not available.
It may be completely missing from the current classpath, or the version on
the classpath might be incompatible with the version used when compiling CassandraTableScanRDD.class.

加装了卡桑德拉库的罐子来点燃和改装它。我使用java版本的1.8.0_72

我错过了什么吗?

EN

回答 1

Stack Overflow用户

发布于 2016-02-09 08:50:03

您使用的驱动程序与scala和spark版本不兼容。您正在使用scala-2.11.7,但此驱动程序用于Scala2.10。同样对于火花,这个驱动程序支持火花1.5.x。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35285926

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档