Commented on a reddit post on Is it possible to check if the cassandr... in r/cassandra
Yes
Is there a way to check if the cassandra queries that I've constructed are correct or not?
Mentioned @cassandra
Mentioned @cassandra
Starred a repository apache/cassandra
opened Pull Request #3155 on apache/cassandra
#3155 CASSANDRA-19007 experimental version of a fix for 19007, where normal filtering respects the strict flag
Sent a message in 👋 Welcome in #🆘discord-help
Hi I wondered how do you mange to use double quote for this kind of keyword in cassandra using datastax mapping? because I used that but I still get the error:
Invalid CQL form [view]: needs double quotes...
Hi I wondered how do you mange to use double quote for this kind of keyword in cassandra using datastax mapping? because I used that but I still get the error:
Invalid CQL form [view]: needs double quotes
https://cdn.discordapp.com/attachments/1086041101841989692/1213170982894829578/image.png?ex=65f48085&is=65e20b85&hm=d1e2366ca6f9ead260fd0efbfdabeca8c8f4aeadece472baebaa85481cc32fad&
If I have the below data set:
id year location
------------------
1 2000 Tokyo
1 2001 NewYork
2 2000 London
2 2002 NewYork
and a CQL table that has,
PRIMARY KEY is (id,year);...If I have the below data set:
id year location
------------------
1 2000 Tokyo
1 2001 NewYork
2 2000 London
2 2002 NewYork
and a CQL table that has,
PRIMARY KEY is (id,year);
I would like create a materialized view to have each id for those records with location as NewYork.
The resulting view will have to look like:
id year location
------------------
1 2001 NewYork
2 2002 NewYork
Basically, I need to sort by year first then with location next. Is it possible? Thanks.
Pull Request #3154 on apache/cassandra merged by bschoening
#3154 CASSANDRA-19242: bumped CQLSH version 6.2 > 6.3
Facing the above issue after upgrading application to java 17 with spring 6.0.8 and datastax-driver 4.17.0 beta release and cassandra-5.0-beta1 server.
Caused by: java.lang.ClassCastException: class...
Facing the above issue after upgrading application to java 17 with spring 6.0.8 and datastax-driver 4.17.0 beta release and cassandra-5.0-beta1 server.
Caused by: java.lang.ClassCastException: class com.datastax.oss.driver.internal.core.cql.DefaultSimpleStatement cannot be cast to class com.datastax.oss.driver.api.core.cql.PreparedStatement (com.datastax.oss.driver.internal.core.cql.DefaultSimpleStatement and com.datastax.oss.driver.api.core.cql.PreparedStatement are in unnamed module of loader org.eclipse.jetty.webapp.WebAppClassLoader @563e4951) at com.infinote.persistence.EntityMetaDataBasedQueryBinder.bindFindByIdQuery(EntityMetaDataBasedQueryBinder.java:161) at com.infinote.persistence.dao.CassandraDaoSupport.lambda$get$6(CassandraDaoSupport.java:567) at com.infinote.persistence.dao.CassandraDaoSupport.doWithRetry(CassandraDaoSupport.java:648) at com.infinote.persistence.dao.CassandraDaoSupport.get(CassandraDaoSupport.java:565) at com.infinote.smtp.dao.EmailConfigDao.get(EmailConfigDao.java:20) at com.infinote.smtp.EmailServiceImpl.get(EmailServiceImpl.java:156) at com.infinote.smtp.EmailServiceImpl.afterPropertiesSet(EmailServiceImpl.java:201)
The Below issues comes when in deploy the code in the server and table creation is failing Below is the code for refence.
CassandraDaoSupport class invoking bindFindByIdQuery Method present in EntityMetaDataBasedQueryBinder
protected <T> T get(final Class<T> entityType, final Map<String, Object> ids) {
final EntityMetaData entityMetaData = cassandraConfiguration.getEntityMetaData(entityType);
List<T> resultSet = doWithRetry((retry) -> {
BoundStatement boundStatement = new EntityMetaDataBasedQueryBinder(cassandraConfiguration, entityMetaData)
.bindFindByIdQuery(ids, retry);
return find(boundStatement, new EntityMetaDataBasedResultSetMapper<T>(entityMetaData));
});
if (resultSet.size() > 1) {
throw new NonUniqueResultException("Multiple objects found with id " + Arrays.toString(ids.entrySet().toArray()));
} else if (resultSet.isEmpty()) {
return null;
}
return resultSet.get(0);
}
EntityMetaDataBasedQueryBinder class bindFindByIdQuery method
public BoundStatement bindFindByIdQuery(Map<String, ? extends Object> ids, boolean refreshCache) {
PreparedStatement statement = (PreparedStatement) SimpleStatement.newInstance(String.valueOf(instance().findByIdStatement(entityMetaData, refreshCache)));
List<Object> values = new ArrayList<>();
for (FieldMetaData idField : entityMetaData.idFields()) {
values.add(ids.get(idField.name()));
}
//also need to bind the client id as the last parameter
if (entityMetaData.supportMultiTenancy()) {
values.add(cassandraConfiguration.getCurrentClient());
}
return statement.bind(values.toArray());
}
This is present in QueryCache class
public PreparedStatement findByIdStatement(EntityMetaData metaData, boolean refreshCache) {
QueryEntry queries = getQueryEntry(metaData);
if (queries.findById == null || refreshCache) {
queries.findById = cassandraConfiguration.getSession(metaData).prepare(metaData.findByIdStatement());
}
return queries.findById;
}
Please help me resolve this issue @Cassandra or any one upgraded to 4+ datastax driver version
Commented on a reddit post on Stress testing cassandra with different... in r/cassandra
I’m late to the party here, but there’s also my tool, easy-cass-stress. Formerly tlp-stress. It’s used to stress some of the biggest deployments in the world.