Issue creating vertex with a List property having large number of elements


Aswin Karthik P <zas...@...>
 

Hi,
For a use case, I'm trying to create a vertex with some list properties which contains large number of elements using gremlin-python.
But the server gets crashed and I'm getting java.lang.StackOverflowError error in gremlin-server.log 

Since the query is too big, I have attached it as txt file. Along with it, I have attached gremlin-server.yaml file too for reference, where I have tried manipulating the content size etc.

Server initiation
The default one with Cassandra as backend storage

$JANUSHOME/bin/janusgraph.sh start

Python Code

from gremlin_python.driver import client
 
client =  client.Client('ws://localhost:8182/gremlin', 'g')

mgmtScript = "mgmt = graph.openManagement()\n" + \
"if (mgmt.getPropertyKey('name') != null) return false\n" + \
"mgmt.makePropertyKey('name').dataType(String.class).make()\n" + \
"mgmt.makePropertyKey('vl_prop').dataType(Float.class).cardinality(LIST).make()\n" +\
"mgmt.commit()\n" + \
"return true";

client.submit(mgmtScript).next()

f = open("/home/aswin/Desktop/only_vertex.txt", "r")

create_query = f.read()

client.submit(the_text).next()

The Python code is just a glimpse, I have to create 5 such properties for each node and there will be few thousand nodes in the graph.

I'm not sure whether it is a shortcoming of JanusGraph or the gremlin server. And is it even feasible to have such a graph model in Janus Graph.

I would also like to know, if there is an easier/ crisp way to create List properties than repeating the same property name with different values.

Join janusgraph-users@lists.lfaidata.foundation to automatically receive all group messages.