有没有办法将现有的cassandra(以及数据)与janusgraph一起使用

g6baxovj  于 2021-06-13  发布在  Cassandra
关注(0)|答案(1)|浏览(360)

我想把Cassandra换成Cassandra的janusgraph。但在我的Cassandra数据库里,有数据。如何更改为janusgraph而不丢失数据。

8fq7wneg

8fq7wneg1#

不幸的是,没有一个好的方法来做到这一点。
Cassandra的数据集:

aploetz@cqlsh:stackoverflow> SELECT name, alma_mater, missions FROM astronauts WHERE name IN ('James A. Lovell Jr. ','Fred W. Haise Jr. ','John L. Swigert Jr. ');

 name                 | alma_mater             | missions
----------------------+------------------------+------------------------------------------
   Fred W. Haise Jr.  | University of Oklahoma |                                Apollo 13
 James A. Lovell Jr.  |       US Naval Academy | Gemini 7, Gemini 12, Apollo 8, Apollo 13
 John L. Swigert Jr.  | University of Colorado |                                Apollo 13

(3 rows)

在janusgraph中是这样的:

aploetz@cqlsh:janusgraph> SELECT * FROM janusgraph_ids LIMIT 4;

 key                | column1                                                                                  | value
--------------------+------------------------------------------------------------------------------------------+-------
 0x0000000000000003 | 0xfffffffffffec77f00059f18aaa71388306130376234306635303037382d38633835393061643933356531 |    0x
 0x1800000000000000 | 0xffffffffffffd8ef00059f18aadd69b0306130376234306635303037382d38633835393061643933356531 |    0x
 0xb000000000000003 | 0xfffffffffffec77f00059f18aad7bc90306130376234306635303037382d38633835393061643933356531 |    0x
 0x3800000000000003 | 0xfffffffffffec77f00059f18aacd5c50306130376234306635303037382d38633835393061643933356531 |    0x

(4 rows)
aploetz@cqlsh:janusgraph> SELECT * FROM edgestore LIMIT 4;

 key                | column1      | value
--------------------+--------------+--------------------------------
 0x0000000000003415 |         0x02 |                   0x0001043880
 0x0000000000003415 |       0x10c0 | 0xa072741e464c45575f4fce043480
 0x0000000000003415 | 0x10c2844800 |               0x8f00018e008080
 0x0000000000003415 | 0x10c2844c00 |               0x9981018e008180

(4 rows)

janusgraph存储数据的方式大不相同,它将边与实体分开,这样就可以以图形本地方式查询内容。不幸的是,这些都必须通过janusgraph加载才能以这种方式存储。

相关问题