无法使用jdbc驱动程序连接cassandra获取错误java.sql.sqlexception:无法创建poolableconnectionfactory(isvalid()返回false)
apachebeam jdbc io不使用casandra我尝试使用cassandra-jdbc-1.2.5.jar
这是我的pom
<dependency>
<groupId>org.apache-extras.cassandra-jdbc</groupId>
<artifactId>cassandra-jdbc</artifactId>
<version>1.2.5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.cassandra/cassandra-thrift -->
<dependency>
<groupId>org.apache.cassandra</groupId>
<artifactId>cassandra-thrift</artifactId>
<version>1.2.5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.cassandra/cassandra-clientutil -->
<dependency>
<groupId>org.apache.cassandra</groupId>
<artifactId>cassandra-clientutil</artifactId>
<version>1.2.5</version>
</dependency>
<dependency>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
<version>0.9.3</version>
</dependency>
我也用sql和oracle做了jdbcio,但没有用cassandra
input.getPipeline().apply(JdbcIO.<Row>read().withDataSourceConfiguration(JdbcIO.DataSourceConfiguration.create("org.apache.cassandra.cql.jdbc.CassandraDriver", "jdbc:cassandra://112.155.0.88:9160/beam")
.withUsername(username).withPassword(password))
.withQuery("Select personname from person"))
.withCoder(SchemaCoder.of(schema))
.withRowMapper((JdbcIO.RowMapper<Row>) resultSet -> {
}
得到这个错误java.sql.sqlexception:cannot create poolableconnectionfactory(isvalid()returned false)我想知道beam是否支持它。
暂无答案!
目前还没有任何答案,快来回答吧!