简体   繁体   English

Titan DB +卡桑德拉+ Rexster。 在cassandra中创建和保存图形并在rexster中显示

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

I am very beginner to graph database and Titandb. 我是数据库和Titandb图形的初学者。 I am trying to create a small graph and saving into cassandra. 我正在尝试创建一个小图并保存到cassandra中。

a) I added vertices and edges with TinkerGraph and tried to save. a)我用TinkerGraph添加了顶点和边并尝试保存。 Later I got to know It is not possible to save TinkerGraph. 后来我知道不可能保存TinkerGraph。 Then what is the use of it? 那有什么用呢?

b) I tried b)我试过

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

Got following error 出现以下错误

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

What does g.getManagementSystem() mean? g.getManagementSystem()是什么意思?

c) Which programming I need to learn for Gremlin (groovy or java)? c)我需要为Gremlin学习哪种编程(groovy或Java)?

I have downloaded titan-1.0.0-hadoop1.zip , rexster-server-2.6.0.zip . 我已经下载了titan-1.0.0-hadoop1.ziprexster-server-2.6.0.zip

I am not understanding head and tail of it. 我不了解它的头和尾。 Please someone help me to create simple graph in titan and save into cassandra and visualise from rexster 请有人帮助我在titan创建简单图形并保存到cassandra并从rexster可视化

You can't mix Rexster with Titan 1.x. 您不能将Rexster与Titan 1.x混合使用。 Titan 0.5.x is compatible with Rexster. Titan 0.5.x与Rexster兼容。 Titan 1.x is compatible with Rexster's replacement Gremlin Server . Titan 1.x与Rexster的替代Gremlin Server兼容。 You should not need to download Gremlin Server separately. 您不需要单独下载Gremlin Server。 It is distributed with Titan 1.0.0. 它随Titan 1.0.0一起分发。 You can just start it with: 您可以从以下内容开始:

bin/titan.sh start

You can read the appropriate instructions here . 您可以在此处阅读相应的说明。

a) I added vertices and edges with TinkerGraph and tried to save. a)我用TinkerGraph添加了顶点和边并尝试保存。 Later I got to know It is not possible to save TinkerGraph. 后来我知道不可能保存TinkerGraph。 Then what is the use of it? 那有什么用呢?

TinkerGraph is an in-memory database. TinkerGraph是一个内存数据库。 It has many uses. 它有很多用途。 You can use it for learning (which is where you are now), analyzing sub-graphs from larger graphs, production systems where graphs tend to be static and fit in memory, etc. You can read more about that in this tutorial on Gremlin Console . 您可以使用它进行学习(现在就在这里),分析较大图形的子图形,生产系统中图形往往是静态的并适合内存的等等。您可以在Gremlin Console上的教程中了解更多信息。

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

You use the Management System API to create the schema for Titan (ie tell it which properties, define edge/vertex labels, etc.) By defining a schema you give Titan hints on how to be more efficient. 您可以使用Management System API为Titan创建模式(即告诉它哪些属性,定义边/顶点标签等)。通过定义模式 ,Titan可以提示如何提高效率。

c) Which programming I need to learn for Gremlin (groovy or java)? c)我需要为Gremlin学习哪种编程(groovy或Java)?

As of TinkerPop 3.x, Gremlin is just pure Java. 从TinkerPop 3.x开始,Gremlin只是纯Java。 You only use groovy for syntactic sugar in most cases. 在大多数情况下,仅将Groovy用于语法糖

If you are trying to learn to program and learn graphs and learn TinkerPop all at the same time I highly recommend that you not work with Titan first. 如果您想同时学习编程和图形学习以及TinkerPop,我强烈建议您不要先使用Titan。 Start with TinkerGraph and the Gremlin Console to learn the basics. 从TinkerGraph和Gremlin Console开始学习基础知识。 This "Getting Started " tutorial should be helpful. 这个“入门 ”教程应该会有所帮助。 When you've become more comfortable with TinkerGraph, then consider looking at Titan. 当您对TinkerGraph更加满意时,请考虑使用Titan。 What's wonderful about TinkerPop is that switching to try other graphs is easy. TinkerPop的奇妙之处在于,切换到其他图形非常容易。 If you know how to use Gremlin with TinkerGraph, then you should be good to use it with Titan, Neo4j, or any other graph database you'd like to use. 如果您知道如何将Gremlin与TinkerGraph一起使用,那么最好将其与Titan,Neo4j或您要使用的任何其他图形数据库一起使用。

a) TinkerGraph is a reference implementation for vendors implementing the TinkerPop APIs, as well as a sandbox for playing around. a)TinkerGraph是供应商实现TinkerPop API的参考实现,也是用于玩耍的沙盒。 It's not intended to be used in production. 它不打算用于生产中。

b) What version of Titan are you using? b)您使用的是哪个版本的Titan? The getManagementSystem API doesn't exist in Titan 1.0.0 . Titan 1.0.0中不存在getManagementSystem API。 The management subsystem exists to provide access to APIs for various Titan-specific subsystems (indexing, schema, etc). 存在管理子系统是为了提供对各种Titan特定子系统(索引,架构等)的API的访问。

c) Most Gremlin examples you'll find are written in Groovy, so you'll probably have an easier time with that. c)您将找到的大多数Gremlin示例都是用Groovy编写的,因此您可能会更轻松地完成此工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM