Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Hi all, I am deploying Janusgraph as a embedded server (0.5.1). Now I'd like to compute data using spark. I read the instruction of integrating to Hadoop but I cannot find out how to connect from an embedded server. I deploy janusgraph app in Kubernetes. Does anyone have any experience on this? Please help
    3 replies

    Hi all, I am using Janusgraph 0.5.2 and trying to connect to spark. (backend: cassandra: cql). My Config as bellow

    But I got the error: Username/Password of Cassandra is correct. I think my config is missing somthing
    18:05:42.869 [cluster1-nio-worker-0] DEBUG com.datastax.driver.core.Connection - Connection[/, inFlight=0, closed=true] has already terminated
    18:05:42.869 [SparkGraphComputer-boss] DEBUG com.datastax.driver.core.Cluster - Shutting down
    18:05:45.090 [cluster1-nio-worker-0] DEBUG io.netty.buffer.PoolThreadCache - Freed 3 thread-local buffer(s) from thread: cluster1-nio-worker-0
    Exception in thread "main" java.lang.IllegalStateException: com.datastax.driver.core.exceptions.AuthenticationException: Authentication error on host / Host / requires authentication, but no authenticator found in Cluster configuration
    at org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.VertexProgramStep.processNextStart(VertexProgramStep.java:88)
    at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
    at org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:50)
    at org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.ComputerResultStep.processNextStart(ComputerResultStep.java:68)
    at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.next(AbstractStep.java:128)
    at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.next(AbstractStep.java:38)
    at org.apache.tinkerpop.gremlin.process.traversal.Traversal.fill(Traversal.java:181)
    at org.apache.tinkerpop.gremlin.process.traversal.Traversal.toList(Traversal.java:119)
    at com.seminetwork.janusgraph.analytics.computer.SparkComputer.main(SparkComputer.java:46)
    Caused by: java.util.concurrent.ExecutionException: com.datastax.driver.core.exceptions.AuthenticationException: Authentication error on host / Host / requires authentication, but no authenticator found in Cluster configuration
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:192)
    at org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.VertexProgramStep.processNextStart(VertexProgramStep.java:68)
    ... 8 more
    Caused by: com.datastax.driver.core.exceptions.AuthenticationException: Authentication error on host / Host / requires authentication, but no authenticator found in Cluster configuration
    at com.datastax.driver.core.ExtendedAuthProvider$NoAuthProvider.newAuthenticator(ExtendedAuthProvider.java:71)

    1 reply
    Hi i have a query that is taking me a lot of time 200 + ms , i see that the optimization step is taking time , could you give me some suggessions on how to go about improving this query

    gremlin> g.V().has('/location/location/geolocation',geoWithin(Geoshape.circle(52.1813736,-9.5367619,1))).choose(values('/location/poi/type_id')).option('1106001',elementMap()).profile()
    ==>Traversal Metrics

    Step Count Traversers Time (ms) % Dur

    JanusGraphStep([],[/location/location/geolocati... 3 3 179.721 76.37
    _condition=(/location/location/geolocation geoWithin BUFFER (POINT (-9.536762 52.181374), 0.008993))
    _query=(/location/location/geolocation geoWithin BUFFER (POINT (-9.536762 52.181374), 0.008993)):
    optimization 3.516
    optimization 94.261
    backend-query 3 93.789
    _query=mix_location_location_geolocation_DEFAULT:(/location/location/geolocation geoWithin BUFFER (POIN
    T (-9.536762 52.181374), 0.008993))
    ChooseStep([JanusGraphPropertiesStep([/location... 2 2 55.617 23.63
    JanusGraphPropertiesStep([/location/poi/type_... 3 3 22.800
    optimization 6.021
    optimization 0.101
    optimization 0.106
    ElementMapStep 2 2 0.025
    EndStep 2 2 0.071

                                            >TOTAL                     -           -         235.338        -
    Matthias Leinweber
    I am quite new to Janusgraph i loaded some vertexes into the database.
    if i do a g.V().count() ill get a timeout after a while. Every subsequent query results directly into the timeout msg. (using berkleyj+lucene) less then 100k V
    2 replies

    i am trying to improve the performance of the following gremlin query on the janus graph database.

    g.V().has("/location/poi/address",textContains("Okhla Industrial Area Phase I")).has("/location/poi/type_id","0802004")

    so i am trying to create a mixed index on the two properties location/poi/address and /location/poi/type_id , when i try to do this and execute
    the following command , i get the following

    gremlin> ManagementSystem.awaitGraphIndexStatus(graph, 'addressTypeId').call()
    ==>GraphIndexStatusReport[success=false, indexName='addressTypeId', targetStatus=[REGISTERED], notConverged={/location/poi/address=INSTALLED, /location/poi/type_id=INSTALLED}, converged={}, elapsed=PT1M0.308S]

    , not that the command was not successfull

    I read some blogs which suggested me to close the open transactions and instances , The followinga are the instances

    I tried deleting the instances using the following command with no luck ,

    gremlin> all_instances = mgmt.getOpenInstances()
    gremlin> for(i=all_instances.size()-1;i>=0;i--) {if(all_instances[i].indexOf('current')!=-1){continue;}; mgmt.forceCloseInstance(all_instances[i]); };

    i still get the same failure on the
    ManagementSystem.awaitGraphIndexStatus(graph, 'addressTypeId').call() call
    ==>GraphIndexStatusReport[success=false, indexName='addressTypeId', targetStatus=[REGISTERED], notConverged={/location/poi/address=INSTALLED, /location/poi/type_id=INSTALLED}, converged={}, elapsed=PT1M0.308S]

    please help resolve this

    Matthias Leinweber
    is there any chance to add a custom lucene analyzer? basically i need a lowercase filter + whitespace tokenizer.. afaik its possible to create a lucene analyzer by configuration. Is there a way in janusgraph?
    Fred Eisele
    I see there are reserved words which may not be used as labels https://github.com/JanusGraph/janusgraph/blob/master/docs/basics/technical-limitations.md#reserved-keywords.
    What other limitations on labels names are there?
    I see that there are reserved characters, e.g. '{}' are not allowed.
    I am not finding a comprehensive description of the allowed characters.
    1 reply
    Matthias Leinweber
    Graph [graph] configured at [/etc/opt/janusgraph/janusgraph.properties] could not be instantiated and will not be available in Gremlin Server. GraphFactory message: GraphFactory could not instantiate this Graph implementation [class org.janusgraph.core.JanusGraphFactory].
    i have no idea how i could solve this
    2 replies

    Hi Team,

    can you please tell whether janusgraph support latest elasticsearch 7.9.2 version? if no, when will be the next release of janusgraph which supports ES 7.9.2

    Krishna Jalla

    2 replies
    Hi Team,
    profile() method print the step , why ever step cost sum not eq total
    i use g.V().has().....range().valueMap(), this query run in compsIndex, index search is very fast, by total is big, is there has something wrong (janus-server way)
    1 reply
    and range() method, offset more big the response more slow
    Fred Eisele
    Is there a document that explains the limitations of using the :remote client connection to a janusgraph server? (as compared to a local gremlin.sh) I only find fragments scatter in different documents.
    5 replies
    Fred Eisele

    I am setting up a remote connection and am having some serialization issues with the subgraph...cap steps. I am getting the following error.

    Exception in thread "main" java.util.concurrent.CompletionException: org.apache.tinkerpop.gremlin.driver.exception.ResponseException: Error during serialization: Class is not registered: org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph
    Note: To register this class use: kryo.register(org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph.class);

    I suspect that I have a mismatch in my (de)serializer. How can I see what serialization is being sent?

    5 replies
    Vinayak Shiddappa Bali

    Consider the following schema for in JanusGraph.


    3 nodes: node1,node2 and node3
    2 relations: node1->rel->node2 and node1->rel1->node3

    I want the property2 for the rel1 relationship to be dependent on the property1 of rel relationship with formula 2property1.
    If property1=4 then property2=2

    Is it possible to update the property2 automatically when the property1 is updated and how?
    If not possible automatically, how to update using queries?

    hi ,
    i have the following gremlin query which takes about 200 ms
    g.V().has("/location/poi/address",textContains("Okhla Industrial Area Phase I")).has("/location/poi/type_id","0802004")
    I wanted to know if adding a combined mixed index on /location/poi/address /location/poi/type_id will help improve the performance
    Note: these two properties /location/poi/address /location/poi/type_id have an mixed index seperately already
    1 reply
    Hey Guys, Coming to JanusGraph from Neo4j and for the good reasons. Now we are trying to use JanusGraph with storage backend being Google cloud BigTable but as we are building a SAAS applications for B2B so concerned about how would we make multi-tenancy work as we want to separate each client's data.
    3 replies
    Vinayak Shiddappa Bali

    Hi All,

    Considering three nodes in a graph with 3 properties want to calculate the sum of each property for all the nodes using the gremlin query.


    Output: The required output is the sum of respective properties for all nodes using the gremlin query. property1: 12, property2: 15, property3: 18

    1 reply
    Hi All. I want to delete data and schema and load my own schema and data. So I find https://docs.janusgraph.org/basics/common-questions/#dropping-a-database but does it delete the schema. Should I load schema before loading my data? I'm using janusgraph-utils https://github.com/IBM/janusgraph-utils
    Hi Everyone i am trying to use janusgraph with scyllaDB as backend i am facing issue while using graph=ConfiguredGraphFactory.create("mygraph"). I am getting error gremlin-groovy is not an available GremlinScriptEngine

    This are my socket_config.yaml host:
    port: 8182
    scriptEvaluationTimeout: 30000
    channelizer: org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer
    graphManager: org.janusgraph.graphdb.management.JanusGraphManager
    graphs: {
    ConfigurationManagementGraph: conf/gremlin-server/janusgraph-cql.properties

    scriptEngines: {
    gremlin-groovy: {
    plugins: { org.janusgraph.graphdb.tinkerpop.plugin.JanusGraphGremlinPlugin: {},
    org.apache.tinkerpop.gremlin.server.jsr223.GremlinServerGremlinPlugin: {},
    org.apache.tinkerpop.gremlin.tinkergraph.jsr223.TinkerGraphGremlinPlugin: {},
    org.apache.tinkerpop.gremlin.jsr223.ImportGremlinPlugin: {classImports: [java.lang.Math], methodImports: [java.lang.Math#*]},
    org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: {files: [scripts/empty-sample.groovy]}}}}


    • { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
    • { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0, config: { serializeResultToString: true }}
    • { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}

      Older serialization versions for backwards compatibility:

    • { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
    • { className: org.apache.tinkerpop.gremlin.driver.ser.GryoLiteMessageSerializerV1d0, config: {ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
    • { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { serializeResultToString: true }}
    • { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV2d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
    • { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistryV1d0] }}
    • { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistryV1d0] }}
    • { className: org.apache.tinkerpop.gremlin.server.op.session.SessionOpProcessor, config: { sessionTimeout: 28800000 }}
    • { className: org.apache.tinkerpop.gremlin.server.op.traversal.TraversalOpProcessor, config: { cacheExpirationTime: 600000, cacheMaxSize: 1000 }}
      metrics: {
      consoleReporter: {enabled: true, interval: 180000},
      csvReporter: {enabled: true, interval: 180000, fileName: /tmp/gremlin-server-metrics.csv},
      jmxReporter: {enabled: true},
      slf4jReporter: {enabled: true, interval: 180000},
      gangliaReporter: {enabled: false, interval: 180000, addressingMode: MULTICAST},
      graphiteReporter: {enabled: false, interval: 180000}}
      maxInitialLineLength: 4096
      maxHeaderSize: 8192
      maxChunkSize: 8192
      maxContentLength: 65536
      maxAccumulationBufferComponents: 1024
      resultIterationBatchSize: 64
      writeBufferLowWaterMark: 32768
      writeBufferHighWaterMark: 65536
    this is my property file





    cache.db-cache = true

    cache.db-cache-clean-wait = 20

    cache.db-cache-time = 180000

    cache.db-cache-size = 0.5


    can somebody help
    Brian Miller
    Hey, what happened to the v0.3 docs? when you go to https://docs.janusgraph.org/v0.3/ it's all giving a 404 now :/
    1 reply
    Brian Miller
    ok, looks like it got moved to https://old-docs.janusgraph.org/0.3.1/index (for v0.3.1 for ex), luckily I found it via Google... not sure if someone just forgot to generate it in the new format or it was never migrated (if so, please at least include a proper link to the old docs site from the main one), thanks!
    Albert Lockett

    Does anyone have any advice on how to decode the values in graphindex table? I have been using cassandra for by storage backend and am thinking I have a hot key. It is causing one big partition.

    I have two question:

    1. Does the graphindex table store the values from vertex centri indices, composite indices, or both?
    2. How would I decode the values in the table to determine what is the edge/property value that is causing the problem?
    5 replies
    I want to communicate with my JanusGraph using HTTP. I get the error "has been blocked by CORS policy ... No 'Access-Control-Allow-Origin' header is present on the requested resource." Basically it says the HTTP server should but a response header "Access-Control-Allow-Origin": "*" to allow anyone to reach the resources. Is there any config for this?
    For "Add json serializers #1294 JanusGraph/janusgraph#1294", does it means that JSON can be stored and retrieved, but can not be queried using condition on nested property in JSON?
    If i want the 'g.V().hasLabel('q')' much faster , is there any other solution except make a property to represent the label and index the property?
    1 reply
    Timon Schneider

    Hi all,
    I'm relatively new to Janusgraph and have a question.
    Is it correct that java code such as below is not supported anymore?

    JanusGraphFactory.Builder config = JanusGraphFactory.build();
    config.set("storage.backend", "berkeleyje");
    config.set("storage.directory", directory);
    config.set("index." + INDEX_NAME + ".backend", "elasticsearch");


    JanusGraph graph = config.open();
    JanusGraphManagement management = graph.openManagement();
    final PropertyKey name = management.makePropertyKey("name").dataType(String.class).make();
    JanusGraphManagement.IndexBuilder nameIndexBuilder = management.buildIndex("name", Vertex.class).addKey(name);

    Does all interaction with JanusGraph API have to go through the Gremlin Cluster/Client driver?
    Kr, Timon

    8 replies
    Timon Schneider
    Hi, I'd like to model many 'type' entities that are part of one or more 'namespace' entities. One 'type' can have an edge to multiple namespaces but has to be unique within a namespace.
    Ideally, I would create an edge between 'type_1' and 'namespace_1' and then include that edge to an unique index to prevent that another 'type_1' entity with an edge to 'namespace_1' is created. Is this possible?
    15 replies
    Lin Zhang
    The images of JanusGraph and Gremlin-console were pulled from the Docker Hub. But how to make them working together? For now, when trying to execute :> command, it gives a message as follows: Host did not respond timely... Thanks.
    2 replies
    Lin Zhang
    Does the official image of JanusGraph already include DB backend and Lucene? Or should they be installed separately?
    Lin Zhang
    The Console sometimes could return "==>2" for "1+1".
    Lin Zhang
    More message:
    gremlin> graph = JanusGraphFactory.open('conf/janusgraph-berkeleyje-es.properties')
    No such property: JanusGraphFactory for class: groovysh_evaluate
    Type ':help' or ':h' for help.
    Lin Zhang
    They are working for the examples on the following page:
    Hello folks. I am a newby; very new to janusgraph. I have managed to get it installed with backend hbase and I was successful using gremlin console to create vertex and edges, but, I'm not sure how the backend hbase plays a role. how do you see the data in hbase? the table is created, but, i don't see how these vertices/edges with properties created in gremlin console gets in hbase.
    any guidance and explanation is appreciated
    1 reply
    I'm also looking for a very simple spring boot application that connects to janusgraph
    thanks in advance
    Lin Zhang
    How did you get sure if the data were saved into hbase?
    Samuel Padou

    In a traversal I'm trying to do a sub-traversal with a condition using the values of the base vertex. For example, from a base vertex I want to search all the vertex that have a common property value with it.
    I tried the following traversal that get me the expected result, but is very slow because the where() does not use the index on the property:


    Is there a way to optimize this traversal so that the index is used for the sub-traversal?

    2 replies

    I am trying to connect to the cassandra as abackend storage. The cassandra instance is connected over via a vault secret store manager.
    After the lease time duration specified by the vault, we are seeing the following exception

    org.janusgraph.diskstorage.TemporaryBackendException: Temporary failure in storage backend
        at io.vavr.API$Match$Case0.apply(API.java:3174)
        at io.vavr.API$Match.of(API.java:3137)
        at org.janusgraph.diskstorage.cql.CQLKeyColumnValueStore.lambda$static$0(CQLKeyColumnValueStore.java:125)
        at io.vavr.control.Try.getOrElseThrow(Try.java:671)
        at org.janusgraph.diskstorage.cql.CQLKeyColumnValueStore.getSlice(CQLKeyColumnValueStore.java:292)
        at org.janusgraph.diskstorage.log.kcvs.KCVSLog$MessagePuller$1.call(KCVSLog.java:791)
        at org.janusgraph.diskstorage.log.kcvs.KCVSLog$MessagePuller$1.call(KCVSLog.java:788)
        at org.janusgraph.diskstorage.util.BackendOperation.execute(BackendOperation.java:147)
        at org.janusgraph.diskstorage.util.BackendOperation$1.call(BackendOperation.java:161)
        at org.janusgraph.diskstorage.util.BackendOperation.executeDirect(BackendOperation.java:68)
        at org.janusgraph.diskstorage.util.BackendOperation.execute(BackendOperation.java:54)
        at org.janusgraph.diskstorage.util.BackendOperation.execute(BackendOperation.java:158)
        at org.janusgraph.diskstorage.log.kcvs.KCVSLog$MessagePuller.run(KCVSLog.java:725)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.runAndReset$$$capture(FutureTask.java:308)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
        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:748)
    Caused by: java.util.concurrent.ExecutionException: com.datastax.driver.core.exceptions.UnauthorizedException: User v_cassandradbrole has no SELECT permission on <table janusgraph.systemlog> or any of its parents
        at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503)
        at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:482)
        at io.vavr.control.Try.of(Try.java:62)
        at io.vavr.concurrent.FutureImpl.lambda$run$2(FutureImpl.java:199)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266)
        at java.util.concurrent.FutureTask.run(FutureTask.java)
        ... 3 common frames omitted

    The logs are very helpful and this is expected since the credentials expire after some time.
    We can call an external API to get the renewed credentials for cassandra.

    But, have so far been unsuccessful in gathering any resource about how to either

    1. Dynamically update backend credentials.
    2. Whenever such an error is thrown, perform a fixed task and re-initiate the graph store.
    Hi, I am having trouble implementing JanusGraph via Scala Futures. From what i can see only a few vertices gets added. I am using a ThreadedTx across the futures but some vertices do not get added. It uses Akka Source to throttle the execution since the API i am hitting is rate limiting. Can anyone please explain how to use the graph across Threads? I am getting no exceptions but i can see there is no ID allocation when calling the addVertex function
    1 reply
    Vinayak Shiddappa Bali
    Hi All,
    How can we implement view in the relational database in the graph? I am thinking of using a subgraph for the same. But is saving the as a different schema? Please share your experience regarding views in graph
    @FlorianHockmann, hello!
    I faced this question several times (on Stackoverflow and here), but there haven't been any answer.
    I'm using JanusGraph as Java library and want to change log level from DEBUG, cause there're a lot of DEBUG messages in console. So, how can I do this?