pythongroovytitanbulbsrexster

Testing Vertices creation from Groovy commandline in Rexster


I have Titan (with embedded cassandra running on my system).

cd titan-cassandra-0.3.1
bin/titan.sh config/titan-server-rexster.xml config/titan-server-cassandra.properties

I have rexster server running

cd rexster-console-2.3.0
bin/rexster-console.sh

I have installed bulbs on my system as follows.

sudo apt-get install python2.7-dev
sudo apt-get install libyaml-dev

sudo pip install  https://github.com/espeed/bulbs/tarball/master

If I try the following from python code on my machine I run the following.

  from bulbs.titan import Graph
  g = Graph()
  switch = g.vertices.create(name="switch")
  device = g.vertices.create(name="device")
  g.edges.create(switch, "connected to", device)

My question is How do I know if the vertices with the above names have been created by querying the groovy command line in rexster?


Solution

  • I would think you could verify vertex creation in several ways:

    1. Your switch and device variables should have some data in them, specifically a new vertex identifier should have been generate for them. Inspecting those variables should tell you something about creation.
    2. But you specifically asked about the "groovy command line in rexster" which I think must mean rexster-console. Start it with bin/rexster-console.sh and then issue a g.V (or whatever gremlin you want - maybe a key index lookup on name if one has been defined - g.V('name','switch')).