Spring Data Cassandra page-size vs fetch-size - cassandra

What is the difference between page-size and fetch-size in Spring Data Cassandra?
The current docs show page-size as a property; but 2.1 docs show fetch-size.

According to the CassandraProperties class, fetch-size is deprecated in favor of page-size.
So both properties serve the same purpose, but one is newer.

Related

CF : Local Reads MBean for Cassandra

I am using JMX MBeans for monitoring Cassandra metrics. I am looking to enable CF : Local Reads equivalent in opscenter, does anyone know what is the equivalent JMX Mbean for it?
The metrics are listed out here: http://cassandra.apache.org/doc/latest/operating/metrics.html#table-metrics
The ReadLatency mbean on the table metrics so: org.apache.cassandra.metrics:type=Table,keyspace=YOURKEYSPACE,scope=YOURTABLE,name=ReadLatency
or type=ColumnFamily for older versions of C*.
OpsCenter uses the values operation to get the raw histogram so it may look slightly different than when reading the mbeans directly, but the decaying histogram is less accurate when monitoring over time so going based on raw values is better. It is described in this presentation.

Metrics reporter doesn't report some metrics

Based on metrics-reporter-config-sample.yaml, some of metrics are not exported by either CSVreporter or ConsoleReporter,
in particular:
org.apache.cassandra.metrics.DroppedMessage.+
org.apache.cassandra.metrics.ReadRepair.+
org.apache.cassandra.metrics.ColumnFamily.system.+
// or any other keyspace metrics
Observed with cassandra versions DSE 5.x and DDC-3.7.
However, the keyspace metrics can be found in e.g.: JCONSOLE.
(I've built and installed newer metrics reported JAR (reporter-config3-3.0.2.jar) but the same outcome)
Figured it out by myself, the patterns are different to the ones listed in sample config file.
So, keyspace and table metrics are:
org.apache.cassandra.metrics.keyspace.+
org.apache.cassandra.metrics.Table.+
metrics-reporter-config-sample.yaml needs to be updated to the new cassandra versions
The trick was to export all metrics by changing white-list to black-list:
predicate:
color: "black"
patterns:
- ".*JMXONLY$"
and then figure out the right patterns for white-list.

thrift or CQL3 for cassandra wide rows?

we are going to create a new project on cassandra with php or java.
As we estimated, there will be 20K req/sec to cassandra cluster.
Specially wide column feature is important for this project, but i can not make it clear: should i prefer thrift API or CQL3 library like php-driver etc?
There is an post that says 'Thrift API is not going to be getting new features' in this link. So i am not sure about thrift.
if i decided to use cql3, i have to alter table to be sure column exists before all insert queries like this, which is discussed at here. i think this will be a performance issue for me.
So which of them is best to my case ?
Thrift is a legacy interface in Cassandra. All new development should use the native CQL interface.
I'm not clear on why you think you'd need to do an alter table frequently. Typically you would define a schema once and rarely if ever use alter table.

What is the default consistency level in spring-data-cassandra?

If I don't set any read/write consistency level at all in my spring-data-cassandra project, what will be my consistency level for reads? What about writes?
(I asked this question here, but the Google Group is now locked)
The default consistency level used by the driver, if not set, is one. Since spring-data-cassandra, as they claim is:
Based on the latest DataStax Enterprise CQL Java Driver
the default CL is one.
See https://jira.spring.io/browse/DATACASS-145 & https://jira.spring.io/browse/DATACASS-146. I am working on this in branch https://github.com/spring-projects/spring-data-cassandra/tree/DATACASS-145. When DATACASS-145 is done, I can move on to DATACASS-146.
I don't think it's going to make it into 1.1.0; 1.1.1 is likely.

Enabling Caching in Cassandra Column family through hector-API?

I am using hector-core1.0-5 from prettyprint for connecting to cassandra. Using this API I am able to create the keyspace. But I am unable to find the method which configures the "caching" property of column family. So as default it assigns "KEYS_ONLY" as "caching" value for all column families created. I wan to change this property value to "ALL" so that I can use both the key cache and row cache in cassandra.My cassandra version1.2.0. Anyone help me in finding the way to alter the "caching" property at the time a keyspace is created.
There is not support for get or set caching in ColumnFamilyDefinition interface. Hector community has to patch the code.
No idea about Hector as such. But we are using Playorm for Cassandra and it uses Caches like hibernate. Read more information at http://buffalosw.com/wiki/Caching-in-Playorm/.

Resources