[英]Concurrent write to titan DB to improve performance
What is the way for concurrent write to Titan DB as like Cassandra does. 像Cassandra一样,对Titan Titan进行并发写入的方式是什么。 Am using Titan with Cassandra as data storage.
我正在将Titan与Cassandra一起用作数据存储。 Overall I want to write to the database parallely so that I can improve the performance.
总的来说,我想并行写入数据库,以便提高性能。
I tried to do this with java multithread but am getting lock exception. 我试图用Java多线程来做到这一点,但是却得到了锁异常。
This question was asked in the Aurelius Graphs mailing list: 在Aurelius Graphs邮件列表中提出了以下问题:
https://groups.google.com/d/msg/aureliusgraphs/LbOx0wKhULc/j2wQuBtRqTQJ https://groups.google.com/d/msg/aureliusgraphs/LbOx0wKhULc/j2wQuBtRqTQJ
Other answers are welcome here, of course, however here is the summary of my answer from that exchange: 当然,这里还有其他答案,但是,这是我从这次交流中得到的答案的摘要:
You can use multithreading, multiple JVM processed, etc. to write to Titan in a parallel fashion. 您可以使用多线程,处理多个JVM等以并行方式写入Titan。 However, if your Titan schema uses locks to enforce uniqueness, you will inevitably hit locking exceptions.
但是,如果Titan模式使用锁来强制执行唯一性,则不可避免地会遇到锁异常。 There are two ways to deal with this:
有两种方法可以解决此问题:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.