JanusGraph之 Transaction Log

  1. Transaction Log Use Cases

为待定事务启动日志记录:

tx = graph.buildTransaction().logIdentifier('addedPerson').start()
u = tx.addVertex(label, 'human')
u.property('name', 'proteros')
u.property('age', 36)
tx.commit()

任何的一次更改都活被记录在用户日子系统中,用户日志系统是一个可配置的日志后端,具有一个JanusGraph兼容的日志接口

tx = graph.buildTransaction().logIdentifier('battle').start()
h = tx.traversal().V().has('name', 'hercules').next()
m = tx.addVertex(label, 'monster')
m.property('name', 'phylatax')
h.addEdge('battled', m, 'time', 22)
tx.commit()
    1.1  Record of Change
    1.2  Downstream Updates
    1.3  Triggers

2. Log Configuration

猜你喜欢

转载自blog.csdn.net/qq_32662595/article/details/78656711
今日推荐