1

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.

M. Afathi
  • 65
  • 1
  • 4

3 Answers3

1

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.

Chris Lohfink
  • 16,150
  • 1
  • 29
  • 38
0

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.

Maximilien Belinga
  • 3,076
  • 2
  • 25
  • 39
  • I am not planning to use scassandra for testing but as a local system to store my data. Is that possible ? Or it offers only testing methods ? – M. Afathi Mar 10 '17 at 11:58
  • Which kind of data do you plan to store? I ask it because there can be other databases taylored for your needs. Do you plan to use it in production? According to the docs, `Stubbed Cassandra is an open source tool that enables you to test applications that use Cassandra in a quick, deterministic way. It is especially aimed edge case testing such as read and write timeouts.`. My guess is that it's only for testing purposes. – Maximilien Belinga Mar 10 '17 at 12:09
  • Yes, I understand that scassandra was designed for testing purpose. But, I want to use as a real cassandra to store data in a local machine. I don't know if that is possible. I don't want to reinstall cassandra in my machine and configure it, i want to make a use of scassandra since it runs an instance of cassandra without any installation – M. Afathi Mar 10 '17 at 13:56
0

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:

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.

Andrejs
  • 26,885
  • 12
  • 107
  • 96