Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    hi, I just read a bit Janus code and wanted to confirm one thing as I found when executing edgeStoreMultiQuery, the threadpool in Backend is used and each getSlice will occupy one thread. As there are only # core * 2 threads, should not we allow to increase the size of this thread pool to increase the overall throughput?
    3 replies
    Hi everybody. I was looking on the security aspects of JanusGraph but I found very confusing the EntryMetaData.VISIBILITY. Looking at this it seems that JanushGraph can use the cell level visibility of Hbase for ex but couldn't find a way to set this label when creating the graph. Can we enforce ABAC with JanusGraph ?

    I'm trying to execute an OLAP traversal on a query that needs to check if a vertex as a neighbour of certain type.
    i keep getting

    Local traversals may not traverse past the local star-graph on GraphComputer

    my query looks something like:


    I'm using the TraversalVertexProgram. is there a way to execute such logic?

    Vinayak Shiddappa Bali

    Hi All,

    ConfiguredGraphFactory is not working, followed all the steps in the given blog below.


    Still it is not working, can some one please help ??

    2 replies
    Raul Guo
    I am a bit confused whether scylladb is supported in JanusGraph, in the storage backend doc I saw only cassandra can be used. But scylladb also support cql, and in the janus graph config file, we will fill "cql" if we want to use cassandra. so, can I use scylladb as JanusGraph storage backend? Does it really help to improve the performance?
    2 replies
    Serhii Zadorozhnyi

    Hi guys, have question how to rewrite gremlin-groovy script: "g.V().has('${VLabels.USER}','${Keys.USER_ID}', $userId).
    map{throw new IllegalStateException('${Errors.UserNotFound}')}
    to Gremlin java, tried:
    "g.V().has(VLabels.USER, Keys.USER_ID, userId)
    throw Exception("anything")
    "g.V().has(VLabels.USER, Keys.USER_ID, userId)
    Lambda.function("throw new IllegalStateException('anything')")

    Main question how to throw custom exception from Gremlin in your language

    2 replies
    Is it possible to configure Janusgraph to prevent long running (/high amount of data) traversals? Our janus docker falls if we ask too much.
    @FlorianHockmann I would be grateful if you can help me, I am trying to use the remote-objects.yaml (server has the serializers as well) but using the serializer: { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
    serializer: { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0, config: { ioRegistries: [org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerIoRegistryV3d0] }}
    give me errors all the time when trying to open a graph using: gremlin> :> graph = ConfiguredGraphFactory.open("airroutessmall"). The error is: Server could not serialize the result requested. Server error - Error during serialization: Class is not registered: org.janusgraph.graphdb.database.StandardJanusGraph
    Note: To register this class use: kryo.register(org.janusgraph.graphdb.database.StandardJanusGraph.class);. Note that the class must be serializable by the client and server for proper operation. Thanks for your help. By the way I wan to submit a subgraph to Gephi this way.
    im looking for a solution to detect changes in the graph db and push all the mutations to a queue for further processing, i have found that janusgraph supports trigger log but i could not find any example how to read that log, secondly is there a way that we can detect changes without using trigger log i.e. without using the name of the log?
    Matthias Leinweber
    we have a mixed index (es) but when we try to query property within the the index we get the message that queries would be faster when we use indexes what could be the reason?
    ... property is camelCase if that could be an issue
    Matthias Leinweber
    ok i dont exaclty know why its working now .. but sometime querying the index ist slower.. serveral seconds instead of ms. How could i investigate this?
    Saurabh Verma
    Multiple vertices generated for the same index value and vertex properties missing with RF3
    with RF3, we are seeing index corruption, which is not seen with RF1

    Hi team, I'm connecting to JG from a NodeJS typescript application, making use of the npm/gremlin package. I'm struggling to connect to an existing graph (created from Console with below command) - is there some other recommended package, or can someone perhaps give some guidance, please?

    graph = JanusGraphFactory.build().
      set("storage.backend", "cql").
      set("storage.hostname", "jg-cassandra").

    The code I currently have:

        const traversal = gremlin.process.AnonymousTraversalSource.traversal;
        const DriverRemoteConnection = gremlin.driver.DriverRemoteConnection;
        const g = traversal().withRemote(new DriverRemoteConnection('ws://localhost:8182/gremlin'));

    I've created a JG config file and added it to the container, so that I can reference that when connecting to JG, but I don't see where I can do this?

    If I run the above code, I connect to another (believed to be in-memory) graph, instead of the one created with the Console command above.

    Sanjeev Ghimire
    Hi I am depploying janusgraph to a openshift cluster. it deploys fine but when i start the gremlin server it gives me this error:
    cp: cannot create regular file '/etc/opt/janusgraph/janusgraph.properties': Permission denied
    cp: cannot create regular file '/etc/opt/janusgraph/gremlin-server.yaml': Permission denied
    chown: changing ownership of '/var/lib/janusgraph': Operation not permitted
    chown: changing ownership of '/etc/opt/janusgraph': Operation not permitted
    chmod: changing permissions of '/var/lib/janusgraph': Operation not permitted
    chmod: changing permissions of '/etc/opt/janusgraph': Operation not permitted
    chmod: cannot access '/etc/opt/janusgraph/*': No such file or directory
    grep: /etc/opt/janusgraph/janusgraph.properties: No such file or directory
    /usr/local/bin/docker-entrypoint.sh: line 52: /etc/opt/janusgraph/janusgraph.properties: Permission denied
    grep: /etc/opt/janusgraph/janusgraph.properties: No such file or directory
    /usr/local/bin/docker-entrypoint.sh: line 52: /etc/opt/janusgraph/janusgraph.properties: Permission denied
    Error: stat /etc/opt/janusgraph/gremlin-server.yaml: no such file or directory
      yq write [yaml_file] [path_expression] [value] [flags]
      write, w
    2 replies
    Any help is appreciated
    I have a 'Date' property formatted like this:
    gremlin> g.V().has("Patent", "title", textContains("Cups")).values('date').limit(10);
    ==>Tue Jan 03 00:10:00 UTC 1978
    ==>Sun Jan 28 00:08:00 UTC 2007
    ==>Tue Jan 27 00:10:00 UTC 1987
    ==>Wed Jan 10 00:04:00 UTC 2001
    ==>Sun Jan 17 00:08:00 UTC 2010
    ==>Tue Jan 05 00:10:00 UTC 2010
    ==>Thu Jan 28 00:09:00 UTC 2010
    ==>Wed Jan 04 00:09:00 UTC 2012
    ==>Wed Jan 09 00:12:00 UTC 2008
    ==>Wed Jan 24 00:04:00 UTC 2018
    Is there a way to search for data from a specific year or do I need to create a separate property field with just 'year'?
    Florian Hockmann
    @maahutch You can compare dates in Gremlin just like other date types. So, if you want to ensure that your date property is within a certain time range, then you can use this traversal:
    g.V().has("Patent", "title", textContains("Cups")).has('date', within(startDate, endDate)).limit(10);
    where startDate and endDate are Date objects that represent the start and end of your interval, so the beginning and end of the year in this case
    Vinayak Shiddappa Bali
    Hi All,
    I want to enable JMX authentication for Cassandra Deamon. What all changes are needed at janusgraph side to enable the authentication ??
    Piotr Joński
    Hi guys, is there a way to customize log format in janusgrap? i would like to apply our company-standard formatting, so we can browse all logs in kibana in single place.
    i am not interested in workaround like logstash pipeline, which changes log format in-the-fly -- this i know already
    I am running janusgraph in k8s, docker image. configuration is done by mounting configuration files in proper places.
    3 replies
    Razi Kheir
    Guys, regarding graph management, I can't find in the javadocs, or the janusgraph docs, when to exactly rollback management (not transaction, ie: mgmt.rollback()), and what specific effect it actually has, can anyone please explain this or give me a link to where it is explained?
    Vinayak Shiddappa Bali

    Hi All,

    The schema consists of A, B as nodes, and E as an edge with some other nodes and edges.
    A: 183468
    B: 437317
    E: 186513

    Query: g.V().has('property1', 'A').as('v1').outE().has('property1','E').as('e').inV().has('property1', 'B').as('v2').select('v1','e','v2').dedup().count()
    Output: 200166
    Time Taken: 1min

    Query: g.V().has('property1', 'A').aggregate('v').outE().has('property1','E').aggregate('e').inV().has('property1', 'B').aggregate('v').select('v').dedup().as('vetexCount').select('e').dedup().as('edgeCount').select('vetexCount','edgeCount').by(unfold().count())
    Output: ==>[vetexCount:383633,edgeCount:200166]
    Time: 3.5 mins
    Property1 is the index.
    How can I optimize the queries because minutes of time for count query is not optimal. Please suggest different approaches.

    Thanks & Regards,

    Matthias Leinweber
    what else could be a reason that my index dont get registered/installed/disable although i clean all connections and transactions?
    Matthias Leinweber
    and i am pretty confused about mapreduce jobs and spark/hadoop connectivity .. i am looking for more complete examples or someone who has some time to answer stupid questions :)
    Ben Doan
    Hey everyone - has anyone here successfully implemented a SparkGraphComputer for OLAP on AWS EMR? I'm trying to implement it using JanusGraph 0.5.3 on AWS EMR Release version 5.23.0 and I'm running into some dependency issues
    Ben Doan

    I am currently trying to set up SparkGraphComputer using JanusGraph with a CQL storage and ElasticSearch Index backend, and am receiving an error when trying to complete a simple vertex count traversal in the gremlin console:

    gremlin> hadoop_graph = GraphFactory.open('conf/hadoop-graph/olap/olap-cassandra-HadoopGraph-YARN.properties')
    gremlin> hg = hadoop_graph.traversal().withComputer(SparkGraphComputer)
    gremlin> hg.V().count()
    ERROR org.apache.spark.SparkContext - Error initializing SparkContext. java.lang.ClassCastException: org.apache.hadoop.yarn.proto.YarnServiceProtos$GetNewApplicationRequestProto cannot be cast to org.apache.hadoop.hbase.shaded.com.google. protobuf.Message

    Relevant cluster details

    • JanusGraph Version 0.5.3
    • Spark-Gremlin Version 3.4.6
    • AWS EMR Release 5.23.0
    • Spark Version 2.4.0
    • Hadoop 2.8.5
    • Cassandra/CQL version 3.11.10

    Implementation Details

    Properties File

    metrics.enabled= false
    ### Storage - CQL 
    ###HOSTS and PORTS
    ####InputFormat configuration
    ### SparkGraphComputer Configuration 
    ###Spark Job Configurations
    ###Gremlin and Serializer Configuration
    ### Special Yarn Configuration (WIP)
    ###Spark Driver and Executors
    Sanjeev Ghimire
    question: my janusgraph is hosted in openshift cluster. I have apython app that can connect to it and load successfully, but I can't connect to the server using gremlin console, I get permission denied. Also the data are not replicated on all the servers
    Any idea why? Any help is appreciated
    Piotr Joński
    hi, quick question:
    we are testing things and dont want to spin up full cluster with elastisearch, so we use lucene indexing as default.
    will that work with multi-node janusgraph cluster? (we have 2 instances)
    2 replies
    Hi, anyone already tried to add a custom lib in JanusGraph? I create an empty class in a TestClass.java file with org.test package that I compiled into jar and I added it to my JANUS_HOME/lib folder. However when I try to import my class with :i org.test.TestClass it does not find it. Should I do something special?
    I found a funny bug:
    These two requests looks exactly the same but they are not, they do not produce the same result and if I play with up arrow and enter they still do. I checked that there is no hidden special character.
    And this occurs only with numbers combined with a whitespace, or at least I could not reproduce it with text containing letters+whitespaces.
    On the second request I wrote the value digit per digit on my keyboard while on the first request and copied/pasted the value from the gremlin console after doing a .values()
    My bad, notepad detected that the withespace character is not the same:
    Sanjeev Ghimire
    why is janusgraph not replicating data on all pods?
    we are using all default settings
    when queried from an app, we dont get all teh results
    I would like to ask a question regarding how Janus retrieves properties of vertexes. Take following query for example, g.V(12345).out().has("Name", "abc"), V(12345) has 100 or so neighbors. But it seems that Janus is fetching properties of these vertexes in a sequential way. Am I missing anything or this is done intentionally? I also found a related option "query.batch-property-prefetch" . After it is turned on, Janus can prefetch properties in parallel, but with a drawback. It seems that it is fetching all the properties of an vertex even though the filters in later steps only need a single property. Am I missing anything?
    16 replies
    Sanjeev Ghimire

    why is janusgraph not replicating data on all pods?

    any help on this?

    7 replies
    Piotr Joński

    hi guys,
    question about

                    .serializer(new GraphSONMessageSerializerV2d0(GraphSONMapper.build().addRegistry(JanusGraphIoRegistry.instance())))

    if we use k8s service (the service acts as load balancer) shall we configure single ContactPoint or put 3 (we have 3 pods) janusgraph pod IPs there? (whetever is ContactPoint, i assume it is the same as url, is it correct?)
    and next question: if we specify 3 ContactPoints (all pods directly) what will be the difference? is it only for client-side loadbalancing or some addtional behaviour is expected?

    Piotr Joński

    did anybody in the world, or at least in this channel :) tried to scale up janusgraph? i have serious issues with that, struggiling for few days already.
    it always return connection timeout if we have more than 1 replica :/
    i try to deploy that to k8s, sometimes single pod work, sometimes it throws exceptions about connections.
    how to set it up properly? i have read the articles from janusgraph website (multi node) and nothing helps. do you have any examples of working configurations for multinode janusgraph deployment?


    Florian Hockmann
    Hey Piotr, regarding your first question: You can use a load balancer in front of JanusGraph and then pass it as a contact point to the driver. You just need to make sure that the load balancer supports Websockets and ensures that subsequent requests on the same connection will be forwarded to the same endpoint. Nginx supports this for example. Not sure whether the k8s load balancer supports this or whether it's more "low level".
    If you however provide the driver directly with the IPs of the JanusGraph pods, then it should do the load balancing itself. That might be an option if your environment doesn't change much (e.g., if you scale JanusGraph up or down, you would need to change this in the driver)
    5 replies
    What exception do you get if you try it with just one pod for JanusGraph? I would definitely try to get that working before scaling up as you then get the added complexity from the load balancer
    5 replies