gdotv
gdotv
Explore posts from servers
JJanusGraph
Created by gdotv on 8/9/2024 in #questions
Granular configuration options for such as JANUSGRAPH_RELATION_DELIMITER on driver
Hi folks, I'm curious about the possibility to make configuration options such as JANUSGRAPH_RELATION_DELIMITER more granular at the driver level. I know it can currently be set as an environment variable, but I'm wondering if there's thoughts of making this configurable on a per DriverRemoteConnection/Cluster basis client-side. The reason I'm asking is to cater for potential use cases where users on G.V() might need to connect to multiple janusgraph databases with disparate setups. Is that something reasonable/achievable as a potential new feature?
5 replies
JJanusGraph
Created by gdotv on 5/22/2024 in #questions
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
12 replies
JJanusGraph
Created by gdotv on 1/13/2024 in #questions
Deserializing of Vertex ID with Custom String value
Hi, I've come across an issue with deserialization from users enabling custom vertex ID values and types as documented on https://docs.janusgraph.org/advanced-topics/custom-vertex-id/. Below is a sample GraphSON serialization error highlighting the issue, where a vertex has a custom string ID value (U933779):
java.lang.IllegalArgumentException: Invalid id - each token expected to be a number
at [Source: (byte[])"{"requestId":"171a7723-7b62-4131-8035-e735ff368ffd","status":{"message":"","code":200,"attributes":{"@type":"g:Map","@value":["host","localhost"]}},"result":{"data":{"@type":"g:List","@value":[{"@type":"g:Vertex","@value":{"id":"U933779","label":"user","properties":{"phone":[{"@type":"g:VertexProperty","@value":{"id":{"@type":"janusgraph:RelationIdentifier","@value":{"relationId":"9g3yj-SU933779-8p1"}},"value":"[REDACTED]","label":"phone","properties":{"metadata":"{}"}}}],"profile"[truncated 645 bytes]; line: 1, column: 415]
java.lang.IllegalArgumentException: Invalid id - each token expected to be a number
at [Source: (byte[])"{"requestId":"171a7723-7b62-4131-8035-e735ff368ffd","status":{"message":"","code":200,"attributes":{"@type":"g:Map","@value":["host","localhost"]}},"result":{"data":{"@type":"g:List","@value":[{"@type":"g:Vertex","@value":{"id":"U933779","label":"user","properties":{"phone":[{"@type":"g:VertexProperty","@value":{"id":{"@type":"janusgraph:RelationIdentifier","@value":{"relationId":"9g3yj-SU933779-8p1"}},"value":"[REDACTED]","label":"phone","properties":{"metadata":"{}"}}}],"profile"[truncated 645 bytes]; line: 1, column: 415]
The part that confuses me is the RelationIdentifier class as defined in JG 1.0 (https://github.com/JanusGraph/janusgraph/blob/12708188397f69616adddc933e539e841af409e4/janusgraph-driver/src/main/java/org/janusgraph/graphdb/relations/RelationIdentifier.java#L31) still defines the id value as a long. My question is, for custom vertex id values, what is the correct approach to deserializing ID values? We've tried this with multiple different types of serializers to no avail.
10 replies
JJanusGraph
Created by gdotv on 6/30/2023 in #questions
Can graph scans restrictions be bypassed?
When a JanusGraph database has janusgraph.query.force-index: "true"​, is there a way to submit queries that would be considered as graph scans (e.g. g.V().limit(25)) despite the setting being enabled? I know that DataStax Enterprise for instance has a with('allow-filtering') that lets users bypass that restriction.
5 replies