[9/9] tinkerpop git commit: Merge branch 'tp33'

2018-06-27 Thread florianhockmann
Merge branch 'tp33'


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/935ef5c9
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/935ef5c9
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/935ef5c9

Branch: refs/heads/master
Commit: 935ef5c9db8209db30986b8de57d012cdf656e9e
Parents: cff4c16 4f462c5
Author: Florian Hockmann 
Authored: Wed Jun 27 19:21:19 2018 +0200
Committer: Florian Hockmann 
Committed: Wed Jun 27 19:21:19 2018 +0200

--
 .../src/Gremlin.Net/Driver/ConnectionPool.cs| 26 +---
 1 file changed, 17 insertions(+), 9 deletions(-)
--




[6/9] tinkerpop git commit: Merge branch 'TINKERPOP-1978' into tp32

2018-06-27 Thread florianhockmann
Merge branch 'TINKERPOP-1978' into tp32


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/c02b9934
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/c02b9934
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/c02b9934

Branch: refs/heads/master
Commit: c02b9934c73d7b915333cb873e97de7789f35a80
Parents: 160c1de c4a2547
Author: Florian Hockmann 
Authored: Wed Jun 27 19:19:12 2018 +0200
Committer: Florian Hockmann 
Committed: Wed Jun 27 19:19:12 2018 +0200

--
 .../src/Gremlin.Net/Driver/ConnectionPool.cs| 26 +---
 1 file changed, 17 insertions(+), 9 deletions(-)
--




[3/9] tinkerpop git commit: Add check for connection state before returning it TINKERPOP-1978

2018-06-27 Thread florianhockmann
Add check for connection state before returning it TINKERPOP-1978


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/c4a25472
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/c4a25472
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/c4a25472

Branch: refs/heads/tp33
Commit: c4a254726167d798617331ff3dd00ece97377b2d
Parents: 32aebb8
Author: Florian Hockmann 
Authored: Sat Jun 23 12:24:15 2018 +0200
Committer: Florian Hockmann 
Committed: Sat Jun 23 12:24:15 2018 +0200

--
 .../src/Gremlin.Net/Driver/ConnectionPool.cs| 26 +---
 1 file changed, 17 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c4a25472/gremlin-dotnet/src/Gremlin.Net/Driver/ConnectionPool.cs
--
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/ConnectionPool.cs 
b/gremlin-dotnet/src/Gremlin.Net/Driver/ConnectionPool.cs
index 9501686..d9e53f4 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/ConnectionPool.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/ConnectionPool.cs
@@ -23,7 +23,6 @@
 
 using System;
 using System.Collections.Concurrent;
-using System.Collections.Generic;
 using System.Linq;
 using System.Threading.Tasks;
 using Gremlin.Net.Process;
@@ -45,19 +44,28 @@ namespace Gremlin.Net.Driver
 
 public async Task GetAvailableConnectionAsync()
 {
-Connection connection = null;
-lock (_connectionsLock)
-{
-if (!_connections.IsEmpty)
-_connections.TryTake(out connection);
-}
-
-if (connection == null)
+if (!TryGetConnectionFromPool(out var connection))
 connection = await 
CreateNewConnectionAsync().ConfigureAwait(false);
 
 return new ProxyConnection(connection, AddConnectionIfOpen);
 }
 
+private bool TryGetConnectionFromPool(out Connection connection)
+{
+while (true)
+{
+connection = null;
+lock (_connectionsLock)
+{
+if (_connections.IsEmpty) return false;
+_connections.TryTake(out connection);
+}
+
+if (connection.IsOpen) return true;
+connection.Dispose();
+}
+}
+
 private async Task CreateNewConnectionAsync()
 {
 NrConnections++;



[1/9] tinkerpop git commit: Add check for connection state before returning it TINKERPOP-1978

2018-06-27 Thread florianhockmann
Repository: tinkerpop
Updated Branches:
  refs/heads/master cff4c1616 -> 935ef5c9d
  refs/heads/tp32 160c1def3 -> c02b9934c
  refs/heads/tp33 84c3ff40e -> 4f462c532


Add check for connection state before returning it TINKERPOP-1978


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/c4a25472
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/c4a25472
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/c4a25472

Branch: refs/heads/master
Commit: c4a254726167d798617331ff3dd00ece97377b2d
Parents: 32aebb8
Author: Florian Hockmann 
Authored: Sat Jun 23 12:24:15 2018 +0200
Committer: Florian Hockmann 
Committed: Sat Jun 23 12:24:15 2018 +0200

--
 .../src/Gremlin.Net/Driver/ConnectionPool.cs| 26 +---
 1 file changed, 17 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c4a25472/gremlin-dotnet/src/Gremlin.Net/Driver/ConnectionPool.cs
--
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/ConnectionPool.cs 
b/gremlin-dotnet/src/Gremlin.Net/Driver/ConnectionPool.cs
index 9501686..d9e53f4 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/ConnectionPool.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/ConnectionPool.cs
@@ -23,7 +23,6 @@
 
 using System;
 using System.Collections.Concurrent;
-using System.Collections.Generic;
 using System.Linq;
 using System.Threading.Tasks;
 using Gremlin.Net.Process;
@@ -45,19 +44,28 @@ namespace Gremlin.Net.Driver
 
 public async Task GetAvailableConnectionAsync()
 {
-Connection connection = null;
-lock (_connectionsLock)
-{
-if (!_connections.IsEmpty)
-_connections.TryTake(out connection);
-}
-
-if (connection == null)
+if (!TryGetConnectionFromPool(out var connection))
 connection = await 
CreateNewConnectionAsync().ConfigureAwait(false);
 
 return new ProxyConnection(connection, AddConnectionIfOpen);
 }
 
+private bool TryGetConnectionFromPool(out Connection connection)
+{
+while (true)
+{
+connection = null;
+lock (_connectionsLock)
+{
+if (_connections.IsEmpty) return false;
+_connections.TryTake(out connection);
+}
+
+if (connection.IsOpen) return true;
+connection.Dispose();
+}
+}
+
 private async Task CreateNewConnectionAsync()
 {
 NrConnections++;



[8/9] tinkerpop git commit: Merge branch 'tp32' into tp33

2018-06-27 Thread florianhockmann
Merge branch 'tp32' into tp33


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/4f462c53
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/4f462c53
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/4f462c53

Branch: refs/heads/tp33
Commit: 4f462c5327e04c475db6c9b6af38e36587610480
Parents: 84c3ff4 c02b993
Author: Florian Hockmann 
Authored: Wed Jun 27 19:20:37 2018 +0200
Committer: Florian Hockmann 
Committed: Wed Jun 27 19:20:37 2018 +0200

--
 .../src/Gremlin.Net/Driver/ConnectionPool.cs| 26 +---
 1 file changed, 17 insertions(+), 9 deletions(-)
--




[7/9] tinkerpop git commit: Merge branch 'tp32' into tp33

2018-06-27 Thread florianhockmann
Merge branch 'tp32' into tp33


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/4f462c53
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/4f462c53
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/4f462c53

Branch: refs/heads/master
Commit: 4f462c5327e04c475db6c9b6af38e36587610480
Parents: 84c3ff4 c02b993
Author: Florian Hockmann 
Authored: Wed Jun 27 19:20:37 2018 +0200
Committer: Florian Hockmann 
Committed: Wed Jun 27 19:20:37 2018 +0200

--
 .../src/Gremlin.Net/Driver/ConnectionPool.cs| 26 +---
 1 file changed, 17 insertions(+), 9 deletions(-)
--




[5/9] tinkerpop git commit: Merge branch 'TINKERPOP-1978' into tp32

2018-06-27 Thread florianhockmann
Merge branch 'TINKERPOP-1978' into tp32


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/c02b9934
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/c02b9934
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/c02b9934

Branch: refs/heads/tp32
Commit: c02b9934c73d7b915333cb873e97de7789f35a80
Parents: 160c1de c4a2547
Author: Florian Hockmann 
Authored: Wed Jun 27 19:19:12 2018 +0200
Committer: Florian Hockmann 
Committed: Wed Jun 27 19:19:12 2018 +0200

--
 .../src/Gremlin.Net/Driver/ConnectionPool.cs| 26 +---
 1 file changed, 17 insertions(+), 9 deletions(-)
--




[4/9] tinkerpop git commit: Merge branch 'TINKERPOP-1978' into tp32

2018-06-27 Thread florianhockmann
Merge branch 'TINKERPOP-1978' into tp32


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/c02b9934
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/c02b9934
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/c02b9934

Branch: refs/heads/tp33
Commit: c02b9934c73d7b915333cb873e97de7789f35a80
Parents: 160c1de c4a2547
Author: Florian Hockmann 
Authored: Wed Jun 27 19:19:12 2018 +0200
Committer: Florian Hockmann 
Committed: Wed Jun 27 19:19:12 2018 +0200

--
 .../src/Gremlin.Net/Driver/ConnectionPool.cs| 26 +---
 1 file changed, 17 insertions(+), 9 deletions(-)
--




[2/9] tinkerpop git commit: Add check for connection state before returning it TINKERPOP-1978

2018-06-27 Thread florianhockmann
Add check for connection state before returning it TINKERPOP-1978


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/c4a25472
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/c4a25472
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/c4a25472

Branch: refs/heads/tp32
Commit: c4a254726167d798617331ff3dd00ece97377b2d
Parents: 32aebb8
Author: Florian Hockmann 
Authored: Sat Jun 23 12:24:15 2018 +0200
Committer: Florian Hockmann 
Committed: Sat Jun 23 12:24:15 2018 +0200

--
 .../src/Gremlin.Net/Driver/ConnectionPool.cs| 26 +---
 1 file changed, 17 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c4a25472/gremlin-dotnet/src/Gremlin.Net/Driver/ConnectionPool.cs
--
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/ConnectionPool.cs 
b/gremlin-dotnet/src/Gremlin.Net/Driver/ConnectionPool.cs
index 9501686..d9e53f4 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/ConnectionPool.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/ConnectionPool.cs
@@ -23,7 +23,6 @@
 
 using System;
 using System.Collections.Concurrent;
-using System.Collections.Generic;
 using System.Linq;
 using System.Threading.Tasks;
 using Gremlin.Net.Process;
@@ -45,19 +44,28 @@ namespace Gremlin.Net.Driver
 
 public async Task GetAvailableConnectionAsync()
 {
-Connection connection = null;
-lock (_connectionsLock)
-{
-if (!_connections.IsEmpty)
-_connections.TryTake(out connection);
-}
-
-if (connection == null)
+if (!TryGetConnectionFromPool(out var connection))
 connection = await 
CreateNewConnectionAsync().ConfigureAwait(false);
 
 return new ProxyConnection(connection, AddConnectionIfOpen);
 }
 
+private bool TryGetConnectionFromPool(out Connection connection)
+{
+while (true)
+{
+connection = null;
+lock (_connectionsLock)
+{
+if (_connections.IsEmpty) return false;
+_connections.TryTake(out connection);
+}
+
+if (connection.IsOpen) return true;
+connection.Dispose();
+}
+}
+
 private async Task CreateNewConnectionAsync()
 {
 NrConnections++;



[tinkerpop] Git Push Summary

2018-06-27 Thread spmallette
Repository: tinkerpop
Updated Branches:
  refs/heads/giraph-fix [deleted] 5088e0024


[1/2] tinkerpop git commit: TINKERPOP-1989 Enforce order of plugin load in Gremlin Console

2018-06-27 Thread spmallette
Repository: tinkerpop
Updated Branches:
  refs/heads/tp32 007c4aa64 -> 160c1def3


TINKERPOP-1989 Enforce order of plugin load in Gremlin Console

Use the order presented in the configuration file to enforce the load order.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/6c75ceb2
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/6c75ceb2
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/6c75ceb2

Branch: refs/heads/tp32
Commit: 6c75ceb25d6a828489f29b883be99ae7739e09e0
Parents: 7c7dddb
Author: Stephen Mallette 
Authored: Wed Jun 20 11:24:34 2018 -0400
Committer: Stephen Mallette 
Committed: Wed Jun 20 11:24:34 2018 -0400

--
 CHANGELOG.asciidoc  |  1 +
 .../apache/tinkerpop/gremlin/console/Console.groovy | 16 +---
 2 files changed, 10 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6c75ceb2/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 05b74da..33fe5c4 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -31,6 +31,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Improved performance of `TraversalVertexProgram` and related infrastructure.
 * Added `createGratefulDead()`to `TinkerFactory` to help make it easier to try 
to instantiate that toy graph.
 * Added identifiers to edges in the Kitchen Sink toy graph.
+* Ordered the loading of plugins in the Gremlin Console by their position in 
the configuration file.
 * Refactored the Gremlin Server integration testing framework and streamlined 
that infrastructure.
 * Fixed bug in `GroovyTranslator` that didn't properly handle empty `Map` 
objects.
 * Added concrete configuration methods to `SparkGraphComputer` to make a more 
clear API for configuring it.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6c75ceb2/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
--
diff --git 
a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
 
b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
index 4e54a42..ad41d6c 100644
--- 
a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
+++ 
b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
@@ -127,7 +127,7 @@ class Console {
 
 GremlinLoader.load()
 
-// check for available plugins.  if they are in the "active" plugins 
strategies then "activate" them
+// check for available plugins on the path and track them by plugin 
class name
 def activePlugins = Mediator.readPluginState()
 def pluginClass = mediator.useV3d3 ? 
org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin : GremlinPlugin
 ServiceLoader.load(pluginClass, 
groovy.getInterp().getClassLoader()).each { plugin ->
@@ -141,14 +141,16 @@ class Console {
 }
 
 mediator.availablePlugins.put(plugin.class.name, pluggedIn)
+}
+}
 
-if (activePlugins.contains(plugin.class.name)) {
-pluggedIn.activate()
+// if there are active plugins then initialize them in the order that 
they are listed
+activePlugins.each { pluginName ->
+def pluggedIn = mediator.availablePlugins[pluginName]
+pluggedIn.activate()
 
-if (!io.quiet)
-io.out.println(Colorizer.render(Preferences.infoColor, 
"plugin activated: " + plugin.getName()))
-}
-}
+if (!io.quiet)
+io.out.println(Colorizer.render(Preferences.infoColor, "plugin 
activated: " + pluggedIn.getPlugin().getName()))
 }
 
 // remove any "uninstalled" plugins from plugin state as it means they 
were installed, activated, but not



[1/3] tinkerpop git commit: TINKERPOP-1989 Enforce order of plugin load in Gremlin Console

2018-06-27 Thread spmallette
Repository: tinkerpop
Updated Branches:
  refs/heads/tp33 b87a555f1 -> 84c3ff40e


TINKERPOP-1989 Enforce order of plugin load in Gremlin Console

Use the order presented in the configuration file to enforce the load order.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/6c75ceb2
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/6c75ceb2
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/6c75ceb2

Branch: refs/heads/tp33
Commit: 6c75ceb25d6a828489f29b883be99ae7739e09e0
Parents: 7c7dddb
Author: Stephen Mallette 
Authored: Wed Jun 20 11:24:34 2018 -0400
Committer: Stephen Mallette 
Committed: Wed Jun 20 11:24:34 2018 -0400

--
 CHANGELOG.asciidoc  |  1 +
 .../apache/tinkerpop/gremlin/console/Console.groovy | 16 +---
 2 files changed, 10 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6c75ceb2/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 05b74da..33fe5c4 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -31,6 +31,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Improved performance of `TraversalVertexProgram` and related infrastructure.
 * Added `createGratefulDead()`to `TinkerFactory` to help make it easier to try 
to instantiate that toy graph.
 * Added identifiers to edges in the Kitchen Sink toy graph.
+* Ordered the loading of plugins in the Gremlin Console by their position in 
the configuration file.
 * Refactored the Gremlin Server integration testing framework and streamlined 
that infrastructure.
 * Fixed bug in `GroovyTranslator` that didn't properly handle empty `Map` 
objects.
 * Added concrete configuration methods to `SparkGraphComputer` to make a more 
clear API for configuring it.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6c75ceb2/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
--
diff --git 
a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
 
b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
index 4e54a42..ad41d6c 100644
--- 
a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
+++ 
b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
@@ -127,7 +127,7 @@ class Console {
 
 GremlinLoader.load()
 
-// check for available plugins.  if they are in the "active" plugins 
strategies then "activate" them
+// check for available plugins on the path and track them by plugin 
class name
 def activePlugins = Mediator.readPluginState()
 def pluginClass = mediator.useV3d3 ? 
org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin : GremlinPlugin
 ServiceLoader.load(pluginClass, 
groovy.getInterp().getClassLoader()).each { plugin ->
@@ -141,14 +141,16 @@ class Console {
 }
 
 mediator.availablePlugins.put(plugin.class.name, pluggedIn)
+}
+}
 
-if (activePlugins.contains(plugin.class.name)) {
-pluggedIn.activate()
+// if there are active plugins then initialize them in the order that 
they are listed
+activePlugins.each { pluginName ->
+def pluggedIn = mediator.availablePlugins[pluginName]
+pluggedIn.activate()
 
-if (!io.quiet)
-io.out.println(Colorizer.render(Preferences.infoColor, 
"plugin activated: " + plugin.getName()))
-}
-}
+if (!io.quiet)
+io.out.println(Colorizer.render(Preferences.infoColor, "plugin 
activated: " + pluggedIn.getPlugin().getName()))
 }
 
 // remove any "uninstalled" plugins from plugin state as it means they 
were installed, activated, but not



[2/2] tinkerpop git commit: Merge branch 'TINKERPOP-1989' into tp32

2018-06-27 Thread spmallette
Merge branch 'TINKERPOP-1989' into tp32


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/160c1def
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/160c1def
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/160c1def

Branch: refs/heads/tp32
Commit: 160c1def3068964224959fd8261ce900deb6
Parents: 007c4aa 6c75ceb
Author: Stephen Mallette 
Authored: Wed Jun 27 12:29:51 2018 -0400
Committer: Stephen Mallette 
Committed: Wed Jun 27 12:29:51 2018 -0400

--
 CHANGELOG.asciidoc  |  1 +
 .../apache/tinkerpop/gremlin/console/Console.groovy | 16 +---
 2 files changed, 10 insertions(+), 7 deletions(-)
--




[3/4] tinkerpop git commit: Merge branch 'tp32' into tp33

2018-06-27 Thread spmallette
Merge branch 'tp32' into tp33


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/84c3ff40
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/84c3ff40
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/84c3ff40

Branch: refs/heads/master
Commit: 84c3ff40e19b748886eabbb4f12c74f932d1383d
Parents: b87a555 160c1de
Author: Stephen Mallette 
Authored: Wed Jun 27 12:30:13 2018 -0400
Committer: Stephen Mallette 
Committed: Wed Jun 27 12:30:13 2018 -0400

--
 CHANGELOG.asciidoc  |  1 +
 .../apache/tinkerpop/gremlin/console/Console.groovy | 16 +---
 2 files changed, 10 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/84c3ff40/CHANGELOG.asciidoc
--

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/84c3ff40/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
--
diff --cc 
gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
index 096d329,ad41d6c..d45b49a
--- 
a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
+++ 
b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
@@@ -111,21 -127,30 +111,23 @@@ class Console 
  
  GremlinLoader.load()
  
- // check for available plugins.  if they are in the "active" plugins 
strategies then "activate" them
+ // check for available plugins on the path and track them by plugin 
class name
  def activePlugins = Mediator.readPluginState()
 -def pluginClass = mediator.useV3d3 ? 
org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin : GremlinPlugin
 -ServiceLoader.load(pluginClass, 
groovy.getInterp().getClassLoader()).each { plugin ->
 +ServiceLoader.load(GremlinPlugin, 
groovy.getInterp().getClassLoader()).each { plugin ->
  if (!mediator.availablePlugins.containsKey(plugin.class.name)) {
 -def pluggedIn
 -
 -if (Mediator.useV3d3) {
 -pluggedIn = new PluggedIn(new 
PluggedIn.GremlinPluginAdapter((org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin)
 plugin, groovy, io), groovy, io, false)
 -} else {
 -pluggedIn = new PluggedIn((GremlinPlugin) plugin, groovy, 
io, false)
 -}
 +def pluggedIn = new PluggedIn((GremlinPlugin) plugin, groovy, 
io, false)
  
  mediator.availablePlugins.put(plugin.class.name, pluggedIn)
+ }
+ }
  
- if (activePlugins.contains(plugin.class.name)) {
- pluggedIn.activate()
+ // if there are active plugins then initialize them in the order that 
they are listed
+ activePlugins.each { pluginName ->
+ def pluggedIn = mediator.availablePlugins[pluginName]
+ pluggedIn.activate()
  
- if (!io.quiet)
- 
io.out.println(Colorizer.render(Preferences.infoColor, "plugin activated: " + 
plugin.getName()))
- }
- }
+ if (!io.quiet)
+ io.out.println(Colorizer.render(Preferences.infoColor, 
"plugin activated: " + pluggedIn.getPlugin().getName()))
  }
  
  // remove any "uninstalled" plugins from plugin state as it means 
they were installed, activated, but not



[2/4] tinkerpop git commit: Merge branch 'TINKERPOP-1989' into tp32

2018-06-27 Thread spmallette
Merge branch 'TINKERPOP-1989' into tp32


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/160c1def
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/160c1def
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/160c1def

Branch: refs/heads/master
Commit: 160c1def3068964224959fd8261ce900deb6
Parents: 007c4aa 6c75ceb
Author: Stephen Mallette 
Authored: Wed Jun 27 12:29:51 2018 -0400
Committer: Stephen Mallette 
Committed: Wed Jun 27 12:29:51 2018 -0400

--
 CHANGELOG.asciidoc  |  1 +
 .../apache/tinkerpop/gremlin/console/Console.groovy | 16 +---
 2 files changed, 10 insertions(+), 7 deletions(-)
--




[4/4] tinkerpop git commit: Merge branch 'tp33'

2018-06-27 Thread spmallette
Merge branch 'tp33'


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/cff4c161
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/cff4c161
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/cff4c161

Branch: refs/heads/master
Commit: cff4c161615f2b50bda27b6ba523c7f52b833532
Parents: 3bbb957 84c3ff4
Author: Stephen Mallette 
Authored: Wed Jun 27 12:30:25 2018 -0400
Committer: Stephen Mallette 
Committed: Wed Jun 27 12:30:25 2018 -0400

--
 CHANGELOG.asciidoc  |  1 +
 .../apache/tinkerpop/gremlin/console/Console.groovy | 16 +---
 2 files changed, 10 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/cff4c161/CHANGELOG.asciidoc
--



[2/3] tinkerpop git commit: Merge branch 'TINKERPOP-1989' into tp32

2018-06-27 Thread spmallette
Merge branch 'TINKERPOP-1989' into tp32


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/160c1def
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/160c1def
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/160c1def

Branch: refs/heads/tp33
Commit: 160c1def3068964224959fd8261ce900deb6
Parents: 007c4aa 6c75ceb
Author: Stephen Mallette 
Authored: Wed Jun 27 12:29:51 2018 -0400
Committer: Stephen Mallette 
Committed: Wed Jun 27 12:29:51 2018 -0400

--
 CHANGELOG.asciidoc  |  1 +
 .../apache/tinkerpop/gremlin/console/Console.groovy | 16 +---
 2 files changed, 10 insertions(+), 7 deletions(-)
--




[1/4] tinkerpop git commit: TINKERPOP-1989 Enforce order of plugin load in Gremlin Console

2018-06-27 Thread spmallette
Repository: tinkerpop
Updated Branches:
  refs/heads/master 3bbb957f3 -> cff4c1616


TINKERPOP-1989 Enforce order of plugin load in Gremlin Console

Use the order presented in the configuration file to enforce the load order.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/6c75ceb2
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/6c75ceb2
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/6c75ceb2

Branch: refs/heads/master
Commit: 6c75ceb25d6a828489f29b883be99ae7739e09e0
Parents: 7c7dddb
Author: Stephen Mallette 
Authored: Wed Jun 20 11:24:34 2018 -0400
Committer: Stephen Mallette 
Committed: Wed Jun 20 11:24:34 2018 -0400

--
 CHANGELOG.asciidoc  |  1 +
 .../apache/tinkerpop/gremlin/console/Console.groovy | 16 +---
 2 files changed, 10 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6c75ceb2/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 05b74da..33fe5c4 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -31,6 +31,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Improved performance of `TraversalVertexProgram` and related infrastructure.
 * Added `createGratefulDead()`to `TinkerFactory` to help make it easier to try 
to instantiate that toy graph.
 * Added identifiers to edges in the Kitchen Sink toy graph.
+* Ordered the loading of plugins in the Gremlin Console by their position in 
the configuration file.
 * Refactored the Gremlin Server integration testing framework and streamlined 
that infrastructure.
 * Fixed bug in `GroovyTranslator` that didn't properly handle empty `Map` 
objects.
 * Added concrete configuration methods to `SparkGraphComputer` to make a more 
clear API for configuring it.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6c75ceb2/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
--
diff --git 
a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
 
b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
index 4e54a42..ad41d6c 100644
--- 
a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
+++ 
b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
@@ -127,7 +127,7 @@ class Console {
 
 GremlinLoader.load()
 
-// check for available plugins.  if they are in the "active" plugins 
strategies then "activate" them
+// check for available plugins on the path and track them by plugin 
class name
 def activePlugins = Mediator.readPluginState()
 def pluginClass = mediator.useV3d3 ? 
org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin : GremlinPlugin
 ServiceLoader.load(pluginClass, 
groovy.getInterp().getClassLoader()).each { plugin ->
@@ -141,14 +141,16 @@ class Console {
 }
 
 mediator.availablePlugins.put(plugin.class.name, pluggedIn)
+}
+}
 
-if (activePlugins.contains(plugin.class.name)) {
-pluggedIn.activate()
+// if there are active plugins then initialize them in the order that 
they are listed
+activePlugins.each { pluginName ->
+def pluggedIn = mediator.availablePlugins[pluginName]
+pluggedIn.activate()
 
-if (!io.quiet)
-io.out.println(Colorizer.render(Preferences.infoColor, 
"plugin activated: " + plugin.getName()))
-}
-}
+if (!io.quiet)
+io.out.println(Colorizer.render(Preferences.infoColor, "plugin 
activated: " + pluggedIn.getPlugin().getName()))
 }
 
 // remove any "uninstalled" plugins from plugin state as it means they 
were installed, activated, but not



[3/3] tinkerpop git commit: Merge branch 'tp32' into tp33

2018-06-27 Thread spmallette
Merge branch 'tp32' into tp33


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/84c3ff40
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/84c3ff40
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/84c3ff40

Branch: refs/heads/tp33
Commit: 84c3ff40e19b748886eabbb4f12c74f932d1383d
Parents: b87a555 160c1de
Author: Stephen Mallette 
Authored: Wed Jun 27 12:30:13 2018 -0400
Committer: Stephen Mallette 
Committed: Wed Jun 27 12:30:13 2018 -0400

--
 CHANGELOG.asciidoc  |  1 +
 .../apache/tinkerpop/gremlin/console/Console.groovy | 16 +---
 2 files changed, 10 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/84c3ff40/CHANGELOG.asciidoc
--

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/84c3ff40/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
--
diff --cc 
gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
index 096d329,ad41d6c..d45b49a
--- 
a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
+++ 
b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
@@@ -111,21 -127,30 +111,23 @@@ class Console 
  
  GremlinLoader.load()
  
- // check for available plugins.  if they are in the "active" plugins 
strategies then "activate" them
+ // check for available plugins on the path and track them by plugin 
class name
  def activePlugins = Mediator.readPluginState()
 -def pluginClass = mediator.useV3d3 ? 
org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin : GremlinPlugin
 -ServiceLoader.load(pluginClass, 
groovy.getInterp().getClassLoader()).each { plugin ->
 +ServiceLoader.load(GremlinPlugin, 
groovy.getInterp().getClassLoader()).each { plugin ->
  if (!mediator.availablePlugins.containsKey(plugin.class.name)) {
 -def pluggedIn
 -
 -if (Mediator.useV3d3) {
 -pluggedIn = new PluggedIn(new 
PluggedIn.GremlinPluginAdapter((org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin)
 plugin, groovy, io), groovy, io, false)
 -} else {
 -pluggedIn = new PluggedIn((GremlinPlugin) plugin, groovy, 
io, false)
 -}
 +def pluggedIn = new PluggedIn((GremlinPlugin) plugin, groovy, 
io, false)
  
  mediator.availablePlugins.put(plugin.class.name, pluggedIn)
+ }
+ }
  
- if (activePlugins.contains(plugin.class.name)) {
- pluggedIn.activate()
+ // if there are active plugins then initialize them in the order that 
they are listed
+ activePlugins.each { pluginName ->
+ def pluggedIn = mediator.availablePlugins[pluginName]
+ pluggedIn.activate()
  
- if (!io.quiet)
- 
io.out.println(Colorizer.render(Preferences.infoColor, "plugin activated: " + 
plugin.getName()))
- }
- }
+ if (!io.quiet)
+ io.out.println(Colorizer.render(Preferences.infoColor, 
"plugin activated: " + pluggedIn.getPlugin().getName()))
  }
  
  // remove any "uninstalled" plugins from plugin state as it means 
they were installed, activated, but not