Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-914

DriverRemoteAcceptor in Gremlin Console supports aliases

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Implemented
    • Affects Version/s: 3.0.2-incubating
    • Fix Version/s: 3.1.0-incubating
    • Component/s: console
    • Labels:
      None

      Description

      Not sure how this should work, but it seems that "aliases" are growing in importance and perhaps even a pattern for usage. As such, the Console and it's :submit should respect it somehow. Maybe a remote should get bound to a single rebinding?

        Activity

        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

        https://github.com/apache/incubator-tinkerpop/pull/137

        Show
        githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/incubator-tinkerpop/pull/137
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user dkuppitz commented on the pull request:

        https://github.com/apache/incubator-tinkerpop/pull/137#issuecomment-155027875

        Yep, looks good to me, too.

        VOTE: +1, can be merged

        Show
        githubbot ASF GitHub Bot added a comment - Github user dkuppitz commented on the pull request: https://github.com/apache/incubator-tinkerpop/pull/137#issuecomment-155027875 Yep, looks good to me, too. VOTE: +1, can be merged
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user PommeVerte commented on the pull request:

        https://github.com/apache/incubator-tinkerpop/pull/137#issuecomment-155021818

        Code looks clean, the documentation reflects all the changes. Look all good for me.

        Tests all pass as well.

        VOTE: +1

        Show
        githubbot ASF GitHub Bot added a comment - Github user PommeVerte commented on the pull request: https://github.com/apache/incubator-tinkerpop/pull/137#issuecomment-155021818 Code looks clean, the documentation reflects all the changes. Look all good for me. Tests all pass as well. VOTE: +1
        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user spmallette opened a pull request:

        https://github.com/apache/incubator-tinkerpop/pull/137

        TINKERPOP3-914 Gremlin Console :remote to Gremlin Server supports alias

        https://issues.apache.org/jira/browse/TINKERPOP3-914

        Added a "alias" option to :remote config that lets the user supply key/value pairs representing the aliases. Included "show" and "reset" options as well. Updated docs which generate nicely.

        Unit tests were added as well as integration tests so build/test should be:

        ```text
        mvn clean install
        mvn clean install -DskipIntegrationTests=false -pl gremlin-console
        ```

        Test manually after starting gremlin server with:

        ```text
        gremlin> :remote connect tinkerpop.server conf/remote.yaml
        ==>Connected - localhost/127.0.0.1:8182
        gremlin> :> TinkerFactory.generateModern(graph)
        ==>null
        gremlin> :> graph
        ==>tinkergraph[vertices:6 edges:6]
        gremlin> :> g.V()
        ==>v[1]
        ==>v[2]
        ==>v[3]
        ==>v[4]
        ==>v[5]
        ==>v[6]
        gremlin> :remote config alias x g
        ==>x=g
        gremlin> :> x.V()
        ==>v[1]
        ==>v[2]
        ==>v[3]
        ==>v[4]
        ==>v[5]
        ==>v[6]
        gremlin> :remote config alias show
        ==>x=g
        gremlin> :remote config alias reset
        ==>Aliases cleared
        gremlin> :remote config alias show
        gremlin>
        ```

        VOTE: +1

        You can merge this pull request into a Git repository by running:

        $ git pull https://github.com/apache/incubator-tinkerpop TINKERPOP3-914

        Alternatively you can review and apply these changes as the patch at:

        https://github.com/apache/incubator-tinkerpop/pull/137.patch

        To close this pull request, make a commit to your master/trunk branch
        with (at least) the following in the commit message:

        This closes #137


        commit 2c7823e8abc9dc3214c33296b58182a9bf961882
        Author: Stephen Mallette <spmva@genoprime.com>
        Date: 2015-11-05T16:52:55Z

        TINKERPOP3-914 Gremlin Console :remote to Gremlin Server supports alias

        Added a "alias" option to :remote config that lets the user supply key/value pairs representing the aliases. Included "show" and "reset" options as well. Updated docs which generate nicely.


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user spmallette opened a pull request: https://github.com/apache/incubator-tinkerpop/pull/137 TINKERPOP3-914 Gremlin Console :remote to Gremlin Server supports alias https://issues.apache.org/jira/browse/TINKERPOP3-914 Added a "alias" option to :remote config that lets the user supply key/value pairs representing the aliases. Included "show" and "reset" options as well. Updated docs which generate nicely. Unit tests were added as well as integration tests so build/test should be: ```text mvn clean install mvn clean install -DskipIntegrationTests=false -pl gremlin-console ``` Test manually after starting gremlin server with: ```text gremlin> :remote connect tinkerpop.server conf/remote.yaml ==>Connected - localhost/127.0.0.1:8182 gremlin> :> TinkerFactory.generateModern(graph) ==>null gremlin> :> graph ==>tinkergraph [vertices:6 edges:6] gremlin> :> g.V() ==>v [1] ==>v [2] ==>v [3] ==>v [4] ==>v [5] ==>v [6] gremlin> :remote config alias x g ==>x=g gremlin> :> x.V() ==>v [1] ==>v [2] ==>v [3] ==>v [4] ==>v [5] ==>v [6] gremlin> :remote config alias show ==>x=g gremlin> :remote config alias reset ==>Aliases cleared gremlin> :remote config alias show gremlin> ``` VOTE: +1 You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/incubator-tinkerpop TINKERPOP3-914 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-tinkerpop/pull/137.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #137 commit 2c7823e8abc9dc3214c33296b58182a9bf961882 Author: Stephen Mallette <spmva@genoprime.com> Date: 2015-11-05T16:52:55Z TINKERPOP3-914 Gremlin Console :remote to Gremlin Server supports alias Added a "alias" option to :remote config that lets the user supply key/value pairs representing the aliases. Included "show" and "reset" options as well. Updated docs which generate nicely.
        Hide
        spmallette stephen mallette added a comment -

        I settled on allowing for multiple aliases to be configured per remote. You can do:

        :remote config alias x g
        

        which will allow a variable "g" on the server to be referred to as "x" in a script. which means you can do:

        :> x.V()
        

        To do multiple aliases, you can just offer additional key/value pairs in the same config. Also include a "show" and "reset" options to the config command.

        Show
        spmallette stephen mallette added a comment - I settled on allowing for multiple aliases to be configured per remote. You can do: :remote config alias x g which will allow a variable "g" on the server to be referred to as "x" in a script. which means you can do: :> x.V() To do multiple aliases, you can just offer additional key/value pairs in the same config. Also include a "show" and "reset" options to the config command.

          People

          • Assignee:
            spmallette stephen mallette
            Reporter:
            spmallette stephen mallette
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development