https://github.com/nosan/embedded-cassandra
Embedded Cassandra
https://github.com/nosan/embedded-cassandra
embedded-cassandra java
Last synced: 7 days ago
JSON representation
Embedded Cassandra
- Host: GitHub
- URL: https://github.com/nosan/embedded-cassandra
- Owner: nosan
- License: apache-2.0
- Created: 2018-06-19T10:42:30.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2025-03-30T11:38:19.000Z (15 days ago)
- Last Synced: 2025-03-30T12:26:44.735Z (15 days ago)
- Topics: embedded-cassandra, java
- Language: Java
- Homepage:
- Size: 69.3 MB
- Stars: 78
- Watchers: 4
- Forks: 15
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-java - Embedded Cassandra
README
Embedded Cassandra
===========
## Getting Started
Embedded Cassandra provides an easy way to start and stop [Apache Cassandra](https://cassandra.apache.org).
To learn more about Embedded Cassandra, please consult
the [reference documentation](https://nosan.github.io/embedded-cassandra/5.0.1).All versions of Embedded Cassandra reference documentation are [here](https://nosan.github.io/embedded-cassandra).
Here is a quick teaser of starting Cassandra:
```xml
com.github.nosan
embedded-cassandra
5.0.1
```
```java
import java.net.InetSocketAddress;import com.datastax.oss.driver.api.core.CqlSession;
import com.github.nosan.embedded.cassandra.Cassandra;
import com.github.nosan.embedded.cassandra.CassandraBuilder;
import com.github.nosan.embedded.cassandra.Settings;
import com.github.nosan.embedded.cassandra.cql.CqlScript;public class CassandraExample {
public static void main(String[] args) {
Cassandra cassandra = new CassandraBuilder().build();
cassandra.start();
try {
Settings settings = cassandra.getSettings();
try (CqlSession session = CqlSession.builder()
.addContactPoint(new InetSocketAddress(settings.getAddress(), settings.getPort()))
.withLocalDatacenter("datacenter1")
.build()) {
CqlScript.ofClassPath("schema.cql").forEachStatement(session::execute);
}
}
finally {
cassandra.stop();
}
}}
```## Issues
`Embedded Cassandra` uses GitHub's issue tracking system to report bugs and feature requests. If you want to raise an
issue, please follow this [link](https://github.com/nosan/embedded-cassandra/issues)Also see [CONTRIBUTING.md](CONTRIBUTING.md) if you wish to submit pull requests.
## Build
`Embedded Cassandra` can be easily built with the [maven wrapper](https://github.com/takari/maven-wrapper). You also
need `JDK 11`.## License
Embedded Cassandra is released under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0)