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

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

问题描述

有谁知道如何在 SoapUI 中使用 JDBC 连接字符串连接到 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

推荐答案

现在 Thrift 在 Cassandra 接口方面已经死了,你需要使用原生的 CQL 协议来做任何有用的事情.幸运的是,有一个 JDBC 包装器 可用,如果这是您唯一的集成选项,以及本机驱动程序的概念将比旧的 Thrift 协议更好地映射到 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 或葡萄)来解析和下载特定驱动程序版本所需的所有 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.

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

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