Re: Failed to load many nodes & edges


Jason Plurad <plu...@...>
 

Robert Dale posted an answer over on gremlin-users https://groups.google.com/d/msg/gremlin-users/PGtuWvG8UNs/AKtvy9ipAwAJ


On Tuesday, August 1, 2017 at 10:02:04 AM UTC-4, Ohad Pinchevsky wrote:
Hi,

I am calling submit many times in order to add nodes from CSV file and it is failing.
In the server I see the following WARN message:

org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor - Pausing response writing as writeBufferHighWaterMark exceeded on RequestMessage{, requestId=b7647c81-0648-40b2-a5aa-edc6d1ec196e, op='eval', processor='', args={gremlin=g.addV('group').property('uuid',uuid).property('name',name), bindings={name=GROUP-26, uuid=GR-3A5F386A663A4892BAC7900E4444EDDF}, batchSize=64}} - writing will continue once client has caught up


Client code via driver:
     public void addGroups() {
       
List<String[]> groupsInput = getParsedData("groups.csv");
       
Map params = new HashMap<String, String>();
       
       
for (String[] line : groupsInput) {
           
params.put("uuid", line[3]);
           
params.put("name", line[5]);

           
ResultSet x = client.submit("g.addV('group')"
                   
+ ".property('uuid',uuid)"
                   
+ ".property('name',name)", params);
           
       
}
   
}


How to fix it, what do you suggest me to use for bulk add?

Thanks,
Ohad

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