Skip to content

Latest commit

 

History

History
17 lines (15 loc) · 1007 Bytes

Neo4jHa-implementation.textile

File metadata and controls

17 lines (15 loc) · 1007 Bytes

```xml

com.tinkerpop.blueprints
blueprints-neo4j-graph
??

```

```java
Map<String, String> configuration = new HashMap<String, String>();
configuration.put(“ha.machine_id”, “1”);
configuration.put(“ha.server”, “localhost:6001”);
configuration.put(“ha.zoo_keeper_servers”, “localhost:2181,localhost:2182,localhost:2183”);
Graph graph = new Neo4jHaGraph(“/tmp/neo4j”, configuration);
```

Neo4jHaGraph provides support for the Neo4j High Availability Cluster which provides a fault-tolerant database structure and horizontal scaling capability. Instantiating the Neo4jHaGraph class requires several configuration elements as shown in the sample above as well as a running Zookeeper cluster for HA coordination. Setting up the cluster is described here.