Questions tagged [astyanax]

Astyanax (deprecated) was a Java Cassandra client. It borrows many concepts from Hector but diverges in the connection pool implementation as well as the client API.

Astyanax has been deprecated, and its last merged PR was in October of 2018.

Astyanax is a client library for the Apache Cassandra NoSQL database. Documentation on using Astyanax can be found at their github wiki page.

Astyanax was the son of Hector in Greek mythology. As such, Astyanax is a refactoring of the Hector client library into a cleaner abstraction for the connection manager and a simpler API.

195 questions
3
votes
1 answer

Batch insert with Astyanax CQL3 API?

I know we can insert single record to Cassandra with something like this (the example below taken from here): final String INSERT_STATEMENT = "INSERT INTO employees (empID, deptID, first_name, last_name) VALUES (?, ?, ?, ?);"; result = keyspace …
su-
  • 3,116
  • 3
  • 32
  • 42
3
votes
2 answers

astyanax TokenRangeOfflineException when connecting to two node cluster

I have some fairly simple code written to experiment with astyanax. It works fine when talking to a single node Cassandra db on localhost, but when I write the same schema to a two node cluster (which is definitely accessible from my host), I get a…
Eric
  • 31
  • 1
  • 2
3
votes
1 answer

Dependency trouble using CassandraUnit with Astyanax

I have a SessionDaoCassandraImpl class that reads data from Cassandra using Astyanax that I would like to test with an embedded Cassandra server. CassandraUnit seems perfect to do so but I am running into an exception ERROR - 2012-11-21…
Lolo
  • 3,935
  • 5
  • 40
  • 50
3
votes
2 answers

Serializing/deserializing a SIPDIalog

I was trying to serialize and deserialize a gov.nist.javax.sip.stack.SIPDialog object into Cassandra. But the equals comparison on the deserialized object fails when I compare it with the original SIPDialog object I serialized. SO looks like I am…
jeera
  • 591
  • 1
  • 7
  • 15
3
votes
2 answers

Astyanax key range query

trying to write a query which will paginate through all rows in a column family using astyanax client and RowSliceQuery. keyspace.prepareQuery(COLUMN_FAMILY).getKeyRange(null, null, null, null, 100); Done this successfully using hector where 1st…
3
votes
3 answers

Astyanax ColumnFamily for multiple columns?

I have a column family with multiple columns: create column family user_attr2 with comparator = 'UTF8Type' and default_validation_class = 'UTF8Type' and key_validation_class = 'UTF8Type' and column_metadata = [ {column_name: attr_value,…
3
votes
1 answer

InvalidRequestException(why:Too many bytes for comparator) on execute query to composite columns using Asytanax

I'm trying to fetch out of composite columns using Astyanax 1.0.9 and got "InvalidRequestException(why:Too many bytes for comparator)" Here is my CF: CREATE TABLE user_attributes ( user_id bigint, attr_name ascii, attr_value…
3
votes
3 answers

cassandra 1.1.x get by composite key

Is it possible using Hector or Astyanax get rows by composite keys (in multiple columns, not the ones serialized to one column)? In cqlsh i created simple column family: CREATE COLUMNFAMILY kkvv (x int, y int, val1 varchar, val2 varchar, PRIMARY KEY…
trj
  • 77
  • 1
  • 12
2
votes
0 answers

Missing column that was just inserted in cassandra column family

We are constancly getting problem on our test cluster. Cassandra configuration: cassandra version: 2.2.12 nodes count: 6, seed-nodess 3, none-seed-nodes 3 replication factor 1 (of course for prod we will use 3) Table configuration where we get…
alexadr
  • 113
  • 2
  • 8
2
votes
0 answers

Cassandra composite - Querying partial columns

For the data stored as DynamicCompositeColumns (Long,UTF8) as shown below, rowkey: t1 column1: 1456394880000:test1:a1, value=... column2: 1457273146000:test1:a3, value=.... column3: 1457273146000:test2:a3, value=... 1.How to get all columns which…
ASB
  • 21
  • 4
2
votes
0 answers

Astyanax/Cassandra - Getting "Re-preparing already prepared query" warning with caching enabled

I'm trying to insert some data to Cassandra with Astyanax, by I'm getting a lot of "Re-preparing already prepared query" warnings even if have caching enabled: 22:08:03,703 WARN Cluster:1702 - Re-preparing already prepared query INSERT INTO…
bluetiger9
  • 718
  • 7
  • 16
2
votes
1 answer

Read Column Families list from Cassandra server

I'm making a Cassandra data viewer using Astyanax, and I want to be able to list the column families that are on a Cassandra Keyspace without having a predefined schema. For now, I'm listing the column families from a JSON Schema, and not from…
user3770101
  • 113
  • 1
  • 1
  • 6
2
votes
1 answer

How do I stop Astyanax from flattening my datamodel?

I created a table in Cassandra from this code : @Entity public class UserEvent { @Id private String userId; @Column private String col1; @Column private String col2; .... manager = new…
Ajeet Ganga
  • 8,353
  • 10
  • 56
  • 79
2
votes
1 answer

Cassandra schema agreement with Ec2MultiRegionSnitch

I'm stumped by a problem I'm having with my multi-datacentre cassandra cluster. It's a brand new cluster of six nodes (three in eu-west, three in us-west-2). Security groups are configured such that each node can communicate to the external IP of…
James
  • 31
  • 3
2
votes
1 answer

How to query on multiple composite column prefixes with Astyanax?

Astyanax supports composite columns in Cassandra through its AnnotatedCompositeSerializer. I have a column family with 3-field composite column names, similar to this example, adapted from Astyanax's documentation (the columns aren't actually…
Michael Louis Thaler
  • 1,854
  • 2
  • 15
  • 19
1 2
3
12 13