smp
JJanusGraph
•Created by smp on 12/11/2024 in #questions
Why queries are slow when more than one mixed index in query
2 replies
JJanusGraph
•Created by smp on 11/19/2024 in #questions
Custom Vertex ID and coalesce
I am trying to find a vertex by ID if it exists update a property otherwise create a vertex with the ID.
ConfiguredGraphFactory.open("tenant51").traversal().
V().hasId('45gjttOlN2+udTmQcJnHpp').fold()
.coalesce(
unfold().property('attribute_7', 'value_7'),
addV().property('id', '45gjttOlN2+udTmQcJnHpp').property('attribute_7', 'value_7')
)
I couldn't find a way to pass id for the vertex in coalesce.
java.lang.IllegalArgumentException: Must provide vertex id
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:143)
at org.janusgraph.graphdb.transaction.StandardJanusGraphTx.addVertex(StandardJanusGraphTx.java:638)
at org.janusgraph.graphdb.tinkerpop.JanusGraphBlueprintsTransaction.addVertex(JanusGraphBlueprintsTransaction.java:138)
at org.janusgraph.graphdb.tinkerpop.JanusGraphBlueprintsGraph.addVertex(JanusGraphBlueprintsGraph.java:143)
at org.janusgraph.graphdb.tinkerpop.JanusGraphBlueprintsGraph.addVertex(JanusGraphBlueprintsGraph.java:59)
@Bo Am I missing something.4 replies
JJanusGraph
•Created by smp on 10/25/2024 in #questions
ConfigurationManagementGraph fails with Must provide vertex id
I am new to the JanusGraph. Trying to create dynamic graphs.
I couldn't create configuration template. Am I missing anything. Thanks
My config:
graphManager: org.janusgraph.graphdb.management.JanusGraphManager
graphs: {
ConfigurationManagementGraph: /etc/opt/janusgraph/janusgraph-cql-configuration.server.properties,
graph: /etc/opt/janusgraph/janusgraph-cql-server.properties
}
janusgraph-cql-configuration.server.properties: |
gremlin.graph = org.janusgraph.core.ConfiguredGraphFactory
storage.backend = cql
graph.graphname = ConfigurationManagementGraph
gremlin> map = new HashMap();
gremlin> map.put('storage.backend', 'cql');
==>null
gremlin> map.put('storage.hostname', 'scylla-scylladb');
==>null
gremlin> ConfiguredGraphFactory.createTemplateConfiguration(new MapConfiguration(map));
Must provide vertex id
8 replies