与Apache Cassandra的SoapUI JDBC连接 [英] SoapUI JDBC connection with Apache Cassandra

查看:734
本文介绍了与Apache Cassandra的SoapUI JDBC连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道如何使用JDBC连接字符串在SoapUI中连接到cassandra。

Does anyone know how to connect to cassandra using JDBC connection string in SoapUI.

我从我的身边尝试,但无法连接。根据研究,我知道 org.apache.cassandra.cql.jdbc.CassandraDriver 不支持。

I have tried from my side, but not able to connect. Based on the research I came to know that org.apache.cassandra.cql.jdbc.CassandraDriver doesn't support.

我使用了以下信息。


  • 驱动程序: org.apache.cassandra.cql.jdbc.CassandraDriver

  • 连接字符串: jdbc:cassandra:// localhost:8080 / test3

  • Driver: org.apache.cassandra.cql.jdbc.CassandraDriver
  • Connection String: jdbc:cassandra://localhost:8080/test3

推荐答案

这些天Thrift在Cassandra接口方面已经死了,你需要使用本地CQL协议做任何有用的事情。幸运的是,如果这是您唯一的集成选项,还有一个 JDBC包装器,以及本机驱动程序的概念

These days Thrift is dead in terms of a Cassandra interface, and you need to be using the native CQL protocol to be doing anything useful. Fortunately there is a JDBC wrapper available if that's your only integration option, and the native driver's concepts will map a lot better to JDBC than the old Thrift protocol.


JDBC驱动程序类:com.github.adejanovski.cassandra.jdbc.CassandraDriver

JDBC driver class : com.github.adejanovski.cassandra.jdbc.CassandraDriver

JDBC URL:jdbc:cassandra:// host1 - host2 - host3:9042 / keyspace

JDBC URL : jdbc:cassandra://host1--host2--host3:9042/keyspace

其中9042是默认本地传输端口,可通过 cassandra.yaml

Where 9042 is the default native transport port, configurable via cassandra.yaml.

似乎还有更新版本的基于Thrift的JDBC驱动程序用于Cassandra 3.x,但它不再受Apache或Cassandra开发人员的支持。

There does also appear to be an updated version of the Thrift-based JDBC driver for use with Cassandra 3.x, but it is no longer supported by Apache or the Cassandra developers.

因为这里的其他答案都是共享固定的列表(有时是虚假的)依赖我想我最好提到适当的依赖管理,如果不同的jar版本不匹配(特别是,2.x到3.x是Cassandra本身和cassandra-driver-core的突破性改变),很多东西都不会工作。

As the other answers here have been sharing fixed lists of (sometimes spurious) dependencies I thought I'd better mention proper dependency management, as a lot of things won't work if the different jar versions don't all match up (in particular, 2.x to 3.x is a breaking change for both Cassandra itself and cassandra-driver-core).

上面提到的包装器项目包含一个指定所有依赖项的pom.xml,并发布到 Maven Central 。您应该能够使用任何数量的依赖管理工具(包括maven,ivy或grape)来解析和下载特定驱动程序版本所需的所有jar文件。

The wrapper project mentioned above contains a pom.xml that specifies all the dependencies and is published to Maven Central. You should be able to use any number of dependency-management tools -- including maven, ivy or grape -- to resolve and download all the jars you will need for a particular driver version.

或者,开发人员似乎提供了一个包含所有必要依赖项的jar包,但这将与特定的驱动程序版本相关。

Alternatively, it appears the developer provides a single jar containing all the necessary dependencies, but this will be tied to a specific driver version.

这篇关于与Apache Cassandra的SoapUI JDBC连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆