I'm working with Gremlin.Net & Neptune and once a while some of the requests fail without much information in the error message (InternalFailureException).
I want to try and send the request through curl to the server's "/gremlin/explain" URL to get more information.
Since I build the request with the GraphTraversal class (and it is very long), I'm looking for a way to get the equivalent gremlin commands as the request which was sent.
Is there any easy way to get it?
Are there any other ways to understand why Neptune failed the request?
Getting request data with Gremlin.Net
402 Views Asked by Avner Levy At
1
I assume you would like to get a String representation of your query so that you can POST it to the
/gremlin/explainAPI. With Java and Javascript it's possible to do such a thing fairly directly with TinkerPop'sTranslatorfunctions described here. Of course, for .NET and Python such things don't exist yet.Since your situation sounds like you just need a one-off solution to do some analysis with "explain" you could get the GraphSON representation of the bytecode in .NET, use Gremlin Console's
:bytecodecommand to convert it to aStringrepresentation.So, first get the
Bytecodeobject as GraphSON:Copy/paste that "graphSON" string into Gremlin Console:
Note that I use a TinkerGraph there just as a host to reconstruct the traversal.