Database Reference
In-Depth Information
<dependency>
<groupId>com.thinkaurelius.titan</groupId>
<artifactId>titan-all</artifactId>
<version>0.4.4</version>
</dependency>
The latest Titan release at the time of writing is version 0.5.0. For Cassandra, Titan
relies on Netflix's Astyanax Thrift client. The latest version of the TitanGraph API sup-
ports Astyanax's 1.56.37 version. Please note that you may end up in dependency is-
sues if a different version of Astyanax Thrift is being used in a project for other
Cassandra-related implementations. This means support of CQL would also be very
limited with Astyanax Thrift client support. Features specific to CQL3 (e.g., collec-
tions) may not work properly with this version of Astyanax.
With Cassandra running on remote machines over multiple nodes, we can configure
those remote nodes with Titan with a comma-separated list of IP addresses.
Cassandra for Backend Storage
As discussed above, Cassandra can be used as a storage backend with Titan. In this
section, we will configure Titan storage options, including using Cassandra, and open a
graph instance. In the following “Use Cases” section, we will demonstrate how to use
Titan with Cassandra, such as with writing and reading from the graph, via some
simple exercises.
1.
The first thing is that we need to configure Titan for some storage op-
tions:
import
org.apache.commons.configuration.BaseConfiguration;
import
org.apache.commons.configuration.Configuration;
import
com.thinkaurelius.titan.core.TitanFactory;
import
com.thinkaurelius.titan.core.TitanGraph;
import
com.thinkaurelius.titan.core.TitanKey;Configuration
conf = new BaseConfiguration();
Search WWH ::




Custom Search