Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Wasantha Herath

    Hi all,

    As per the official documentation it does not recommends to enable database level cache in a distributed setup as cached data does not share amoung instances.
    Any suggestions for a solution/workaround where i can see the data changes from other JG instances immediately and avoid stale data access ?

    Harshit Sharma

    Hi Team,

    I want to mask the Id field generated by graph DB (Janusgraph) with my custom filed entityId.
    For example - Querying g.V(id) should resolve to g.V().has(entityId, id).

    Is there a way we can do so?

    2 replies
    Javier Ramos

    I'm getting an java.lang.StackOverflowError in the gremlin server when inserting several vertices in a single query. The query is not that big. This is the error:
    at org.codehaus.groovy.classgen.asm.WriterController.isNotClinit(WriterController.java:255)
    at org.codehaus.groovy.classgen.asm.CallSiteWriter.prepareCallSite(CallSiteWriter.java:232)...

    When I reduce the size of the query (either by decreasing the number of vertices or edges) it works fine.

    Any idea what could be the issue? is there anything I can configure in JanusGraph?

    I'm using ScyllaDB (Casandra) as a backend with ElasticSearch.

    Serhii Zadorozhnyi
    hi guys, we updated janugraph from 0.5.1 to 0.6.1 for testing purposes, in our benchmarks performance dropped 2 times, is it expected, or new version should be tunned somehow?
    Any thoughts on multi-tenant application design with JanusGraph? Is gremlin's PartitionStrategy feasible and scalable solution to achieve multi-tenancy with single node cassandra cluster as storage backend?
    I am trying to add a Edge Index to my graph from gremlin console but i receive the following issue.
    mgmt.buildEdgeIndex(gate_to, 'GateToEdges', Direction.BOTH, Order.incr, stargate_id)
    No such property: incr for class: org.apache.tinkerpop.gremlin.process.traversal.Order
    2 replies
    Hello Everyone, I'm seeing very poor performance when quering on graph. When query staring, there are bunch of following messages print out. Not understanding what cause that. Anyone who help point me what does those messages mean?
    Guava vertex cache size: requested=20000 effective=20000 (min=100)
    Created dirty vertex map with initial size 32
    Created vertex cache with max size 20000
    Doug Whitfield
    Is there any reason why you would be able to query in client mode but not server mode? This is 0.5.3

    Hey all. Is it possible to run JanusGraph without search/index? I'm unable to access via javascript and through the gremlin console I'm seeing:

    gremlin-groovy is not an available GremlinScriptEngine

    Doug Whitfield
    @paulm17 what version? you need to have a .properties file available in the gremlin-server.yaml or you will get that error

    I'm trying to enable JMX Remote profiling on a janugraph instance running inside kubernetes, I'm using the official image (janus 0.5) with a custom startup script where I've added the following config key:

         -Dcom.sun.management.jmxremote.port=8080 \
         -Dcom.sun.management.jmxremote.ssl=false \

    But I can't attach any JMX compatible profiler to this port, as if nothing changed when I added those option.
    What would be the best way to profile a remote janusgraph instance ?

    Everly Okorji
    Hi all. I am using JanusGraph with FoundationDB/Elasticsearch, and I am looking into the reindexing operation. I would like to know if JanusGraph supports a reindexing operation that recreates a deleted secondary (i.e. Elasticsearch) index, and what conditions it needs to support this flow. Any info would be helpful!
    Uche Ozoemena
    Is it possible to use mongodb as a storage backend for JanusGraph? I'm new to janusgraph so please bear with me and feel free to explain anything obvious that I may be missing. It appears Mongodb and janusgraph are entirely different types of databases but I’m just wondering if there’s a known way to make janusgraph work with data that’s already stored in mongodb. Elastic search is a common indexing backend for janusgraph, and is commonly used with mongodb as well. So I’m considering if it’s possible to use all 3 together. Thanks!
    Also is it possible to use elastic search as a storage backend too? I know it's one of the recommended options as an indexing backend, but how about using it as the storage backend too?
    Brian Ghigiarelli

    Regarding defensive coding in a lambda function for JanusGraph 0.6.0...

    if we have a vertex that may or may not have a set property on it, what's the best way to check whether some incoming array contains all of the elements of that property? If the vertex does not include the property, it should return "true" as though the property contained an empty array.

    The equivalent JSON example is:
    { name: 'One', foo: ['one', 'two'] } should pass because both elements are covered
    { name: 'Two', foo: [] } should pass because there are no elements to cover
    { name: 'Three' } should pass, but fails because the property is missing
    { name: 'Four', foo: ['one', 'bar'] } should fail because 'bar' is not covered

    This lambda seems to work when the property exists, even when it has no values. It does not work when they property does not exist. This example is for NPM's gremlin client, so using JavaScript.

    g.V().has(...).filter(() => `{ x -> ['one', 'two'].containsAll(x.get().values('foo').collect()) }`)
    8 replies
    Mozart Brocchini
    This message was deleted

    When starting at a very large super node (around 700,000 incident edges) and querying for vertices that are 2 hops away, JanusGraph always times out for me. The gremlin query executed looks something like

    g.V(SOURCE_VERTEX_ID).out(EDGE_LABEL_1).outE(EDGE_LABEL_2).where(__.inV().hasId(P.within([VERTEX_ID_1, VERTEX_ID_2, ..., VERTEX_ID_N])))

    My understanding of the execution above query is that 700,000 traversers would spawn after the out(EDGE_LABEL_1) step, then using the indices that JG maintains for each edge and their adjacent vertices, each traverser would do a single index look up.

    Is that description accurate? If so, why is it timing out? Is the size too much for JG to handle?

    If the description is inaccurate, how is JG actually executing the query? Are the indices for vertex ids not being utilized? And do you have any suggestions for getting this type of 2 hop query to run without timeout?

    Does anyone have experience using the profile step in NPM's gremlin client? When I print out the response of the profile step, I am getting the following JSON, which isn't helpful for optimizing queries.
      '@type': 'g:Map',
      '@value': [
        { '@type': 'g:Double', '@value': 102.246446 },
        { '@type': 'g:List', '@value': [Array] }

    1)Do we have a fix for the log4j vulnerability now? I see that the latest released version [0.6] also has 1.2.16 log4j jar. I saw a commit of upgrading from log4j1 to log4j2 in the upcoming release though. When can we see the release live?

    2) Will 0.5.2 be compatible with Log4j2, if we kind of replace the log4j binary?

    10 replies
    Matthias Leinweber

    I am trying to get FulgoraGraphComputer working. But i have the default schema maker disabled. And i get

    2022-04-29 21:15:13,960 ERROR (Thread-100) [org.janusgraph.diskstorage.keycolumnvalue.scan.StandardScannerExecutor] - Exception processing row [0x5800000001F9EA80]: 
    java.lang.IllegalArgumentException: Undefined type used in query: gremlin.traversalVertexProgram.haltedTraversers
        at org.janusgraph.graphdb.query.QueryUtil.getType(QueryUtil.java:89)
        at org.janusgraph.graphdb.query.vertex.BasicVertexCentricQueryBuilder.constructQueryWithoutProfile(BasicVertexCentricQueryBuilder.java:514)
        at org.janusgraph.graphdb.query.vertex.BasicVertexCentricQueryBuilder.constructQuery(BasicVertexCentricQueryBuilder.java:447)
        at org.janusgraph.graphdb.query.vertex.VertexCentricQueryBuilder.execute(VertexCentricQueryBuilder.java:73)
        at org.janusgraph.graphdb.query.vertex.VertexCentricQueryBuilder.properties(VertexCentricQueryBuilder.java:105)
        at org.janusgraph.graphdb.vertices.AbstractVertex.properties(AbstractVertex.java:198)
        at org.janusgraph.graphdb.vertices.PreloadedVertex.properties(PreloadedVertex.java:123)
        at org.apache.tinkerpop.gremlin.structure.Vertex.property(Vertex.java:70)
        at org.apache.tinkerpop.gremlin.process.computer.traversal.TraversalVertexProgram.execute(TraversalVertexProgram.java:268)
        at org.janusgraph.graphdb.olap.computer.VertexProgramScanJob.process(VertexProgramScanJob.java:103)
        at org.janusgraph.graphdb.olap.VertexJobConverter.process(VertexJobConverter.java:114)
        at org.janusgraph.diskstorage.keycolumnvalue.scan.StandardScannerExecutor$Processor.run(StandardScannerExecutor.java:249)

    I assume somhow the haltedTraversers are a unknownd edge? This somehow seems odd. Am i doing someting wrong?

    5 replies
    Hi! I'm trying to get a simple graph demo to work with Cassandra as the data storage layer. Using docker for the JanusGraph server and a separate docker for a Gremlin console. I'm doing this:
    gremlin> JanusGraph graph = JanusGraphFactory.build().set("storage.backend", "cql").set("storage.hostname", "").open();
    gremlin> graph
    Why is the "graph" object not pointing to the cql janusgraph?
    Im trying to run a long insert query that adds vertices and edges. Problem is that i get
    at org.codehaus.groovy.classgen.asm.InvocationWriter.makeDirectCall(InvocationWriter.java:335)
    at org.codehaus.groovy.classgen.asm.InvocationWriter.makeCall(InvocationWriter.java:439)
    at org.codehaus.groovy.classgen.asm.InvocationWriter.makeCall(InvocationWriter.java:150)
    at org.codehaus.groovy.classgen.asm.InvocationWriter.makeInvokeMethodCall(InvocationWriter.java:124)
    at org.codehaus.groovy.classgen.asm.InvocationWriter.writeInvokeMethod(InvocationWriter.java:509)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitMethodCallExpression(AsmClassGenerator.java:868)
    at org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:68)
    at org.codehaus.groovy.classgen.asm.CallSiteWriter.prepareSiteAndReceiver(CallSiteWriter.java:254)
    at org.codehaus.groovy.classgen.asm.CallSiteWriter.prepareSiteAndReceiver(CallSiteWriter.java:243)
    at org.codehaus.groovy.classgen.asm.CallSiteWriter.makeCallSite(CallSiteWriter.java:291)
    at org.codehaus.groovy.classgen.asm.InvocationWriter.makeCachedCall(InvocationWriter.java:352)
    at org.codehaus.groovy.classgen.asm.InvocationWriter.makeCall(InvocationWriter.java:442)
    at org.codehaus.groovy.classgen.asm.InvocationWriter.makeCall(InvocationWriter.java:150)
    at org.codehaus.groovy.classgen.asm.InvocationWriter.makeInvokeMethodCall(InvocationWriter.java:124)
    at org.codehaus.groovy.classgen.asm.InvocationWriter.writeInvokeMethod(InvocationWriter.java:509)

    Hi, I am trying to use JanusGraph's Vertex-centric index for vertex ids as described in the "Using vertex-centric indexes on adjacent vertex ids" section of the documentation. I ran the following traversal


    The profiler outputted

    Step                                                               Count  Traversers       Time (ms)    % Dur
    GraphStep(vertex,[2169061424])                                         1           1           0.912    60.31
    JanusGraphMultiQueryStep                                               1           1           0.007     0.52
    JanusGraphVertexStep(IN,[edgeLabel],vertex)                                               0.588    38.87
      optimization                                                                                 0.042
      backend-query                                                        0                       0.511
    IsStep(eq([GraphStep(vertex,[571703520])]))                                                    0.004     0.31
                                                >TOTAL                     -           -           1.513        -

    I am expecting the profiler to display VertexCentricQuery as per the profiler enhancements. Is there an issue with the traversal or is there some JanusGraph configuration needed to use vertex-centric indices on vertex ids? Thanks!

    11 replies
    Florian Hockmann
    We are currently evaluating whether we want to migrate from Gitter to Discord as the chat platform for JanusGraph. Would people here prefer Discord over Gitter? Or would you rather stay here on Gitter? Tell us what you think, either here or on our janusgraph-users mailing list
    Jordan Kasper
    Being my first time here, I found it easy to use... but I'm also on Discord, so either works. No preference
    Question: is there a tool people are using to generate a visualization of their graph schema?
    6 replies

    Hello. I have a question about a potentially unconventional JanusGraph setup: How viable is it to run multiple separate JanusGraph instances that share the same index and storage backend? Each instance will not be clustered with each other in the documented way of using remote-objects.yaml. I do have the ability to limit each JanusGraph instance to only working with a particular graph.

    Is there any reason why this shouldn't work? Would JanusGraph's that do not know of each other, but share an index/storage backend clash with each other in any way?

    1 reply
    Vasanth kumar
    Hi, Using Janusgraph 0.3.1, facing issue while quering with indexed fields.
    1. Only few vertices returned with this query=g.V().has("idxF1","value1").has("idxF2","value2");
    2. With single index query returns all the vertices = g.V().has("idxF2","value2");
      Property keys=idxF2,idxF1 Graph index=idxF1IdxF2
      Please help in troublshooting these vertex/index. I dont see above issue 0.4.1 but now cannot change dependency.
    1 reply
    Does anyone know the environment variable for Gremlin Server that corresponds to the block-size variable for batch IDs?
    Nikita Pande
    hi all, I am trying to add logs in vertex program, but cant d=find them on spark executors or janusgraph
    1 reply
    How to get vertex prograam logs?
    Josiah Wolf Oberholtzer
    Is there any timeline for supporting TinkerPop 3.6.x?
    3 replies

    Getting permanent lock exception when I'm trying to ingest the data to the Janusgraph through dataflow (java)

    Backend used: Big table
    Search: Elasticsearch

    The exception stack trace:

    org.janusgraph.diskstorage.locking.PermanentLockingException: Local lock contention
    at org.janusgraph.diskstorage.locking.AbstractLocker.writeLock(AbstractLocker.java:327)
    at org.janusgraph.diskstorage.locking.consistentkey.ExpectedValueCheckingStore.acquireLock(ExpectedValueCheckingStore.java:103)
    at org.janusgraph.diskstorage.keycolumnvalue.KCVSProxy.acquireLock(KCVSProxy.java:51)
    at org.janusgraph.diskstorage.BackendTransaction.acquireIndexLock(BackendTransaction.java:255)
    at org.janusgraph.graphdb.database.StandardJanusGraph.prepareCommit(StandardJanusGraph.java:591)
    at org.janusgraph.graphdb.database.StandardJanusGraph.commit(StandardJanusGraph.java:712)
    at org.janusgraph.graphdb.transaction.StandardJanusGraphTx.commit(StandardJanusGraphTx.java:1438)
    at org.janusgraph.graphdb.tinkerpop.JanusGraphBlueprintsGraph$GraphTransaction.doCommit(JanusGraphBlueprintsGraph.java:297)
    at org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction.commit(AbstractTransaction.java:104)

    2 replies
    using the JG version 0.6
    Oleksandr Porunov

    The JanusGraph Technical Steering Committee is excited to announce the release of JanusGraph 0.6.2.

    JanusGraph is an Apache TinkerPop enabled property graph database with support for a variety of storage and indexing backends. Thank you to all of the contributors.

    The release artifacts can be found at this location:

    A full binary distribution is provided for user convenience:

    A truncated binary distribution is provided:

    The online docs can be found here:

    To view the resolved issues and commits check the milestone here:

    Thank you very much,
    Oleksandr Porunov
    on behalf of JanusGraph TSC


    Hello :wave:

    Can anyone educate me on how to set the ids.block-size variable? (https://docs.janusgraph.org/operations/bulk-loading/#configuration-options). When I include it in a properties file, I get the following:

    Local setting ids.block-size=1000000 (Type: GLOBAL_OFFLINE) is overridden by globally managed value (10000). Use the ManagementSystem interface instead of the local configuration to control this setting.

    Can this not be set through configuration? If so, how do I set this?

    3 replies
    Doug Whitfield

    We have discovered the following:

    "gremlin-server-exec-4" #134 prio=5 os_prio=0 tid=0x00007f6d48004800 nid=0x171a4a runnable [0x00007f6cd05ef000]
    java.lang.Thread.State: RUNNABLE

    Locked ownable synchronizers:

    - <0x00007f6ecc104b30> (a java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync)
    - <0x00007f6ecee7c9b8> (a java.util.concurrent.ThreadPoolExecutor$Worker)

    These 11 threads are waiting on gremlin-server-exec-4 to give up that lock:
    gremlin-server-exec-2, gremlin-server-exec-60, gremlin-server-exec-58, gremlin-server-exec-54, gremlin-server-exec-49, gremlin-server-exec-47, gremlin-server-exec-43, gremlin-server-exec-32, gremlin-server-exec-16, gremlin-server-exec-14, gremlin-server-exec-12

    What would be the next steps for figuring out how to rectify this situation?


    I have setup janusgraph with scylladb as backend. Im new to janusgraph, would appreciate a little help on this.

    My graph structure has some vertices having a relationship with each other. So i have a model that let you add an edge between two given vertex types, if their is a property having same value in both vertices. I have a global index on property 'KType'

    For example we have two sets of vertices. One with property('KType', 'nodeA') and the other set with property('KType', 'nodeB'). Now i want add an edge 'A.B' between them if A.property('propertyA', 'sameValue') is equal to B.property('propertyB', 'sameValue').

    my query looks something like this.
    g.V().has('KType', 'nodeA').as('from').values('propertyA').as('fromValue').V().has('KType', 'nodeB').as('to').values('propertyB').as('toValue').where('fromValue', eq('toValue')).select('to').coalesce(__.inE('A.B').where(outV().as('from')), addE('A.B').from('from').to('to').property('Weight', 1d).property('KType', 'A.B'))

    now this query works for vertices that are low in number (< 100) but for others which are lets say 4000+ vertices times out at 10 minutes evaluation timeout.

    Is there a way i could optimise this query to run below 30s latency because even 4k nodes is a very small number which we have in dev but for production we will have probably close to a million nodes per 'KType'.

    Thank you so much.

    3 replies
    Doug Whitfield
    is there a benchmark tool for JanusGraph? Something where you can easily twiddle nobs like JMeter or something? The website notes it as something one might want to do ("Hence, use INFO severity or higher for production systems or benchmarking."), but there is no information on how one might go about doing it
    Doug Whitfield
    unclear to me how to use https://github.com/JanusGraph/janusgraph/blob/7adbba6249476c534699f5c00507a67d889e6ea0/.github/workflows/ci-benchmark.yml but this leads me to a potentially interesting (for my issue) question. I see the CI benchmarks are run against Java 8...but what version? My suspicion is that there is a JVM bug here, but I have thus far not gotten anyone to listen. Perhaps know what JanusGraph is tested against would be helpful for getting the JVM upgrade from 8 b201
    Florian Hockmann

    That ci-benchmark.yml file is indeed the configuration for CI. In the logs of such a CI job, I can see this:

        BUILD_MAVEN_OPTS: -DskipTests=true --batch-mode --also-make
        JAVA_HOME_8.0.332_x64: /opt/hostedtoolcache/jdk/8.0.332/x64
        JAVA_HOME: /opt/hostedtoolcache/jdk/8.0.332/x64
        JAVA_HOME_8_0_332_X64: /opt/hostedtoolcache/jdk/8.0.332/x64

    So, it looks like it currently uses Java 8.0.332

    Regarding running your benchmarks, there are some tools written by the community like this one for example: https://github.com/rngcntr/janusbench
    but the general recommendation is that you benchmark JanusGraph with traversals that are typical for your use case and ideally with data that is as close as possible to your production data
    Doug Whitfield
    @FlorianHockmann thanks!
    Boxuan Li
    Just a gentle reminder: JanusGraph now has a Discord server (https://discord.gg/5n4fjv4QAf) and it is more likely that you get an answer there :)
    Amit Kumar Yadav
    Can anyone help to getting the subgraph path using java ?
    Hi All , We are trying to clone the graph and save back to JanusGraph . Need help how to save back to JanusGraph after clone . we have used following code for cloning GraphTraversal rr = g.V().asAdmin().clone(); . We have cluster & g objects on JansuGraph connection.
    Matthias Leinweber

    i am searching for best practice guide for config settings:
    scylla cql connections settings
    tinkerpop client connection settings (minConnectionPoolSize and so on)

    Does someone has a resource or a good example?

    Anshul Mehta
    Can I change the name of the elasticsearch index to which janusgraph should commit the changes? Example - I created a mixed index named "test-1" which created an index elasticsearch with the same name. Now whenever I will create new vertices/edges and commit the changes, the relevant updates will be pushed to elasticsearch "test-1" index. Now I want janusgraph to push the changes to the "test-2" index instead of "test-1", How can I achieve this?
    Makar Selivanov
    Hello, can someone help me? I want to load csv dataset in Janusgraph with groovy scipt and i get error like no such property for variables. How can i fix it?
    My code is:
    def janusgraph = System.getenv('JANUSGRAPH_HOME') ?: '~/'
    def graph = JanusGraphFactory.open(janusgraph + '/conf/janusgraph-inmemory.properties')
    //                                  ^ didnt work, no such proprerty?
    def g = graph.traversal()
    getOrCreate = {
        Integer id, name -> g.V().has('ID', id).tryNext().orElseGet { g.addV('ID', id).property('Name', name).next() }
    new File(janusgraph + '/databases/vertexs.csv').eachLine { line, index ->
        if (index != 0 && line != null && line.trim().length() > 0) {
            (id, name) = line.split(',')
            getOrCreate(id as Integer, name)
    new File(janusgraph + '/databases/edges.csv').eachLine { line, index ->
        if (index != 0 && line != null && line.trim().length() > 0)
            (id_edge, id_from, id_to) = line.split(',')
            fromVertex = g.V().has('ID', id_from).tryNext()
            toVertex = g.V().has('ID', id_to).tryNext()
            fromVertex.addEdge('friend', toVertex)
            toVertex.addEdge('friend', fromVertex)
    Makar Selivanov
    This is error that i got
    gremlin> :load databases/load_vertexs_and_edges.groovy
    No such property: janusgraph for class: Script23
    Type ':help' or ':h' for help.
    Display stack trace? [yN]y
    groovy.lang.MissingPropertyException: No such property: janusgraph for class: Script23
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:65)
        at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:51)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:309)
        at Script23.run(Script23.groovy:1)
        at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:676)
        at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:378)
        at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233)
        at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$0(GremlinExecutor.java:272)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)