Code Monkey home page Code Monkey logo

Comments (5)

triggan avatar triggan commented on September 4, 2024 1

I was successfully able to reproduce the issue and I now see what you're referring to. The issue seems to be with the DriverRemoteConnection.tx() call when creating a Transaction object. That particular method uses client.getCluster(), [1] which we presently do not override in the GremlinClient class.

I'm looking at a fix that would create an overridden getCluster() method in the GremlinClient that would fetch an available Client (much like how the chooseConnection() method currently works) in order to return the parent Cluster object for that Client to return for the creation of the Transaction. I'll try to have something next week for review.

[1] https://github.com/apache/tinkerpop/blob/4c09ceef17611ca57e2faf4546960cac333d76f3/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/remote/DriverRemoteConnection.java#L282

from amazon-neptune-tools.

triggan avatar triggan commented on September 4, 2024

Can you say a bit more about how you are using this client library? Are you attempting to connect via localhost because you're using an SSH proxy to connect to Neptune?

Or are you trying to use Gremlin Server locally with this client?

from amazon-neptune-tools.

Pred05 avatar Pred05 commented on September 4, 2024

Yes of course, I try to test transactions with an AWS Neptune cluster which is in 1.2 version without a proxy (with a VPN access to the VPC). The gremlin driver is configured to call the Neptune cluster, and it works well on basic queries. But when I want to open a transaction like below, I got the exception and when I debug I can saw into GremlinCluster.connect() an initialization of a cluster which is used by transactions and not by standard queries (which use a connection into the clusterCollection if I understand well)

Initialization of the cluster with an host equal to localhost : line 57: Cluster parentCluster = clusterBuilder.apply(null);

final var vertex = traversalProvider.g().V().addV("myFirsNode").next(); // Work well and go into my Neptune cluster (I checked with a breakpoint and a query with the API outside of my test
final var transaction = traversalProvider.g().tx();
final GraphTraversalSource traversalInTransaction = transaction.begin();
traversalInTransaction.addV("myNewNode").addE("isConnectedTo").from(vertex).iterate()
transaction.commit();

from amazon-neptune-tools.

Pred05 avatar Pred05 commented on September 4, 2024

Ok super, thank you.

from amazon-neptune-tools.

iansrobinson avatar iansrobinson commented on September 4, 2024

Hi @Pred05 Thanks for reporting this. I've created a PR to fix this issue, and update the readme with an example:

#275

/cc @triggan

from amazon-neptune-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.