File size: 1,666 Bytes
2795186
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# TinkerGraph

## About TinkerGraph

[TinkerGraph](https://tinkerpop.apache.org/docs/3.2.6/reference/#tinkergraph-gremlin)
is the in-memory reference implementation of the Apache TinkerPop Graph API.
It can be useful with small graphs to prototype out a graph structure and
queries against it. It can also be useful as a comparison when debugging to
help determine whether a particular issue is in the graph traversal logic
or whether it is a JanusGraph-specific issue.

[`TinkerGraphApp.java`](src/main/java/org/janusgraph/example/TinkerGraphApp.java)
is an example Java program that connects to a TinkerGraph. You will notice
the major difference between this an the JanusGraph app is in how the graphs
define schema and indexes. The code to construct and query the graph is exactly
the same.

## TinkerGraph configuration

[`jgex-tinkergraph.properties`](conf/jgex-tinkergraph.properties) contains
the id manager settings for the graph.

Refer to the TinkerGraph [configuration reference](https://tinkerpop.apache.org/docs/3.2.6/reference/#_configuration_3)
for additional properties.

## Dependencies

The required Maven dependency for TinkerGraph:

```
        <dependency>
            <groupId>org.apache.tinkerpop</groupId>
            <artifactId>tinkergraph-gremlin</artifactId>
            <version>${tinkerpop.version}</version>
        </dependency>
```

## Run the example

This command can be run from the `examples` or the project's directory.

```
mvn exec:java -pl :example-tinkergraph
```

## Drop the graph

TinkerGraph is not configured to not store anything into a persistent
location, so the graph will disappear when the application finishes.