2014-07-25 09:47:13 -04:00
2014-07-23 15:57:34 -04:00
2014-07-10 16:23:54 -04:00
2014-06-04 13:36:21 -04:00
2014-07-25 09:41:41 -04:00
2014-07-15 14:11:42 -04:00

AccumuloGraph

Build Status

This is an implementation of the TinkerPop Blueprints API using Apache Accumulo as the backend. This implementation provides easy to use, easy to write, and easy to read access to an arbitrarily large graph that is stored in Accumulo.

We implement the following Blueprints interfaces:
1. Graph
2. KeyIndexableGraph
3. IndexableGraph

##Code Examples ###Creating a new distributed graph

Configuration cfg = new AccumuloGraphConfiguration()
	.setInstanceName("accumulo").setUser("user").setZookeeperHosts("zk1")
    .setPassword("password".getBytes()).setGraphName("myGraph");
Graph graph = GraphFactory.open(cfg.getConfiguration());

###Creating a new Mock Graph

Setting the instance type to mock allows for in-memory processing with a MockAccumulo instance.
There is also support for Mini Accumulo.

Configuration cfg = new AccumuloGraphConfiguration().setInstanceType(InstanceType.Mock)
	.setGraphName("myGraph");
Graph graph = GraphFactory.open(cfg);

###Accessing a graph

Vertex v1 = graph.addVertex("1");
v1.setProperty("name", "Alice");
Vertex v2 = graph.addVertex("2");
v2.setProperty("name", "Bob");

Edge e1 = graph.addEdge("E1", v1, v2, "knows");
e1.setProperty("since", new Date());

###Creating indexes

((KeyIndexableGraph)graph)
	.createKeyIndex("name", Vertex.class);

###MapReduce Integration

####In the tool

AccumuloConfiguration cfg = new AccumuloGraphConfiguration()
	.setInstanceName("accumulo").setZookeeperHosts("zk1").setUser("root")
	.setPassword("secret".getBytes()).setGraphName("myGraph");

Job j = new Job();
j.setInputFormatClass(VertexInputFormat.class);
VertexInputFormat.setAccumuloGraphConfiguration(j,
	cfg.getConfiguration());

####In the mapper

public void map(Text k, Vertex v, Context c) {
    System.out.println(v.getId().toString());
}

##Table Design ###Vertex Table

Row ID Column Family Column Qualifier Value
VertexID Label Flag Exists Flag [empty]
VertexID INVERTEX OutVertexID_EdgeID Edge Label
VertexID OUTVERTEX InVertexID_EdgeID Edge Label
VertexID Property Key [empty] Serialized Value
###Edge Table
Row ID Column Family Column Qualifier Value
--- --- --- ---
EdgeID Label Flag InVertexID_OutVertexID Edge Label
EdgeID Property Key [empty] Serialized Value
###Edge/Vertex Index
Row ID Column Family Column Qualifier Value
--- --- --- ---
Serialized Value Property Key VertexID/EdgeID [empty]

###Metadata Table

Row ID Column Family Column Qualifier Value
Index Name Index Class [empty] [empty]
##Advanced Configuration
###Basic Accumulo Control
TODO
###Advanced Accumulo Control
TODO
###Caching
TODO
###Preloading
TODO
Description
No description provided
Readme Apache-2.0 962 KiB
Languages
Java 100%