dingyiz's picture
Upload folder using huggingface_hub
2795186 verified

TinkerGraph

About TinkerGraph

TinkerGraph 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 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 contains the id manager settings for the graph.

Refer to the TinkerGraph configuration reference 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.