Questions tagged [cassandra-jdbc]

A JDBC-compliant driver for Cassandra using CQL.

A JDBC-compliant driver for Cassandra using CQL.

50 questions
2
votes
1 answer

Apache Extras Cassandra-JDBC: Invalid method name: 'prepare_cql_query'

I'm using the Apache Extras project cassandra-jdbc ( http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/ ) on version 1.1.1 along with the cassandra-thrift and cassandra-clientutil dependencies on version 1.1.1. My Cassandra version is…
Transcendence
  • 2,616
  • 3
  • 21
  • 31
1
vote
2 answers

Observed data loss while fetching records using Cassandra JDBC driver

Table Structure : testkeyspace.productInfo (productID, productName, timestamp, price) - Partition key column in the above table is “productId”. - table -> testkeyspace.productInfo consists of 10k records Test Case Test consists of two Java…
1
vote
1 answer

How can I read Cassandra data using JDBC from pySpark?

In order to parallelize the read operation and read with more than one executor. Rather than the following read code, I want to read with JDBC. hosts ={"spark.cassandra.connection.host":'node1_ip,node2_ip,node3_ip', …
murzade
  • 29
  • 5
1
vote
1 answer

Cassandra jdbc connection with Authentication

I am trying to connect to the Cassandra using cdata jdbc connector. However, I cannot find how to provide username and password in connection url. Here are my java code. package com.dremio.exec.store.jdbc.conf; import java.sql.Connection; import…
Ayush Goyal
  • 415
  • 4
  • 23
1
vote
1 answer

Cassandra query timeout

We are pulling data from around 20-25 industrial motor sensors and data is being stored in cassandra database.Cassandra as of now is running in a single node. Below is the table structure CREATE TABLE cisonpremdemo.machine_data ( id uuid…
1
vote
1 answer

Insert image into cassandra blob using Java

I wish to insert image as bytebuffer into cassandra table. Table is: Employees(Name text,Image blob) I had stored image into variable bb in form of bytebuffer using Java. How to insert data from this bytebuffer bb into cassandra table? Can anyone…
Sanjeev Delhi
  • 11
  • 1
  • 2
1
vote
1 answer

How to set/initialize values for new added column in Cassandra

We have 10+ million rows in Cassandra, and all of them are under the same table. Recently we are planning to add a new column to the existing table and the new column for all rows are required to set be true. Is there a way to initialize values for…
Haifeng Zhang
  • 30,077
  • 19
  • 81
  • 125
1
vote
1 answer

Cassandra Cql schema best practice

Here I am again asking similar question after getting really a great explanation on How do secondary indexes work in Cassandra? CREATE TABLE update_audit ( scopeid bigint, formid bigint, time timestamp, operation int, record_id bigint, …
Aftab
  • 938
  • 1
  • 9
  • 20
1
vote
1 answer

Package for accessing Cassandra database in R

I have tried RCassandra and RJDBC but unfortunately it seems that these bindings work only with the old Cassandra 1.x. Is there any binding for Cassandra 2.x in R language?
fstab
  • 4,801
  • 8
  • 34
  • 66
1
vote
1 answer

Cassandra and R via JDBC: java.lang.NoClassDefFoundError: Could not initialize class org.apache.cassandra.cql.jdbc.Utils

I am trying to access Cassandra with R via JDBC. Unfortunately, even if I have the jar package cassandra-jdbc-1.2.5.jar correctly installed in /usr/share/cassandra/lib/, containing the file org/apache/cassandra/cql/jdbc/Utils.class, I get the…
fstab
  • 4,801
  • 8
  • 34
  • 66
1
vote
1 answer

Cassandra primary key design to cater range query

I have designed a column family prodgroup text, prodid int, status int, , PRIMARY KEY ((prodgroup), prodid, status) The data model is to cater Get list of products from the product group get list of products for a given range of ids Get details of…
Nageswara Rao
  • 954
  • 1
  • 10
  • 32
1
vote
1 answer

Timeout during read exception in cassandra with datastax java driver

I'm trying to insert a single row which has few columns of size 500MB to cassandra cluster and i'm getting below error. com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: [/10.138.90.207:9042,…
Naveen
  • 425
  • 12
  • 28
1
vote
1 answer

Importing data into Apache Solr from Cassandra using dataimporthandler

Is it possible to import data from Cassandra into Apache Solr? I am currently importing data from MySQL into Apache Solr using Solr's dataimporthandler. Is it possible to use Cassandra in place of MySQL? Update 1: I tried to connect to Cassandra…
sarghau
  • 552
  • 1
  • 6
  • 14
1
vote
1 answer

CQL SELECT fails with prepareStatement

In my sample app following snippet works fine. SELECT_CQL = "SELECT * FROM " + STREAM_NAME_IN_CASSANDRA + " WHERE '" + CONTEXT_ID_COLUMN + "'=?"; Connection connection = getConnection(); statement =…
udarakr
  • 536
  • 2
  • 6
  • 18
1
vote
0 answers

Cannot get a connection, pool error Could not create a validated object, cause: the Cassandra implementation is always in auto-commit mode

I am using cassandra 1.2.6 version (Neither datastax cassandra NOR brisk cassandra). Here I am trying to connect hive 0.9.0 to cassandra 1.2.6. I get the below error INFO ql.Driver: Starting command: CREATE EXTERNAL TABLE MyHiveTable (m…