Is there a simple Jmeter performance test case for Cassandra - cassandra

We are creating Jmeter performance benchmarking for our Cassandra installation.
For which we have been referring to the default Cassandra plugin mentioned in the site
This plugin does not take any Cassandra server connection parameter for the "put", no much help is also present to how to use this plugin.
Some can help me with this plugin if any one knows how to configure Cassandra connection
Hence we switched to an article to test Cassandra with Groovy. (Link here)
This site calls to add multiple jar some are bundles and cannot find the exeat JAR
snappy-java-1.0.5
netty-transport-4.0.33.Final
netty-handler-4.0.33.Final
netty-common-4.0.33.Final
netty-codec-4.0.33.Final
netty-buffer-4.0.33.Final
metrics-core-3.1.2
lz4-1.2.0
HdrHistogram-2.1.4
guava-16.0.1
Can some help me with some simpler test perform on Cassandra ?

For correct performance testing of Cassandra it's better to use specialized tools, like NoSQLBench that was developed specifically for that task. Generic tools won't give you the real performance numbers. Please read NoSQLBench documentation on how to correctly test Cassandra to take into account things like compaction, repairs, etc.

Have you tried to read documentation which mentions CassandraProperties configuration element where you can define your connection server parameters:
If you want to have the full control and not only be limited to what other guys implemented you can consider following instructions from Cassandra Load Testing with Groovy article

Related

How to connect to Flink SQL Client from NodeJS?

I'm trying to use Apache Flink's Table concept in one of my projects to combine data from multiple sources in real-time. Unfortunately, all of my team members are Node.JS developers. So, I'm looking for possible ways to connect to Flink from NodeJS and query from it. In Flink's documentation for SQL Client, it's mentioned that
The SQL Client aims to provide an easy way of writing, debugging, and submitting table programs to a Flink cluster without a single line of Java or Scala code. The SQL Client CLI allows for retrieving and visualizing real-time results from the running distributed application on the command line.
Based on this, is there any way to connect to Flink's SQL client from NodeJS? Is there any driver already available for this like Node.JS drivers for MySQL or MSSQL. Otherwise, what are the possible ways of achieving this?
Any idea or clarity on achieving this would be greatly helpful and much appreciated.
There's currently not much that you can do. The SQL Client runs on local machines and connects to the cluster there. I think what will help you is the introduction of the Flink SQL Gateway, which is expected to be released with Flink 1.16. You can read more about that on https://cwiki.apache.org/confluence/display/FLINK/FLIP-91%3A+Support+SQL+Gateway
Another alternative is to check out some of the products that offer a FlinkSQL editor on the market, maybe that is useful path for your colleagues.
For example:
https://www.ververica.com/apache-flink-sql-on-ververica-platform
https://docs.cloudera.com/csa/1.7.0/ssb-overview/topics/csa-ssb-intro.html
Note that this is not exactly what you asked for, but could be an option to enable your team.

stubbed cassandra for data storage

I need an embedded cassandra for my project and I was wondering if I can use Stubbed Cassandra for data storage. Because I need a system to simulate CQL requests and responses.
Thanks everyone.
You cant use it as a real datastore. Use real cassandra as a real cassandra datastore. check out ccm which is probably more what your looking for.
There are wrappers for it in dtests (python) and the java driver uses it for testing and has a java wrapper.
I don't really have any experience at all with SCassandra but I worked on several projects using Apache Cassandra and there are some use cases like multidatacenter infrastructure to experiment and I don't think SCassandra can do it. So if you plan to do simple tests, that's fine, But advanced use cases really need to be tested in a real cassandra distribution.
As others have mentioned, you will need the real Cassandra for data storage. However, if you want to test CQL requests/responses then you can use this library:
Cassandra-Spy
It runs an actual embedded Cassandra and also can simulate failures for inserts/selects. This helps you test your app's behaviour in failure cases. I wrote the library to address this specific use case.

Is there an alternative to use Cassandra without PHP-driver?

I know about the Cassandra PHP driver being in BETA. But I strongly believe DataStax offers the best solutions as far as PHP drivers go for Cassandra.
What I would love to try is to see if it's possible to get cassandra data into my PHP application using CQLSH and PHP shell commando's. (both Cassandra and PHP script run on the same server. )
Anyone ever tried this?
Would there be a method to get CQLSH return json or a different output instead of columns fit for my console?
Thanks for your insights.
cqlsh is built using the DataStax python driver. That being said, I would not recommend system calls to cqlsh using OS system calls from php. Not only is it impractical from a data format perspective, it is also hacky, I would not expect it to perform well, and it would be adding a lot of complexity and failure scenarios to your application.
For scalability, if you ever need to move your application to a different machine, you would not be able to. These are just a few of the downsides that I can think of from the top of my head.
You are better off using the beta PHP driver from DataStax or waiting for a stable version. RC1 is due to drop soon.

Can we Use Apache Cassandra instead of JDBC in SpringSocialShowcase

I can run this application with no issues with my sql.
https://github.com/spring-projects/spring-social-samples/tree/master/spring-social-showcase
Can I override the UserConnectionRepository to make this application work with cassandra.
Thanks
You probably don't want to "override" it, but rather create a new repository that provides the same functionality, but instead of JDBC it can use Datastax Cassandra driver for communication with Cassandra cluster. You can then use your new repository in place of the original one. If this project uses dependency injection, it should be 1 line change.
Word of caution, this project is rather basic and contains bad practices. If you just want to get your hands dirty, it's fine, but this is definitely not a good production sample (no error handling, lack of security checks, password stored in clear text etc).

Hector for Cassandra

I can't set up Hector for Cassandra. I've looked through the documentation and the Cassandra wiki. The problem with these docs is that a lot of the information there is outdated, or minimalistic (or I'm lacking knowledge). Anyway, I'm wondering if anyone can provide some rough simplistic guide as to how to go about installing it.
I'm aiming to build a JSP page that can use the Cassandra database.
What I've done so far:
I've downloaded Hector 1.0-2 and Cassandra 1.0.7.
I've set up Cassandra and checked it works (used CLI to create new columns using keys)
Tried unpacking the me.prettyprint.cassandra into the Java project directory but still nothing.
I'm also not sure where to get the thrift API (or how to install it)? And, if i need it at all?
Any help would be appreciated.
As I remember, it was very easy to install Cassandra, and get Hector to work for a basic insert, retrieve example. It's like
Install Cassandra
Create keyspace, and column families from Cassandra CLI.
Create a plain Java Maven project, and add Hector, and Thrift dependencies to it. (Maven is not necessary, I just meant a simple hello-world project here.)
Write insert code, then check into Cassandra using CLI.
Write retrieve query, then see if matches, and slices properly.
But that was Cassandra 0.6.0. Not sure what so hard.
Please look into this tutorial, and you can also see this simple source code for insertion.
If you land into some trouble come with specific problem, it will be much easier that way.
Hope this helps.

Resources