With Docker containers, how do setup Apache Cassandra to work with Docker?
I need to setup an external JanusGraph to handle tens of millions of records.
I'm new to Cassandra, JanusGraph, and Graph-Databases in-general.
docker run -d -p 8182:8182 janusgraph/janusgraph
docker run --name jg-cassandra -d -e CASSANDRA_START_RPC=true -p 9160:9160
-p 9042:9042 -p 7199:7199 -p 7001:7001 -p 7000:7000 cassandra:3.11
JanusGraph janusGraph = JanusGraphFactory.build().set("storage.backend", "cql").set("storage.hostname", "localhost:9042").open();
JanusGraphFactory
-instance to connect to Cassandra-docker-containerjava.lang.Throwable: Hook creation trace
at org.janusgraph.graphdb.database.StandardJanusGraph.<init>(StandardJanusGraph.java:250) [janusgraph-core-1.0.0-20230424-065649.dcd3240.jar:?]
at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:176) [janusgraph-core-1.0.0-20230424-065649.dcd3240.jar:?]
at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:147) [janusgraph-core-1.0.0-20230424-065649.dcd3240.jar:?]
at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:137) [janusgraph-core-1.0.0-20230424-065649.dcd3240.jar:?]
at org.janusgraph.core.JanusGraphFactory$Builder.open(JanusGraphFactory.java:277) [janusgraph-core-1.0.0-20230424-065649.dcd3240.jar:?]
at Main.main(Main.java:10) [classes/:?]
// Main
import org.janusgraph.core.JanusGraph;
import org.janusgraph.core.JanusGraphFactory;
public class Main {
public static void main(String[] args) {
JanusGraph janusGraph = JanusGraphFactory.build().set("storage.backend", "cql").set("storage.hostname", "localhost:9042").open();
janusGraph.close();
}
}
<!-- pom.xml -->
<dependencies>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j2-impl</artifactId>
<version>2.20.0</version>
</dependency>
<dependency>
<groupId>org.janusgraph</groupId>
<artifactId>janusgraph-core</artifactId>
<version>1.0.0-20230424-065649.dcd3240</version>
</dependency>
<dependency>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>gremlin-core</artifactId>
<version>3.6.2</version>
</dependency>
<dependency>
<groupId>org.janusgraph</groupId>
<artifactId>janusgraph-cql</artifactId>
<version>1.0.0-20230428-082704.5159135</version>
</dependency>
</dependencies>
That stack trace is for debugging purposes and is not an error. See StandardTitanGraph java.lang.Throwable: Hook creation trace error