簡體   English   中英

Titan DB +卡桑德拉+ Rexster。 在cassandra中創建和保存圖形並在rexster中顯示

[英]Titan DB + Cassandra + Rexster. creating and saving graph in cassandra and showing in rexster

我是數據庫和Titandb圖形的初學者。 我正在嘗試創建一個小圖並保存到cassandra中。

a)我用TinkerGraph添加了頂點和邊並嘗試保存。 后來我知道不可能保存TinkerGraph。 那有什么用呢?

b)我試過

g = TitanFactory.open('conf/titan-cassandra-es.properties')
mgmt = g.getManagementSystem()

出現以下錯誤

No signature of method: com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.getManagementSystem() is applicable for argument types: () values: []

g.getManagementSystem()是什么意思?

c)我需要為Gremlin學習哪種編程(groovy或Java)?

我已經下載了titan-1.0.0-hadoop1.ziprexster-server-2.6.0.zip

我不了解它的頭和尾。 請有人幫助我在titan創建簡單圖形並保存到cassandra並從rexster可視化

您不能將Rexster與Titan 1.x混合使用。 Titan 0.5.x與Rexster兼容。 Titan 1.x與Rexster的替代Gremlin Server兼容。 您不需要單獨下載Gremlin Server。 它隨Titan 1.0.0一起分發。 您可以從以下內容開始:

bin/titan.sh start

您可以在此處閱讀相應的說明。

a)我用TinkerGraph添加了頂點和邊並嘗試保存。 后來我知道不可能保存TinkerGraph。 那有什么用呢?

TinkerGraph是一個內存數據庫。 它有很多用途。 您可以使用它進行學習(現在就在這里),分析較大圖形的子圖形,生產系統中圖形往往是靜態的並適合內存的等等。您可以在Gremlin Console上的教程中了解更多信息。

b)g.getManagementSystem()是什么意思?

您可以使用Management System API為Titan創建模式(即告訴它哪些屬性,定義邊/頂點標簽等)。通過定義模式 ,Titan可以提示如何提高效率。

c)我需要為Gremlin學習哪種編程(groovy或Java)?

從TinkerPop 3.x開始,Gremlin只是純Java。 在大多數情況下,僅將Groovy用於語法糖

如果您想同時學習編程和圖形學習以及TinkerPop,我強烈建議您不要先使用Titan。 從TinkerGraph和Gremlin Console開始學習基礎知識。 這個“入門 ”教程應該會有所幫助。 當您對TinkerGraph更加滿意時,請考慮使用Titan。 TinkerPop的奇妙之處在於,切換到其他圖形非常容易。 如果您知道如何將Gremlin與TinkerGraph一起使用,那么最好將其與Titan,Neo4j或您要使用的任何其他圖形數據庫一起使用。

a)TinkerGraph是供應商實現TinkerPop API的參考實現,也是用於玩耍的沙盒。 它不打算用於生產中。

b)您使用的是哪個版本的Titan? Titan 1.0.0中不存在getManagementSystem API。 存在管理子系統是為了提供對各種Titan特定子系統(索引,架構等)的API的訪問。

c)您將找到的大多數Gremlin示例都是用Groovy編寫的,因此您可能會更輕松地完成此工作。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM