- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用 Titan Graph DB 对网络拓扑进行建模。我想从 Python 应用程序中指定拓扑。
我有一个使用 tinkertop 框架注释的 java 接口(interface)文件。下面给出了一个示例结构。
public interface IDeviceObject extends IBaseObject {
@JsonProperty("mac")
@Property("dl_addr")
public String getMACAddress();
@Property("dl_addr")
public void setMACAddress(String macaddr);
@JsonProperty("ipv4")
@Property("nw_addr")
public String getIPAddress();
@Property("nw_addr")
public void setIPAddress(String ipaddr);
@JsonIgnore
@Adjacency(label="host",direction = Direction.IN)
public Iterable<IPortObject> getAttachedPorts();
@JsonIgnore
@Adjacency(label="host",direction=Direction.IN)
public void setHostPort(final IPortObject port);
@JsonIgnore
@Adjacency(label="host",direction=Direction.IN)
public void removeHostPort(final IPortObject port);
@JsonIgnore
@GremlinGroovy("it.in('host').in('on')")
public Iterable<ISwitchObject> getSwitch();
}
PYTHON OBJECTS ----> BULBS ----> REXTER ---> Titan Graph DB ---> Cassandra DB
(1) BULBS将python对象转为Graphs(2) Rexter将Graphs转JSON(3) Titan将JSON转回Graphs??(4) 并且也写入cassandra store
看起来我做事的方式很绕,我错过了什么?如果有人能指出上述内容有什么问题,那就太好了?
最佳答案
你的图表:
PYTHON OBJECTS ----> BULBS ----> Rexster ---> Titan Graph DB ---> Cassandra DB
看起来或多或少是正确的,这取决于你想如何看待所涉及的抽象。您也可以将其定义为:
PYTHON OBJECTS ----> BULBS ----> Rexster/Titan ---> Cassandra DB
由于 Rexster 基本上嵌入了一个 Titan 实例,它通过 REST 公开供 Bulbs 使用。这部分不太正确:
我会说:
归根结底,Python 与 Titan 没有直接联系。 Titan 具有基于 JVM 的蓝图接口(interface),并使用 Rexster 作为非 JVM 语言与其对话的方式。
关于python - 从 Python 使用 Titan Graph 数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23190344/
执行以下遍历时: graph.addVertex("a") graph.addVertex("b") graph.addVertex("c") graph.traversal().V().range(
例如,我想在查询时排除一些顶点 ID。 第 1 步:我正在带领用户跟随我 (1234): g.V(1234).outE("following") 输出: 9876,3246,2343,3452,123
我写了一个 JUnit 测试来检查 generate-modern.groovy如果 marko 存在,则绘制图表。 我的小鬼查询是 "g.V().has('name','marko')"; 正如您在
在我的系统中,我要求节点上的边数必须存储为顶点上的内部属性以及特定输出边上的以顶点为中心的索引。这自然需要我在所有数据加载完成后计算节点上的边数。我这样做如下: long edgeCount = gr
目标 我有一个足够简单的任务需要完成:设置特定边属性的权重。以这个场景为例: 我想做的是更新 weight 的值. 附加要求 如果边不存在,则应创建它。 两个节点之间最多只能存在一条相同类型的边(即,
一个非常基本的问题 我刚刚将Titan从0.54升级到Titan 1.0 Hadoop 1/TP3版本3.01。 我在删除的值时遇到问题 Property key: Cardinality.LIST/
我是泰坦的新手。 我正在使用ubuntu 12.04并使用从deb软件包安装的cassandra 2.0和ES 1.0。 我试图让ES与titan一起工作。 gremlin> g = TitanF
我正在关注 http://s3.thinkaurelius.com/docs/titan/1.0.0/getting-started.html我的 Windows 机器上的指南。 但我在第一步就陷入困
我对 Titan/Gremlin/TinkerPop3 非常陌生,正在尝试使用 Restful API 接口(interface)来创建/修改/删除数据库中的顶点/边。 我主要想看看是否可以使用tin
我正在使用以下Rexster查询: string gremlinQuery = "g.v(" + companyVertexId + ").transform{[salaryInfo:it.outE
我正在使用 Titan-1.0.0,我想将其迁移到 janusgraph-0.1.1。我需要做哪些配置更改?我还想使用 JanusGraph 重用 Titan 的数据。 最佳答案 从 Titan 迁移
我想删除两个顶点之间的边,所以我在 java tinkerpop3 中的代码如下 private void removeEdgeOfTwoVertices(Vertex fromV, Vertex t
我正在尝试掌握 Gremlin。彻底阅读文档后,我似乎仍然在概念上苦苦挣扎。 我正在创建一个基本的新闻源,遵循此处 Neo4j 文档中的模型: http://neo4j.com/docs/snapsh
我在 Spring Web 应用程序中使用 Titan。当我添加新边或删除一个顶点时,它实际上已删除但未反射(reflect)在我的网页中。我的查询仍然得到旧的边或顶点。 为此,我必须重新启动我的应用
我一直试图在 Gremlin 查询中找出这个 if-else。假设 g.V({0}) 是下面的群顶点。 var q = "g.V({0}).as('groupName', 'groupId',
我有一个带有几个索引的图表。它们是两个带有标签限制的复合指数。 (两者在不同的属性/标签上完全相同)。 一个似乎确实有效,但另一个无效。我已经完成了以下 profile() 以进行双重检查: 一个叫K
背景:我正在尝试使用 this approach 实现一个时间序列版本数据库,使用 gremlin (tinkerpop v3)。 我想获取给定身份节点(蓝色)的最新状态节点(红色)(由包含时间戳范围
很明显,在两个顶点之间找到边的简单方法是: graph.traversal().V(outVertex).bothE(edgeLabel).filter(__.otherV().is(inVertex
我目前正在阅读TinkerPop3 Documentation 我感到困惑的是,我找不到关于next()的任何解释。 例如,w/next()或w/o next()返回相同的文字 gremlin> g.
在DataStax收购Aurelius之后,自从Titan 1.0.0在2015年9月发布以来,自那时以来几乎没有提交过,所以我想知道在生产中使用TitanDB是否安全。谁能给我一些见识? 最佳答案
我是一名优秀的程序员,十分优秀!