You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/12/02 18:54:11 UTC

[jira] [Commented] (TINKERPOP3-860) Bindings applied to the PluginAcceptor should appear to Gremlin Server

    [ https://issues.apache.org/jira/browse/TINKERPOP3-860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15036252#comment-15036252 ] 

ASF GitHub Bot commented on TINKERPOP3-860:
-------------------------------------------

GitHub user spmallette opened a pull request:

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

    TINKERPOP3-860 Bindings applied to the PluginAcceptor should appear to Gremlin Server

    Bindings from plugins were being pushed into the ScriptEngine context but were not being merged into the bindings used on eval.  They had to be merged together.  In doing this, I also found a bug where plugins could conflict with one another (i.e. the first plugin would install, then the second would come along an blow out what the previous one had done) - fixed that.  Added test cases to cover these scenarios.
    
    I tested with:
    
    ```text
    mvn clean install
    mvn verify -DskipIntegrationTests=false -pl gremlin-server
    mvn verify -DskipIntegrationTests=false -pl gremlin-groovy
    ```
    
    and also tested Gremlin Server manually:
    
    ```text
    gremlin> :remote connect tinkerpop.server conf/remote.yaml
    ==>Connected - localhost/127.0.0.1:8182
    gremlin> :> hdfs.toString()
    ==>org.apache.hadoop.fs.LocalFileSystem@7154cf94
    ```
    
    A manual test requires:
    
    ```text
    bin/gremlin.sh -i org.apache.tinkerpop hadoop-gremlin 3.1.1-SNAPSHOT
    ```
    
    and editing the gremlin server yaml file to include `tinkerpop.hadoop` in the "plugins" key:
    
    ```yaml
    plugins:
      - tinkerpop.tinkergraph
      - tinkerpop.hadoop
    ```

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

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

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

    https://github.com/apache/incubator-tinkerpop/pull/166.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 #166
    
----
commit b503e41552e533bc4420a968ba591faacd1c6e27
Author: Stephen Mallette <sp...@genoprime.com>
Date:   2015-12-02T17:44:36Z

    Adjusted ScriptEngines to "merge" bindings.
    
    Bindings from plugins were being pushed into the ScriptEngine context but were not being merged into the bindings used on eval.  They had to be merged together.  In doing this, I also found a bug where plugins could conflict with one another (i.e. the first plugin would install, then the second would come along an blow out what the previous one had done) - fixed that.  Added test cases to cover these scenarios.

----


> Bindings applied to the PluginAcceptor should appear to Gremlin Server
> ----------------------------------------------------------------------
>
>                 Key: TINKERPOP3-860
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP3-860
>             Project: TinkerPop 3
>          Issue Type: Improvement
>          Components: hadoop, plugin
>    Affects Versions: 3.0.2-incubating
>            Reporter: stephen mallette
>            Assignee: stephen mallette
>            Priority: Minor
>             Fix For: 3.1.1-incubating
>
>
> An concrete example here is In {{HadoopGremlinPlugin}} where the {{hdfs}} object is added to global bindings.  If you fire that plugin up in Gremlin Server, that object isn't present:
> gremlin> :> hdfs.ls()
> No such property: hdfs for class: Script10
> Display stack trace? [yN] n



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)