1

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?

espeed
  • 4,754
  • 2
  • 39
  • 51
liv2hak
  • 14,472
  • 53
  • 157
  • 270

1 Answers1

3

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')).
stephen mallette
  • 45,298
  • 5
  • 67
  • 135
  • what is the difference between rexster console and rexster server? – liv2hak May 13 '14 at 20:46
  • It's a very big difference. Two different programs actually. Rexster Server is, well, a server. It serves the REST API, RexPro and Dog House. Rexster Console is a client application that connects to Rexster Server via RexPro. You can use Rexster Console to issue Gremlin remotely to Rexster Server. – stephen mallette May 13 '14 at 21:49
  • What you are saying is in my example above Rexster server is running as an interface (in front of) Titan thus enabling the rexster console to talk to Titan + Cassandra via Rexster server – liv2hak May 13 '14 at 21:59
  • I don't quite follow you, but if you don't have a Rexster Server running, then Rexster Console has nothing to "talk to". Rexster Server is responsible for hosting a Titan graph instance. Run `rexster.sh` to expose your graphs. Run 'rexster-console.sh' as one way to see what is in the graph, mutate the graph, execute traversals, etc. – stephen mallette May 13 '14 at 22:04
  • 1
    Sorry, i just noticed why there is confusion - never mind about `rexster.sh`. You are using Titan Server - `rexster.sh` starts as a result of starting `titan.sh`. The rest of my answer holds. – stephen mallette May 13 '14 at 22:06