JanusGraph

J

JanusGraph

JanusGraph - Distributed, open source, massively scalable graph database.

Join

Incremental schema changes - Property Key constraint does not exist

Hi All, in our use-case the graph schema is changing over time and we have issues to incrementally add properties to the schema as we get error in the below scenario: 1. day 1: we create a graph with an initial schema: person node with firstName property. 2. day 2: we try adding lastName property to the person node. This still works and one can create persons with lastName 3. day 3: we try adding fullName property to the person node. This does not work any more as gp_traversal.addV('person').property('fullName', 'test full name') throws error: Property Key constraint does not exist for given Vertex Label [person] and property key [fullName]. ...
Solution:
Hello, you need to close graph in order to take into account new schema constraint, no need to restart server. You can close graph with ConfiguredGraphFactory.close, then it will automatically open again with GremlinExecutorGraphBinder in JanusGraphManager....

Text predicate not serializable (containsPhrase, notContainsX, etc)

Hello, JanusGraphPSerializer is missing several predicates, this is causing a timeout exhausting all opened connexion when we're calling these predicates. I fixed this locally, I can do a merge request, but i haven't found the related issue. Here are the 8 missing predicates :...
No description

How do we generate transaction logs ?

This is how I created Client ``` def loadClient(graphId: String): Client = { val typeSerializerRegistry = TypeSerializerRegistry.build.addRegistry(JanusGraphIoRegistry.instance).create val cluster = Cluster.build()...

RpcRetryingCallerImp while trying to connect JanusGraph with Hbase 2.2.7 under Cloudera Distribution

Hi, I am new to using JanusGraph and I am trying to integrate JanusGraph version 0.6.4 with Kerberized HBase 2.2.7, which comes under the Cloudera Distribution 7.9.1. I had to use an earlier version of JanusGraph since the compatibility matrix specifies that JanusGraph is tested compatible with HBase 2.2.x. I am using the following configuration to get a 3-node HBase cluster to interact with JanusGraph. However, when I try to start the server, I encounter the following loop, and as a result, the server does not start. ...

Potentially useless allocations when checking a field cardinality

👋🏻 Hey folks In a service running JanusGraph embedded, I observed a number of sizeable allocations coming from JanusGraphVertexFeatures#getCardinality (https://github.com/JanusGraph/janusgraph/blob/2c71b378339a3ab49b961eef29b5a042d018f513/janusgraph-core/src/main/java/org/janusgraph/graphdb/tinkerpop/JanusGraphFeatures.java#L161-L169). From a profile (attached), it looks like...
No description

Java 17 support

When can we expect Janusgraph to support Java 17? 🙂

Unable to load GraphSON file

Hi, I'm trying to load a very simple .json graph into JanusGraph from the gremlin console, but I get this error:
gremlin> g.io("/opt/janusgraph/graphson-test1.json").read().iterate();
Label can not be null
gremlin> g.io("/opt/janusgraph/graphson-test1.json").read().iterate();
Label can not be null
...

Gremlin statement exceeds the maximum compilation size

Hi all, I'm trying to do some script-based bulk writes to a JanusGraph server, but I get the following error message
'status': {'message': 'The Gremlin statement that was submitted exceeds the maximum compilation size allowed by the JVM, please split it into multiple smaller statements ...}
'status': {'message': 'The Gremlin statement that was submitted exceeds the maximum compilation size allowed by the JVM, please split it into multiple smaller statements ...}
I have set maxContentLength: 524288 in the server .yaml file to allow my client to sbmit larger scripts, because I found a significant performance improvement when submitting a larger set of queries at once. But now I'm hitting the JVM limit for compilation size, which I'd like to increase, if possible. ...
Solution:
This error message means that the JVM internally threw a Method too large error. At least from a quick search, it looks like this is a hard limit which can be configured. That's at least what I got from this Stack Overflow question: https://stackoverflow.com/questions/3192896/how-to-circumvent-the-method-too-large-error-in-java-compilation...

Comma Separated Config Options Values Via Environment Variable?

Hey @Bo & @porunov I was trying out the retry logic added by my PR (https://github.com/JanusGraph/janusgraph/pull/4409) by setting environment variables in my docker compose like so: janusgraph.index.some_index_name_here.elasticsearch.retry-error-codes=408,429 Much like was done in the unit test I wrote (https://github.com/JanusGraph/janusgraph/blob/487e10ca276678862fd8fb369d6d17188703ba67/janusgraph-es/src/test/java/org/janusgraph/diskstorage/es/rest/RestClientSetupTest.java#L240). But to my surprise it doesn't seem to be received well during startup:...
Solution:
Okay, after quite a journey of vetting the parsing behavior from environment variable into property files, into the various Confirmation implementations into ConfigOptions, etc etc I've found where this has gone sideways....and like the worst of these types of situations looks like this one was self inflicted 🤦‍♂️ . A long long long time ago when I was starting on working with JanusGraph I was tired of JanusGraph deployments that silently failed and leaving my container up but dead inside the container, for reasons that weren't its fault (started up before Cassandra was ready timing out its storage wait time, etc). Trying to find solutions for that I stumbled upon the Tinkerpop CheckGraphManager (https://github.com/apache/tinkerpop/blob/master/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/CheckedGraphManager.java) that would automatically terminate the process if the specified graphs did not successfully open....

Creating a customer serializer Io Registry in Java

Hey folks, I've got a somewhat unusual use case I'd like to bring to G.V(). Some users have customer serializers configured on their servers and I'd like to find a way to allow them to configure G.V() using those custom serializers. My initial thought was to create a "custom" IoRegistry that loads those classes via reflection based on user input information (e.g. jar path and class name). Would that be the correct way to load custom serializers into a client Java codebase? I've been looking at some custom serializer examples but they focus mostly on the server side of things, not so much the client, gremlin-driver part of it...
Solution:
cool, i think that clarifies everything, im clear on the approach to take moving forward for G.V(), the best solution is to simply allow onboarding a user's custom IO registry via a packaged jar, likely the same one they would drop under lib for their JG install

Kill a query?

Hey folks, is it possible to kill a long running query?

Server can't be started due to `lost+found` folder

I'm running JanusGraph as a docker container with a mounted volume at /var/lib/janusgraph. Experiencing this issue after restarting the container: ```sh chown: cannot read directory '/var/lib/janusgraph/lost+found': Permission denied...

Phantom Unique Data / Data Too Large?

I've been chasing down a weird writing bug for our graph writer, but I feel like I've stumbled into conflicting realities in my graph and wanted to share in case I'm missing something larger. For context the environment in play is my local development environment, all running inside docker compose (host machine is MacOS, on the off chance it matters). - JanusGraph 1.0.0 - Cassandra 4 - Elasticsearch 8...

Could not start BerkeleyJE transaction

Hey I've just encounter this issue and needed to restart the entire server for it to go away. I believe it's the issue being described here https://github.com/JanusGraph/janusgraph/issues/2120...

JanusGraphManagement from Java client

Is it possible to, from the GraphTraversalSource, get to a JanusGraphManagment instance?

~20% write performance hit when using custom str IDs?

Hi, I've been experimenting with using custom vertex IDs. I have a process that reads data from a file and writes (or updates with mergeV()) nodes to a JanusGraph 1.0.0 instance with a Cassandra+ES backend. Keeping exactly the same client code and test data, I noticed a 20% write slowdown when writing nodes with custom string IDs, rather than custom int IDs. In both cases, the IDs are exactly the same, with the only difference being that in one case I convert int to string, before submitting the query to the JG server (I'm using parametrized scripts submitted via gremlin-python). Is this a known issue? (I could not find info about this in the documentation)...

Mixed Index (ElasticSearch) Backpressure Ignored?

I understand that JG views writes to mixed indices as a "best effort" and documents(https://docs.janusgraph.org/operations/recovery/#transaction-failure) that failures in transactions with regards to mixed indices are left to a separate periodic clean up process after enabling JG's WAL:
If the primary persistence into the storage backend succeeds but secondary persistence into the indexing backends or the logging system fail, the transaction is still considered to be successful because the storage backend is the authoritative source of the graph. ... In addition, a separate process must be setup that reads the log to identify partially failed transaction and repair any inconsistencies caused....

Could not instantiate implementation: org.janusgraph.diskstorage.es.ElasticSearchIndex

i am using latets janusversion-1
Solution:
this issue has been resolved ,there were credential issue

JanusGraph authentication - restricted privileges

Hi All, we secured our JanusGraph with SaslAuthenticationHandler as desribed in the docs (https://docs.janusgraph.org/operations/server/#advanced-janusgraph-server-configurations). The defined user now can be used to read/write data in the graph database as well as for managing the schema. Is there a way to create a user that can only perform read/write on the graph but cannot change the schema? Thank you for any pointer on this....
Solution:
As "hadoopmarc" also answered on janusgraph-users list recently, the main pointers are: 1. authorization section of the Apache TinkerPop documentation (https://tinkerpop.apache.org/docs/current/reference/#authorization) 2. a sample file in the Gremlin server source code (https://github.com/apache/tinkerpop/blob/master/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/authz/AllowListAuthorizer.java) For reference, I thought it might be useful for others to share some snippets how I made authorization work with JanusGraph 1.0.0. The main purpose of authorization was to restrict users to access the JanusGraph Management System (e.g. open a graph and make schema changes on it)...

Issues faced for consistent indexing (both Composite & Mixed) [ElasticSearch]

--> Schema was provisioned, and then, all the schema was verified and the management objects closed. [All the indexes were in enabled state, both mixed and composite] --> [Issue:1] Index wasn't created in ElasticSearch, giving a 404, when a vertex totals direct Index Query is performed --> As a work around. for initial data 1000 Documents of sample data was ingested, and as we expected, the indexes were not present --> data was re-indexed. Indexes were created in ElasticSearch, and some composite indexes needed re-Indexing as well. After reindexing, the performance was as expected...
Solution:
@Boxuan Li , while i was using multi-tenacy, there were more configs to be given to the elastic search as well, for the graphName. Marking this as resolved. The index was being created with janusgraph_IndexName, where as it was supposed to be created in tenant_IndexName, It was a misconfiguration, that wasn't carefully considered. ...