0

I am new to graph databases, gremlin and tinkerpop. We are using them in an application we are building and the setup has been done by some other team.

Now when I try to run the gremlin queries provided in the tinkerpop documentation, many of them are not working and I am getting errors saying 'no signature of method:'.

Can you please guide me on what and how to check, either versions or anything else to make them work.

We are using janusgraph, cassandra as storage backend and elasticsearch for indexing.

Vipul Sharma
  • 768
  • 3
  • 11
  • 25
  • checked the gremlin version using Gremlin.version() command. Its 3.2.3 and I was checking the current version documentation (3.3.1). Can anyone help me in upgrading gremlin version? – Vipul Sharma Sep 14 '17 at 09:37
  • See JanusGraph version compatibility matrix http://docs.janusgraph.org/latest/version-compat.html – Jason Plurad Sep 14 '17 at 13:40
  • thanks @JasonPlurad. it says that my janusgraph version(0.1.1) is only compatible with 3.2.x. So will wait for a newer version of janusgraph. – Vipul Sharma Sep 14 '17 at 17:17
  • Why are you required to use TinkerPop 3.3.0? It was just released, and I'm not sure many graph db's are implementing it yet. – Jason Plurad Sep 14 '17 at 17:49
  • I needed a query like this [link](https://stackoverflow.com/questions/46207803/gremlin-select-a-vertex-create-new-vertices-and-edges-in-single-query). This is only present in 3.3.0. Can you suggest an alternate query? – Vipul Sharma Sep 15 '17 at 04:24
  • There is already an accepted answer from Florian on that question which I verified works on JanusGraph 0.1.1. – Jason Plurad Sep 15 '17 at 12:25
  • yes it works. did a typo while editing query variables. thanks for pointing it out @JasonPlurad :) – Vipul Sharma Sep 15 '17 at 13:13

1 Answers1

2

Checking the version of Gremlin as you did was the right path to take. There may be minor differences between "z" versions of x.y.z and larger differences between "y" versions of 'x.y.z'. So for 3.2.3 you would want this documentation for TinkerPop:

http://tinkerpop.apache.org/docs/3.2.3/reference/

As of this writing, JanusGraph has not yet released a version with TinkerPop 3.3.0 support and my sense is that it is not quite as trivial as just bumping the version number. 3.3.0 introduced a number of changes that graph providers would likely have to deal with in the form of new test, revised semantics, class renaming, etc. It's not something you would likely be able to do on your own without prior knowledge to how JanusGraph works.

There does appear to be a pull request for 3.3.0 support however so you could try to build that if you'd like an early look at how it works. If not I suggest you consult the 3.2.3 documentation and simply write your Gremlin in that form. 3.3.0 doesn't really introduce a ton of major new Gremlin steps, so you aren't missing much - I think you only get limit() and better addE() semantics. I would be sure to consult javadocs of 3.2.6 for a full list of every Gremlin step that is deprecated so that when JanusGraph does release 3.3.0 support, you are in the best position to upgrade.

stephen mallette
  • 45,298
  • 5
  • 67
  • 135