JG driver clint API in multi-threading


Liping Huang <liping....@...>
 

Is the "JanusGraph" or "JanusGraph#newTransaction" supports multi-threading?

The backgroup is I want to load huge data to JG with java API, so I tried create the tx in each thread but I can a lots of "java.lang.RuntimeException: java.lang.NullPointerException" and there are a lots of

14:13:37.831 [pool-20-thread-1] DEBUG o.j.d.cassandra.CassandraTransaction - Created CassandraTransaction@462ca117[read=QUORUM,write=QUORUM]
14:13:42.836 [pool-20-thread-1] DEBUG o.j.d.cassandra.CassandraTransaction - Created CassandraTransaction@32e27b6[read=QUORUM,write=QUORUM]
14:13:47.838 [pool-20-thread-1] DEBUG o.j.d.cassandra.CassandraTransaction - Created CassandraTransaction@69c35246[read=QUORUM,write=QUORUM]
14:13:52.841 [pool-20-thread-1] DEBUG o.j.d.cassandra.CassandraTransaction - Created CassandraTransaction@326765b6[read=QUORUM,write=QUORUM]
14:13:57.846 [pool-20-thread-1] DEBUG o.j.d.cassandra.CassandraTransaction - Created CassandraTransaction@11604ef4[read=QUORUM,write=QUORUM]
14:14:02.851 [pool-20-thread-1] DEBUG o.j.d.cassandra.CassandraTransaction - Created CassandraTransaction@6301d8f9[read=QUORUM,write=QUORUM]

in the console.

Thanks.



Calvin Lei <ckp...@...>
 

You should post this question to the JanusGraph users group.

Consider using the threaded transaction. SeeĀ 10.4. Multi-Threaded Transactions . That should help you.



On Friday, December 22, 2017 at 6:56:19 AM UTC-8, Liping Huang wrote:
Is the "JanusGraph" or "JanusGraph#newTransaction" supports multi-threading?

The backgroup is I want to load huge data to JG with java API, so I tried create the tx in each thread but I can a lots of "java.lang.RuntimeException: java.lang.NullPointerException" and there are a lots of

14:13:37.831 [pool-20-thread-1] DEBUG o.j.d.cassandra.CassandraTransaction - Created CassandraTransaction@462ca117[read=QUORUM,write=QUORUM]
14:13:42.836 [pool-20-thread-1] DEBUG o.j.d.cassandra.CassandraTransaction - Created CassandraTransaction@32e27b6[read=QUORUM,write=QUORUM]
14:13:47.838 [pool-20-thread-1] DEBUG o.j.d.cassandra.CassandraTransaction - Created CassandraTransaction@69c35246[read=QUORUM,write=QUORUM]
14:13:52.841 [pool-20-thread-1] DEBUG o.j.d.cassandra.CassandraTransaction - Created CassandraTransaction@326765b6[read=QUORUM,write=QUORUM]
14:13:57.846 [pool-20-thread-1] DEBUG o.j.d.cassandra.CassandraTransaction - Created CassandraTransaction@11604ef4[read=QUORUM,write=QUORUM]
14:14:02.851 [pool-20-thread-1] DEBUG o.j.d.cassandra.CassandraTransaction - Created CassandraTransaction@6301d8f9[read=QUORUM,write=QUORUM]

in the console.

Thanks.