svn commit: r1787825 - /tinkerpop/site/providers.html

2017-03-20 Thread dkuppitz
Author: dkuppitz
Date: Mon Mar 20 18:29:47 2017
New Revision: 1787825

URL: http://svn.apache.org/viewvc?rev=1787825=rev
Log:
Deploy TinkerPop homepage

Modified:
tinkerpop/site/providers.html

Modified: tinkerpop/site/providers.html
URL: 
http://svn.apache.org/viewvc/tinkerpop/site/providers.html?rev=1787825=1787824=1787825=diff
==
--- tinkerpop/site/providers.html (original)
+++ tinkerpop/site/providers.html Mon Mar 20 18:29:47 2017
@@ -279,7 +279,7 @@ limitations under the License.
   
  
 https://grakn.ai/;>
-https://grakn.ai/;>Grakn is a distributed 
knowledge graph that brings knowledge ontologies and transactional data 
together to enable intelligent querying of data. Querying is performed through 
the language: Graql, a declarative, knowledge-oriented graph query language for 
retrieving explicitly stored and implicitly derived information, as well as to 
perform graph analytics and automated reasoning.
+https://grakn.ai/;>GRAKN.AI is a distributed 
knowledge graph that brings knowledge ontologies and transactional data 
together to enable intelligent querying of data. Querying is performed through 
the language: Graql, a declarative, knowledge-oriented graph query language for 
retrieving explicitly stored and implicitly derived information, as well as to 
perform graph analytics and automated reasoning.
  
  
 http://www.ibm.com/analytics/us/en/technology/cloud-data-services/graph/;>
@@ -502,7 +502,8 @@ WHERE(Created.by(Friends.of("gremlin")))
  });
   

-  
+
+  
  
 Apache TinkerPop, TinkerPop, Apache, 
Apache feather logo, and Apache TinkerPop project logo are either registered 
trademarks or trademarks of http://www.apache.org/;>The Apache 
Software Foundation in the United States and other countries.
 




[36/45] tinkerpop git commit: Added ScopingStrategy which does a single TraversalHelper.getLabels() call and recurssively tells where() and select() steps the path labels accessed by the Traversal.

2017-03-20 Thread spmallette
Added ScopingStrategy which does a single TraversalHelper.getLabels() call and 
recurssively tells where() and select() steps the path labels accessed by the 
Traversal.


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

Branch: refs/heads/TINKERPOP-1642
Commit: d130cc81678d258256a50eb65696c7846e0c02a4
Parents: d3bb05b
Author: Marko A. Rodriguez 
Authored: Fri Mar 3 09:27:58 2017 -0700
Committer: Stephen Mallette 
Committed: Mon Mar 20 14:08:31 2017 -0400

--
 CHANGELOG.asciidoc  |  1 +
 .../process/traversal/TraversalStrategies.java  |  2 +
 .../gremlin/process/traversal/step/Scoping.java | 10 
 .../step/filter/WherePredicateStep.java | 11 +++-
 .../step/filter/WhereTraversalStep.java | 16 --
 .../traversal/step/map/SelectOneStep.java   | 21 ++--
 .../process/traversal/step/map/SelectStep.java  | 15 --
 .../strategy/finalization/ScopingStrategy.java  | 57 
 8 files changed, 121 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d130cc81/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index a77991e..86f30f7 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -34,6 +34,7 @@ TinkerPop 3.2.5 (Release Date: NOT OFFICIALLY RELEASED YET)
 * Failed scripts will not be recompiled.
 * Scripts that take over 5 seconds to compile are logged as a warning.
 * Fixed an `NullPointerException` in `GraphMLReader` that occurred when an 
`` didn't have an ID field and the base graph supported ID assignment.
+* Added `ScopingStrategy` which will computer and provide all `Scoping` steps 
with the path labels of the global `Traversal`.
 * Split `ComputerVerificationStrategy` into two strategies: 
`ComputerVerificationStrategy` and `ComputerFinalizationStrategy`.
 * Removed `HasTest.g_V_hasId_compilationEquality` from process test suite as 
it makes too many assumptions about provider compilation.
 * Deprecated `CustomizerProvider` infrastructure.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d130cc81/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java
index 63ae23f..0ddae91 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java
@@ -24,6 +24,7 @@ import 
org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.optimiza
 import 
org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.optimization.MessagePassingReductionStrategy;
 import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ConnectiveStrategy;
 import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.finalization.ProfileStrategy;
+import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.finalization.ScopingStrategy;
 import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.AdjacentToIncidentStrategy;
 import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.FilterRankingStrategy;
 import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.IncidentToAdjacentStrategy;
@@ -214,6 +215,7 @@ public interface TraversalStrategies extends Serializable, 
Cloneable {
 RangeByIsCountStrategy.instance(),
 PathRetractionStrategy.instance(),
 LazyBarrierStrategy.instance(),
+ScopingStrategy.instance(),
 ProfileStrategy.instance(),
 StandardVerificationStrategy.instance());
 GRAPH_CACHE.put(Graph.class, graphStrategies);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d130cc81/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Scoping.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Scoping.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Scoping.java
index 8c27405..68655e4 100644
--- 

[23/45] tinkerpop git commit: TINKERPOP-1644 Added metrics to GremlinGroovyScriptEngine

2017-03-20 Thread spmallette
TINKERPOP-1644 Added metrics to GremlinGroovyScriptEngine


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

Branch: refs/heads/TINKERPOP-1642
Commit: 8ffa5af6ff56933c1955e88e8aa42c06cb69162b
Parents: a06072b
Author: Stephen Mallette 
Authored: Thu Mar 9 10:30:17 2017 -0500
Committer: Stephen Mallette 
Committed: Fri Mar 10 11:13:03 2017 -0500

--
 CHANGELOG.asciidoc  |   2 +
 .../jsr223/GremlinGroovyScriptEngine.java   | 122 ++-
 ...roovyScriptEngineCompilationOptionsTest.java |   8 +-
 .../jsr223/GremlinGroovyScriptEngineTest.java   |  70 ++-
 4 files changed, 193 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8ffa5af6/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 9c3313e..3729271 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,7 +26,9 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.2.5 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~
 
+* Added various metrics to the `GremlinGroovyScriptEngine` around script 
compilation.
 * Moved the `caffeine` dependency down to `gremlin-groovy` and out of 
`gremlin-server`.
+* Improved script compilation in `GremlinGroovyScriptEngine to use better 
caching, log long compile times and prevent failed compilations from 
recompiling on future requests.
 * Script compilation is synchronised.
 * Script compilation times are placed in to logs.
 * Failed scripts will not be recompiled.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8ffa5af6/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
--
diff --git 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
index 3bcb06c..0ed8d84 100644
--- 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
+++ 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
@@ -164,7 +164,10 @@ public class GremlinGroovyScriptEngine extends 
GroovyScriptEngineImpl
 /**
  * Script to generated Class map.
  */
-private final LoadingCache classMap = 
Caffeine.newBuilder().softValues().build(new CacheLoader() {
+private final LoadingCache classMap = 
Caffeine.newBuilder().
+softValues().
+recordStats().
+build(new CacheLoader() {
 @Override
 public Future load(final String script) throws Exception {
 final long start = System.currentTimeMillis();
@@ -175,6 +178,7 @@ public class GremlinGroovyScriptEngine extends 
GroovyScriptEngineImpl
 } catch (CompilationFailedException e) {
 final long finish = System.currentTimeMillis();
 log.error("Script compilation FAILED {} took {}ms {}", 
script, finish - start, e);
+failedCompilationCount.incrementAndGet();
 throw e;
 } finally {
 final long time = System.currentTimeMillis() - start;
@@ -208,6 +212,13 @@ public class GremlinGroovyScriptEngine extends 
GroovyScriptEngineImpl
 private final AtomicLong longRunCompilationCount = new AtomicLong(0L);
 
 /**
+ * A counter for the instance that tracks the number of failed 
compilations. Note that the failures need to be
+ * tracked outside of cache failure load stats because the loading 
mechanism will always successfully return
+ * a future and won't trigger a failure.
+ */
+private final AtomicLong failedCompilationCount = new AtomicLong(0L);
+
+/**
  * The list of loaded plugins for the console.
  */
 private final Set loadedPlugins = new HashSet<>();
@@ -589,10 +600,117 @@ public class GremlinGroovyScriptEngine extends 
GroovyScriptEngineImpl
 /**
  * Gets the number of compilations that extended beyond the {@link 
#expectedCompilationTime}.
  */
-public long getLongRunCompilationCount() {
+public long getClassCacheLongRunCompilationCount() {
 return longRunCompilationCount.longValue();
 }
 
+/**
+ * Gets 

[06/45] tinkerpop git commit: Merge branch 'tp31' into tp32

2017-03-20 Thread spmallette
Merge branch 'tp31' into tp32

Conflicts:
pom.xml


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

Branch: refs/heads/TINKERPOP-1642
Commit: 9ea319d5d102432312f2044fc72e3668c1a8f7e2
Parents: 3fe223b cde8b31
Author: Stephen Mallette 
Authored: Thu Mar 9 13:01:03 2017 -0500
Committer: Stephen Mallette 
Committed: Thu Mar 9 13:01:03 2017 -0500

--
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9ea319d5/pom.xml
--
diff --cc pom.xml
index 09aeede,23f31f2..de8cf87
--- a/pom.xml
+++ b/pom.xml
@@@ -134,18 -127,9 +134,18 @@@ limitations under the License
  
  
  1.10
 +2.6
 +3.3.1
- 2.4.8
+ 2.4.9
 -4.12
 +2.7.2
 +1.2
 +2.10.1
 +1.1
  3.0.2
 +4.0.42.Final
 +1.7.21
 +1.15
 +
  UTF-8
  
UTF-8
  true



[14/45] tinkerpop git commit: TINKERPOP-1644 Use future instead of maintaining a separate map of failures.

2017-03-20 Thread spmallette
TINKERPOP-1644
Use future instead of maintaining a separate map of failures.


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

Branch: refs/heads/TINKERPOP-1642
Commit: deb68280d986b086120d56a73659b1869c07a475
Parents: 13c93ca
Author: BrynCooke 
Authored: Tue Mar 7 16:54:58 2017 +
Committer: Stephen Mallette 
Committed: Fri Mar 10 11:12:36 2017 -0500

--
 .../jsr223/GremlinGroovyScriptEngine.java   | 69 
 1 file changed, 26 insertions(+), 43 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/deb68280/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
--
diff --git 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
index a8365a2..67275f8 100644
--- 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
+++ 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
@@ -79,6 +79,8 @@ import java.util.List;
 import java.util.Map;
 import java.util.ServiceLoader;
 import java.util.Set;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.Future;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.regex.Pattern;
 import java.util.stream.Collectors;
@@ -155,8 +157,7 @@ public class GremlinGroovyScriptEngine extends 
GroovyScriptEngineImpl
 /**
  * Script to generated Class map.
  */
-private ManagedConcurrentValueMap classMap = new 
ManagedConcurrentValueMap<>(ReferenceBundle.getSoftBundle());
-private ManagedConcurrentValueMap 
failedClassMap = new 
ManagedConcurrentValueMap<>(ReferenceBundle.getSoftBundle());
+private ManagedConcurrentValueMap classMap = new 
ManagedConcurrentValueMap<>(ReferenceBundle.getSoftBundle());
 
 /**
  * Global closures map - this is used to simulate a single global 
functions namespace
@@ -533,56 +534,38 @@ public class GremlinGroovyScriptEngine extends 
GroovyScriptEngineImpl
 return makeInterface(thiz, clazz);
 }
 
-private Class getScriptClassFromMap(String script) throws 
CompilationFailedException {
-CompilationFailedException exception = failedClassMap.get(script);
-if(exception != null) {
-throw exception;
-}
-return classMap.get(script);
-
-}
-
 Class getScriptClass(final String script) throws 
CompilationFailedException {
-Class clazz = getScriptClassFromMap(script);
-if (clazz != null) {
-return clazz;
-}
-synchronized (this) {
-clazz = getScriptClassFromMap(script);
+Future clazz = classMap.get(script);
+
+long start = System.currentTimeMillis();
+try {
 if (clazz != null) {
-return clazz;
+return clazz.get();
 }
 
-long start = System.currentTimeMillis();
-try {
-clazz = loader.parseClass(script, generateScriptName());
-long time = System.currentTimeMillis() - start;
-if(time > 5000) {
-//We warn if a script took longer than a few seconds. 
Repeatedly seeing these warnings is a sign that something is wrong.
-//Scripts with a large numbers of parameters often trigger 
this and should be avoided.
-log.warn("Script compilation {} took {}ms", script, time);
-}
-else {
-log.debug("Script compilation {} took {}ms", script, time);
-}
-
+clazz = CompletableFuture.supplyAsync(() -> 
loader.parseClass(script, generateScriptName()));
+classMap.put(script, clazz);
+return clazz.get();
 
-}
-catch(CompilationFailedException t) {
+} catch (Exception e) {
+if (e.getCause() instanceof CompilationFailedException) {
 long finish = System.currentTimeMillis();
-log.error("Script compilation FAILED {} took {}ms {}", script, 
finish - start, t);
-failedClassMap.put(script, t);
-throw t;
+log.error("Script compilation FAILED {} took {}ms {}", script, 
finish - start, e.getCause());
+  

[15/45] tinkerpop git commit: TINKERPOP-1644 Improve script compilation syncronisation Script compilation is synchronised. Script compilation times are placed in to logs. Failed scripts will not be re

2017-03-20 Thread spmallette
TINKERPOP-1644 Improve script compilation syncronisation
Script compilation is synchronised.
Script compilation times are placed in to logs.
Failed scripts will not be recompiled.
Scripts that take over 5 seconds to compile are logged as a warning.


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

Branch: refs/heads/TINKERPOP-1642
Commit: 13c93cabac51112a73f592e0fba12e515f643522
Parents: 60a3fb3
Author: BrynCooke 
Authored: Thu Mar 2 19:07:28 2017 +
Committer: Stephen Mallette 
Committed: Fri Mar 10 11:12:36 2017 -0500

--
 CHANGELOG.asciidoc  |  4 ++
 .../jsr223/GremlinGroovyScriptEngine.java   | 57 ++--
 2 files changed, 56 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/13c93cab/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 6861d57..24e5e9c 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,10 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.2.5 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~
 
+* Script compilation is synchronised.
+* Script compilation times are placed in to logs.
+* Failed scripts will not be recompiled.
+* Scripts that take over 5 seconds to compile are logged as a warning.
 * Fixed an `NullPointerException` in `GraphMLReader` that occurred when an 
`` didn't have an ID field and the base graph supported ID assignment.
 * Split `ComputerVerificationStrategy` into two strategies: 
`ComputerVerificationStrategy` and `ComputerFinalizationStrategy`.
 * Removed `HasTest.g_V_hasId_compilationEquality` from process test suite as 
it makes too many assumptions about provider compilation.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/13c93cab/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
--
diff --git 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
index 1fb2efc..a8365a2 100644
--- 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
+++ 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
@@ -56,6 +56,8 @@ import org.codehaus.groovy.runtime.InvokerHelper;
 import org.codehaus.groovy.runtime.MetaClassHelper;
 import org.codehaus.groovy.runtime.MethodClosure;
 import org.codehaus.groovy.util.ReferenceBundle;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.script.Bindings;
 import javax.script.CompiledScript;
@@ -93,6 +95,7 @@ import java.util.stream.Collectors;
 public class GremlinGroovyScriptEngine extends GroovyScriptEngineImpl
 implements DependencyManager, AutoCloseable, GremlinScriptEngine {
 
+private static final Logger log = 
LoggerFactory.getLogger(GremlinGroovyScriptEngine.class);
 /**
  * An "internal" key for sandboxing the script engine - technically not 
for public use.
  */
@@ -153,6 +156,7 @@ public class GremlinGroovyScriptEngine extends 
GroovyScriptEngineImpl
  * Script to generated Class map.
  */
 private ManagedConcurrentValueMap classMap = new 
ManagedConcurrentValueMap<>(ReferenceBundle.getSoftBundle());
+private ManagedConcurrentValueMap 
failedClassMap = new 
ManagedConcurrentValueMap<>(ReferenceBundle.getSoftBundle());
 
 /**
  * Global closures map - this is used to simulate a single global 
functions namespace
@@ -529,13 +533,56 @@ public class GremlinGroovyScriptEngine extends 
GroovyScriptEngineImpl
 return makeInterface(thiz, clazz);
 }
 
+private Class getScriptClassFromMap(String script) throws 
CompilationFailedException {
+CompilationFailedException exception = failedClassMap.get(script);
+if(exception != null) {
+throw exception;
+}
+return classMap.get(script);
+
+}
+
 Class getScriptClass(final String script) throws 
CompilationFailedException {
-Class clazz = classMap.get(script);
-if (clazz != null) return clazz;
+Class clazz = getScriptClassFromMap(script);
+if (clazz != null) {
+return clazz;
+}
+  

[41/45] tinkerpop git commit: TINKERPOP-1642 Pushed integrateChild() operations into Parameters.set()

2017-03-20 Thread spmallette
TINKERPOP-1642 Pushed integrateChild() operations into Parameters.set()

There was no need to continually iterate the traversal list and doing 
integrateChild() over and over again for each newly added traversal. Removing 
those wasteful cycles and only doing that once, when the Traversal was added 
helped improve performance.


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

Branch: refs/heads/TINKERPOP-1642
Commit: 0b9f9a5789f4dba464702a7fc4124890d6cd8777
Parents: a2eef9c
Author: Stephen Mallette 
Authored: Mon Mar 13 14:50:09 2017 -0400
Committer: Stephen Mallette 
Committed: Mon Mar 20 14:09:02 2017 -0400

--
 .../process/traversal/step/map/AddEdgeStep.java | 11 ++---
 .../traversal/step/map/AddVertexStartStep.java  |  6 +--
 .../traversal/step/map/AddVertexStep.java   |  6 +--
 .../step/sideEffect/AddPropertyStep.java|  7 +--
 .../process/traversal/step/util/Parameters.java | 19 ++--
 .../strategy/decoration/ElementIdStrategy.java  |  2 +-
 .../traversal/step/util/ParametersTest.java | 46 ++--
 7 files changed, 37 insertions(+), 60 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0b9f9a57/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddEdgeStep.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddEdgeStep.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddEdgeStep.java
index a4702ce..0da2b66 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddEdgeStep.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddEdgeStep.java
@@ -57,7 +57,7 @@ public final class AddEdgeStep extends MapStep
 
 public AddEdgeStep(final Traversal.Admin traversal, final String 
edgeLabel) {
 super(traversal);
-this.parameters.set(T.label, edgeLabel);
+this.parameters.set(this, T.label, edgeLabel);
 }
 
 @Override
@@ -77,18 +77,15 @@ public final class AddEdgeStep extends MapStep
 
 @Override
 public void addPropertyMutations(final Object... keyValues) {
-this.parameters.set(keyValues);
-this.parameters.integrateTraversals(this);
+this.parameters.set(this, keyValues);
 }
 
 public void addTo(final Object toObject) {
-this.parameters.set(TO, toObject);
-this.parameters.integrateTraversals(this);
+this.parameters.set(this, TO, toObject);
 }
 
 public void addFrom(final Object fromObject) {
-this.parameters.set(FROM, fromObject);
-this.parameters.integrateTraversals(this);
+this.parameters.set(this, FROM, fromObject);
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0b9f9a57/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexStartStep.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexStartStep.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexStartStep.java
index 66ee3a7..d7eb138 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexStartStep.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexStartStep.java
@@ -54,8 +54,7 @@ public final class AddVertexStartStep extends 
AbstractStep
 
 public AddVertexStartStep(final Traversal.Admin traversal, final String 
label) {
 super(traversal);
-this.parameters.set(T.label, label);
-this.parameters.integrateTraversals(this);
+this.parameters.set(this, T.label, label);
 }
 
 @Override
@@ -75,8 +74,7 @@ public final class AddVertexStartStep extends 
AbstractStep
 
 @Override
 public void addPropertyMutations(final Object... keyValues) {
-this.parameters.set(keyValues);
-this.parameters.integrateTraversals(this);
+this.parameters.set(this, keyValues);
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0b9f9a57/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexStep.java
--
diff --git 

[20/45] tinkerpop git commit: TINKERPOP-1644 Docs for new metrics in Gremlin Server

2017-03-20 Thread spmallette
TINKERPOP-1644 Docs for new metrics in Gremlin Server


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

Branch: refs/heads/TINKERPOP-1642
Commit: 37976526f1eac9fd06858f962f979aa98d3e5346
Parents: 9eb248e
Author: Stephen Mallette 
Authored: Thu Mar 9 13:35:44 2017 -0500
Committer: Stephen Mallette 
Committed: Fri Mar 10 11:13:03 2017 -0500

--
 docs/src/reference/gremlin-applications.asciidoc   |  5 +
 docs/src/upgrade/release-3.2.x-incubating.asciidoc | 10 ++
 2 files changed, 15 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/37976526/docs/src/reference/gremlin-applications.asciidoc
--
diff --git a/docs/src/reference/gremlin-applications.asciidoc 
b/docs/src/reference/gremlin-applications.asciidoc
index 8e0edc2..37244e0 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -1560,6 +1560,11 @@ and standard deviation evaluation times, as well as the 
75th, 95th, 98th, 99th a
 * `op.traversal` - the number of `Traveral` executions, mean rate, 1, 5, and 
15 minute rates, minimum, maximum, median,
 mean, and standard deviation evaluation times, as well as the 75th, 95th, 
98th, 99th and 99.9th percentile evaluation
 times.
+* `engine-name.session.session-id.*` - metrics related to different 
`GremlinScriptEngine` instanc configured for
+session-based requests where "engine-name" will be the actual name of the 
engine, such as "gremlin-groovy" and
+"session-id" will be the identifier for the session itself.
+* `engine-name.sessionless.*` - metrics related to different 
`GremlinScriptEngine` instanc configured for sessionless
+requests where "engine-name" will be the actual name of the engine, such as 
"gremlin-groovy".
 
 Best Practices
 ~~

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/37976526/docs/src/upgrade/release-3.2.x-incubating.asciidoc
--
diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc 
b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
index 78c276b..d01f58f 100644
--- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
@@ -32,6 +32,16 @@ Please see the 
link:https://github.com/apache/tinkerpop/blob/3.2.5/CHANGELOG.asc
 Upgrading for Users
 ~~~
 
+GremlinScriptEngine Metrics
+^^^
+
+The `GremlinScriptEngine` has a number of new metrics about its cache size and 
script compilation times which should
+be helpful in understanding usage problems. As `GremlinScriptEngine` instances 
are used in Gremlin Server these metrics
+are naturally exposed as part of the standard 
link:http://tinkerpop.apache.org/docs/current/reference/#_metrics[metrics]
+set. Note that metrics are captured for both sessionless requests as well as 
for each individual session that is opened.
+
+See: https://issues.apache.org/jira/browse/TINKERPOP-1644[TINKERPOP-1644]
+
 Gremlin-Python Driver
 ^
 Gremlin-Python now offers a more complete driver implementation that uses 
connection pooling and



[28/45] tinkerpop git commit: TINKERPOP-1504 Added the property key to events for new properties.

2017-03-20 Thread spmallette
TINKERPOP-1504 Added the property key to events for new properties.

Newly added properties triggered "changed" events when using EventStrategy but 
the specific key that was newly added was not available in the mutation 
listener. The listener would simply report the new value only. After this 
change the listener now gets a DetachedVertexPropery/Property with the newly 
added key and a null value set.


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

Branch: refs/heads/TINKERPOP-1642
Commit: 06bf620caf6fda6325512fde704e4b92329fa8fd
Parents: cde8b31
Author: Stephen Mallette 
Authored: Wed Mar 15 10:40:09 2017 -0400
Committer: Stephen Mallette 
Committed: Wed Mar 15 10:40:09 2017 -0400

--
 CHANGELOG.asciidoc  |   1 +
 .../step/sideEffect/AddPropertyStep.java|  17 +-
 .../decoration/EventStrategyProcessTest.java| 474 ++-
 3 files changed, 488 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/06bf620c/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index f4eaaa8..90b9f00 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.1.7 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~
 
+* Fixed `EventStrategy` so that newly added properties trigger events with the 
name of the key that was added.
 * Drop use of jitpack for the jbcrypt artifact - using the official one in 
Maven Central.
 
 [[release-3-1-6]]

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/06bf620c/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/AddPropertyStep.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/AddPropertyStep.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/AddPropertyStep.java
index 7c12c0e..3ccff52 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/AddPropertyStep.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/AddPropertyStep.java
@@ -36,6 +36,8 @@ import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.apache.tinkerpop.gremlin.structure.VertexProperty;
 import org.apache.tinkerpop.gremlin.structure.util.StringFactory;
 import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedFactory;
+import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedProperty;
+import 
org.apache.tinkerpop.gremlin.structure.util.detached.DetachedVertexProperty;
 
 import java.util.List;
 import java.util.Set;
@@ -91,11 +93,20 @@ public final class AddPropertyStep 
extends SideEffectStep
 final boolean newProperty = element instanceof Vertex ? 
currentProperty == VertexProperty.empty() : currentProperty == Property.empty();
 final Event.ElementPropertyChangedEvent evt;
 if (element instanceof Vertex)
-evt = new 
Event.VertexPropertyChangedEvent(DetachedFactory.detach((Vertex) element, 
true), newProperty ? null : DetachedFactory.detach((VertexProperty) 
currentProperty, true), value, vertexPropertyKeyValues);
+evt = new 
Event.VertexPropertyChangedEvent(DetachedFactory.detach((Vertex) element, true),
+newProperty ?
+new DetachedVertexProperty(null, key, null, 
null) :
+DetachedFactory.detach((VertexProperty) 
currentProperty, true), value, vertexPropertyKeyValues);
 else if (element instanceof Edge)
-evt = new 
Event.EdgePropertyChangedEvent(DetachedFactory.detach((Edge) element, true), 
newProperty ? null : DetachedFactory.detach(currentProperty), value);
+evt = new 
Event.EdgePropertyChangedEvent(DetachedFactory.detach((Edge) element, true),
+newProperty ?
+new DetachedProperty(key, null) :
+DetachedFactory.detach(currentProperty), 
value);
 else if (element instanceof VertexProperty)
-evt = new 
Event.VertexPropertyPropertyChangedEvent(DetachedFactory.detach((VertexProperty)
 element, true), newProperty ? null : 

[35/45] tinkerpop git commit: TINKERPOP-1642 Cached the Traversal list in Parameters

2017-03-20 Thread spmallette
TINKERPOP-1642 Cached the Traversal list in Parameters

This leads to a pretty good boost in performance from the prior commit 
especially for long chained mutating traversals that add vertices and edges as 
there is a 3X improvement in those cases.


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

Branch: refs/heads/TINKERPOP-1642
Commit: cb4e5024400acf64927b299a15e841167cbe2004
Parents: 8621401
Author: Stephen Mallette 
Authored: Fri Mar 3 06:47:56 2017 -0500
Committer: Stephen Mallette 
Committed: Mon Mar 20 14:07:22 2017 -0400

--
 .../process/traversal/step/util/Parameters.java | 59 
 .../traversal/step/util/ParametersTest.java | 50 +
 2 files changed, 87 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/cb4e5024/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
index 67cb2f9..3f0cb7c 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
@@ -26,6 +26,7 @@ import 
org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent;
 import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalUtil;
 import org.apache.tinkerpop.gremlin.structure.Element;
 import org.apache.tinkerpop.gremlin.structure.T;
+import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
 
 import java.io.Serializable;
 import java.util.ArrayList;
@@ -49,9 +50,11 @@ public final class Parameters implements Cloneable, 
Serializable {
 private Map parameters = new HashMap<>();
 
 /**
- * Determines if there are traversals present in the parameters {@code 
Map}.
+ * A cached list of traversals that server as parameter values. The list 
is cached on calls to
+ * {@link #set(Object...)} because when the parameter map is large the 
cost of iterating it repeatedly on the
+ * high number of calls to {@link #getTraversals()} and {@link 
#integrateTraversals(TraversalParent)} is great.
  */
-private boolean traversalsPresent = false;
+private List traversals = new ArrayList<>();
 
 /**
  * Checks for existence of key in parameter set.
@@ -73,6 +76,10 @@ public final class Parameters implements Cloneable, 
Serializable {
 this.parameters.put(newKey, this.parameters.remove(oldKey));
 }
 
+/**
+ * Gets the list of values for a key, while resolving the values of any 
parameters that are {@link Traversal}
+ * objects.
+ */
 public  List get(final Traverser.Admin traverser, final Object 
key, final Supplier defaultValue) {
 final List values = (List) this.parameters.get(key);
 if (null == values) return 
Collections.singletonList(defaultValue.get());
@@ -102,9 +109,28 @@ public final class Parameters implements Cloneable, 
Serializable {
  * @return the value of the removed key
  */
 public Object remove(final Object key) {
-return parameters.remove(key);
+final List o = parameters.remove(key);
+
+// once a key is removed, it's possible that the traversal cache will 
need to be regenerated
+if (IteratorUtils.anyMatch(o.iterator(), p -> p instanceof 
Traversal.Admin)) {
+traversals.clear();
+traversals = new ArrayList<>();
+for (final List list : this.parameters.values()) {
+for (final Object object : list) {
+if (object instanceof Traversal.Admin) {
+traversals.add((Traversal.Admin) object);
+}
+}
+}
+}
+
+return o;
 }
 
+/**
+ * Gets the array of keys/values of the parameters while resolving 
parameter values that contain
+ * {@link Traversal} instances
+ */
 public  Object[] getKeyValues(final Traverser.Admin traverser, final 
Object... exceptKeys) {
 if (this.parameters.size() == 0) return EMPTY_ARRAY;
 final List keyValues = new ArrayList<>();
@@ -143,10 +169,10 @@ public final class Parameters implements Cloneable, 
Serializable {
 Parameters.legalPropertyKeyValueArray(keyValues);
 for 

[11/45] tinkerpop git commit: TINKERPOP-1644 Updated changelog

2017-03-20 Thread spmallette
TINKERPOP-1644 Updated changelog


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

Branch: refs/heads/TINKERPOP-1642
Commit: b29ba12109e7e88bc3465d08f6177e5ded17ca59
Parents: 4bdeac4
Author: Stephen Mallette 
Authored: Wed Mar 8 16:15:27 2017 -0500
Committer: Stephen Mallette 
Committed: Fri Mar 10 11:12:36 2017 -0500

--
 CHANGELOG.asciidoc | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b29ba121/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 24e5e9c..9c3313e 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.2.5 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~
 
+* Moved the `caffeine` dependency down to `gremlin-groovy` and out of 
`gremlin-server`.
 * Script compilation is synchronised.
 * Script compilation times are placed in to logs.
 * Failed scripts will not be recompiled.



[21/45] tinkerpop git commit: TINKERPOP-1644 Renamed metrics for GremlinScriptEngine instances.

2017-03-20 Thread spmallette
TINKERPOP-1644 Renamed metrics for GremlinScriptEngine instances.

Included the name of the GremlinScriptEngine and prefixed each metric with 
GremlinServer class name to be consistent with other metrics.


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

Branch: refs/heads/TINKERPOP-1642
Commit: 9eb248ef0f0f29e8cf11cd5391ef8d993e37f7af
Parents: b689deb
Author: Stephen Mallette 
Authored: Thu Mar 9 13:15:04 2017 -0500
Committer: Stephen Mallette 
Committed: Fri Mar 10 11:13:03 2017 -0500

--
 .../gremlin/server/op/session/Session.java  |  2 +-
 .../gremlin/server/util/MetricManager.java  | 31 ++--
 .../server/util/ServerGremlinExecutor.java  |  2 +-
 3 files changed, 18 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9eb248ef/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java
--
diff --git 
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java
 
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java
index b8cb28c..6961339 100644
--- 
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java
+++ 
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java
@@ -269,6 +269,6 @@ public class Session {
 final GremlinScriptEngine engine = null == scriptEngines ?
 
gremlinExecutor.getScriptEngineManager().getEngineByName(engineName) :
 scriptEngines.getEngineByName(engineName);
-MetricManager.INSTANCE.registerGremlinScriptEngineMetrics(engine, 
"session", session, "class-cache");
+MetricManager.INSTANCE.registerGremlinScriptEngineMetrics(engine, 
engineName, "session", session, "class-cache");
 }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9eb248ef/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/MetricManager.java
--
diff --git 
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/MetricManager.java
 
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/MetricManager.java
index 06179d2..faec502 100644
--- 
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/MetricManager.java
+++ 
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/MetricManager.java
@@ -36,6 +36,7 @@ import info.ganglia.gmetric4j.gmetric.GMetric;
 import org.apache.commons.lang3.ArrayUtils;
 import org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine;
 import org.apache.tinkerpop.gremlin.jsr223.GremlinScriptEngine;
+import org.apache.tinkerpop.gremlin.server.GremlinServer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -429,49 +430,49 @@ public enum MetricManager {
 if (engine instanceof GremlinGroovyScriptEngine) {
 final GremlinGroovyScriptEngine gremlinGroovyScriptEngine = 
(GremlinGroovyScriptEngine) engine;
 MetricManager.INSTANCE.getRegistry().register(
-MetricRegistry.name(GremlinGroovyScriptEngine.class, 
ArrayUtils.add(prefix, "long-run-compilation-count")),
+MetricRegistry.name(GremlinServer.class, 
ArrayUtils.add(prefix, "long-run-compilation-count")),
 (Gauge) 
gremlinGroovyScriptEngine::getClassCacheLongRunCompilationCount);
 MetricManager.INSTANCE.getRegistry().register(
-MetricRegistry.name(GremlinGroovyScriptEngine.class, 
ArrayUtils.add(prefix, "estimated-size")),
+MetricRegistry.name(GremlinServer.class, 
ArrayUtils.add(prefix, "estimated-size")),
 (Gauge) 
gremlinGroovyScriptEngine::getClassCacheEstimatedSize);
 MetricManager.INSTANCE.getRegistry().register(
-MetricRegistry.name(GremlinGroovyScriptEngine.class, 
ArrayUtils.add(prefix, "average-load-penalty")),
+MetricRegistry.name(GremlinServer.class, 
ArrayUtils.add(prefix, "average-load-penalty")),
 (Gauge) 
gremlinGroovyScriptEngine::getClassCacheAverageLoadPenalty);
 MetricManager.INSTANCE.getRegistry().register(
-MetricRegistry.name(GremlinGroovyScriptEngine.class, 
ArrayUtils.add(prefix, "eviction-count")),
+MetricRegistry.name(GremlinServer.class, 
ArrayUtils.add(prefix, "eviction-count")),
 

[01/45] tinkerpop git commit: TINKERPOP-1645 Bump to groovy 2.4.9 [Forced Update!]

2017-03-20 Thread spmallette
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1642 c4bd6d91a -> f1f656377 (forced update)


TINKERPOP-1645 Bump to groovy 2.4.9


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

Branch: refs/heads/TINKERPOP-1642
Commit: cde8b316e2cfdc7d8a7d1d3456d68d0f3a5d9828
Parents: 6a20df2
Author: Stephen Mallette 
Authored: Mon Mar 6 08:54:18 2017 -0500
Committer: Stephen Mallette 
Committed: Mon Mar 6 08:54:18 2017 -0500

--
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/cde8b316/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 5d2184f..23f31f2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -127,7 +127,7 @@ limitations under the License.
 
 
 1.10
-2.4.8
+2.4.9
 4.12
 3.0.2
 UTF-8



[30/45] tinkerpop git commit: Added some additional notes on local() vs flatMap()

2017-03-20 Thread spmallette
Added some additional notes on local() vs flatMap()


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

Branch: refs/heads/TINKERPOP-1642
Commit: 7b234b468149d729ad9367029499fdf155cd5d46
Parents: 99ad76d
Author: Stephen Mallette 
Authored: Wed Mar 15 13:54:09 2017 -0400
Committer: Stephen Mallette 
Committed: Wed Mar 15 13:54:09 2017 -0400

--
 docs/src/reference/the-traversal.asciidoc | 11 +++
 1 file changed, 11 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7b234b46/docs/src/reference/the-traversal.asciidoc
--
diff --git a/docs/src/reference/the-traversal.asciidoc 
b/docs/src/reference/the-traversal.asciidoc
index eb93950..84887bc 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -949,6 +949,17 @@ The two traversals above look nearly identical save the 
inclusion of `local()` w
 in a object-local traversal. As such, the `order().by()` and the `limit()` 
refer to a particular object, not to the
 stream as a whole.
 
+Local Step is quite similar in functionality to <> where it can often be confused.
+`local()` propagates the traverser through the internal traversal as is 
without splitting/cloning it. Thus, its
+a “global traversal” with local processing. Its use is subtle and 
primarily finds application in compilation
+optimizations (i.e. when writing `TraversalStrategy` implementations. As 
another example consider:
+
+[gremlin-groovy,modern]
+
+g.V().both().barrier().flatMap(groupCount().by("name"))
+g.V().both().barrier().local(groupCount().by("name"))
+
+
 WARNING: The anonymous traversal of `local()` processes the current object 
"locally." In OLAP, where the atomic unit
 of computing is the vertex and its local "star graph," it is important that 
the anonymous traversal does not leave
 the confines of the vertex's star graph. In other words, it can not traverse 
to an adjacent vertex's properties or edges.



[27/45] tinkerpop git commit: TINKERPOP-1644 Added some docs for CompilationOptionsCustomizerProvider

2017-03-20 Thread spmallette
TINKERPOP-1644 Added some docs for CompilationOptionsCustomizerProvider


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

Branch: refs/heads/TINKERPOP-1642
Commit: d7c2a221ecb56442a01ca2e5cf539b011ac05f94
Parents: 33416dd
Author: Stephen Mallette 
Authored: Tue Mar 14 15:26:46 2017 -0400
Committer: Stephen Mallette 
Committed: Tue Mar 14 15:26:46 2017 -0400

--
 docs/src/reference/gremlin-applications.asciidoc | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d7c2a221/docs/src/reference/gremlin-applications.asciidoc
--
diff --git a/docs/src/reference/gremlin-applications.asciidoc 
b/docs/src/reference/gremlin-applications.asciidoc
index 884ce04..3a2c446 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -1336,6 +1336,7 @@ There are a number of pre-packaged `CustomizerProvider` 
implementations:
 |=
 |Customizer |Description
 |`CompileStaticCustomizerProvider` |Applies `CompileStatic` annotations to 
incoming scripts thus removing dynamic dispatch. More information about static 
compilation can be found in the 
link:http://docs.groovy-lang.org/latest/html/documentation/#_static_compilation[Groovy
 Documentation].  It is possible to configure this `CustomizerProvider` by 
specifying a comma separated list of 
link:http://docs.groovy-lang.org/latest/html/documentation/#Typecheckingextensions-Workingwithextensions[type
 checking extensions] that can have the effect of securing calls to various 
methods.
+|`CompilationOptionsCustomizerProvider` |The amount of time a script is 
allowed to compile before a warning message is sent to the logs.
 |`ConfigurationCustomizerProvider` |Allows configuration of the Groovy 
`CompilerConfiguration` object by taking a `Map` of key/value pairs where the 
"key" is a property to set on the `CompilerConfiguration`.
 |`ThreadInterruptCustomizerProvider` |Injects checks for thread interruption, 
thus allowing the thread to potentially respect calls to `Thread.interrupt()`
 |`TimedInterruptCustomizerProvider` |Injects checks into loops to interrupt 
them if they exceed the configured timeout in milliseconds.
@@ -1354,6 +1355,7 @@ scriptEngines: {
   compilerCustomizerProviders: {
 
"org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.ThreadInterruptCustomizerProvider":[],
 
"org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.TimedInterruptCustomizerProvider":[1],
+
"org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.CompilationOptionsCustomizerProvider":[8000],
 
"org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.CompileStaticCustomizerProvider":["org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.SimpleSandboxExtension"]
 
 NOTE: The above configuration could also use the 
`TypeCheckedCustomizerProvider` in place of the



[04/45] tinkerpop git commit: CTR: ExecutorServices in TinkerGraphComputer and SparkGraphComputer can only be used, but they were not shut down after being used. This prevented applications from shutt

2017-03-20 Thread spmallette
CTR: ExecutorServices in TinkerGraphComputer and SparkGraphComputer can only be 
used, but
they were not shut down after being used. This prevented applications from 
shutting down
properly as there were still threads lingering. I'm not sure about 
GiraphGraphComputer as
it uses a slightly different model.


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

Branch: refs/heads/TINKERPOP-1642
Commit: df285d38027d46f5dcabf4ce5831b6028624bc9f
Parents: 258dccb
Author: Daniel Kuppitz 
Authored: Wed Mar 8 22:20:33 2017 +0100
Committer: Daniel Kuppitz 
Committed: Wed Mar 8 22:20:33 2017 +0100

--
 .../gremlin/spark/process/computer/SparkGraphComputer.java   | 4 +++-
 .../tinkergraph/process/computer/TinkerGraphComputer.java| 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/df285d38/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputer.java
--
diff --git 
a/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputer.java
 
b/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputer.java
index 6d2742b..00a2e46 100644
--- 
a/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputer.java
+++ 
b/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputer.java
@@ -131,7 +131,7 @@ public final class SparkGraphComputer extends 
AbstractHadoopGraphComputer {
 
 private Future submitWithExecutor(Executor exec) {
 // create the completable future
-return computerService.submit(() -> {
+final Future result = computerService.submit(() -> {
 final long startTime = System.currentTimeMillis();
 // apache and hadoop configurations that are used throughout the 
graph computer computation
 final org.apache.commons.configuration.Configuration 
graphComputerConfiguration = new HadoopConfiguration(this.sparkConfiguration);
@@ -378,6 +378,8 @@ public final class SparkGraphComputer extends 
AbstractHadoopGraphComputer {
 Spark.close();
 }
 });
+computerService.shutdown();
+return result;
 }
 
 /

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/df285d38/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/process/computer/TinkerGraphComputer.java
--
diff --git 
a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/process/computer/TinkerGraphComputer.java
 
b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/process/computer/TinkerGraphComputer.java
index 2abce9a..bf6f594 100644
--- 
a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/process/computer/TinkerGraphComputer.java
+++ 
b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/process/computer/TinkerGraphComputer.java
@@ -154,7 +154,7 @@ public final class TinkerGraphComputer implements 
GraphComputer {
 
 // initialize the memory
 this.memory = new TinkerMemory(this.vertexProgram, this.mapReducers);
-return computerService.submit(() -> {
+final Future result = computerService.submit(() -> {
 final long time = System.currentTimeMillis();
 final TinkerGraphComputerView view = 
TinkerHelper.createGraphComputerView(this.graph, this.graphFilter, null != 
this.vertexProgram ? this.vertexProgram.getVertexComputeKeys() : 
Collections.emptySet());
 final TinkerWorkerPool workers = new TinkerWorkerPool(this.graph, 
this.memory, this.workers);
@@ -246,6 +246,8 @@ public final class TinkerGraphComputer implements 
GraphComputer {
 workers.close();
 }
 });
+this.computerService.shutdown();
+return result;
 }
 
 @Override



[24/45] tinkerpop git commit: TINKERPOP-1644 Fixed spelling errors

2017-03-20 Thread spmallette
TINKERPOP-1644 Fixed spelling errors


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

Branch: refs/heads/TINKERPOP-1642
Commit: 85c53305f83b9915538289bcb7de596620b76d6c
Parents: 33db1a3
Author: Stephen Mallette 
Authored: Tue Mar 14 12:30:14 2017 -0400
Committer: Stephen Mallette 
Committed: Tue Mar 14 12:30:14 2017 -0400

--
 docs/src/reference/gremlin-applications.asciidoc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/85c53305/docs/src/reference/gremlin-applications.asciidoc
--
diff --git a/docs/src/reference/gremlin-applications.asciidoc 
b/docs/src/reference/gremlin-applications.asciidoc
index 37244e0..884ce04 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -1560,10 +1560,10 @@ and standard deviation evaluation times, as well as the 
75th, 95th, 98th, 99th a
 * `op.traversal` - the number of `Traveral` executions, mean rate, 1, 5, and 
15 minute rates, minimum, maximum, median,
 mean, and standard deviation evaluation times, as well as the 75th, 95th, 
98th, 99th and 99.9th percentile evaluation
 times.
-* `engine-name.session.session-id.*` - metrics related to different 
`GremlinScriptEngine` instanc configured for
+* `engine-name.session.session-id.*` - metrics related to different 
`GremlinScriptEngine` instances configured for
 session-based requests where "engine-name" will be the actual name of the 
engine, such as "gremlin-groovy" and
 "session-id" will be the identifier for the session itself.
-* `engine-name.sessionless.*` - metrics related to different 
`GremlinScriptEngine` instanc configured for sessionless
+* `engine-name.sessionless.*` - metrics related to different 
`GremlinScriptEngine` instances configured for sessionless
 requests where "engine-name" will be the actual name of the engine, such as 
"gremlin-groovy".
 
 Best Practices



[19/45] tinkerpop git commit: TINKERPOP-1644 Cleaned up a bad import

2017-03-20 Thread spmallette
TINKERPOP-1644 Cleaned up a bad import


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

Branch: refs/heads/TINKERPOP-1642
Commit: 33db1a3893c91a2dde100c8a0289312d4550503c
Parents: 3797652
Author: Stephen Mallette 
Authored: Thu Mar 9 14:51:36 2017 -0500
Committer: Stephen Mallette 
Committed: Fri Mar 10 11:13:03 2017 -0500

--
 .../groovy/jsr223/GroovyCompilerGremlinPluginTest.java| 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/33db1a38/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GroovyCompilerGremlinPluginTest.java
--
diff --git 
a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GroovyCompilerGremlinPluginTest.java
 
b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GroovyCompilerGremlinPluginTest.java
index bacfc90..d8cf571 100644
--- 
a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GroovyCompilerGremlinPluginTest.java
+++ 
b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GroovyCompilerGremlinPluginTest.java
@@ -26,7 +26,6 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Optional;
 
-import static 
org.apache.tinkerpop.gremlin.groovy.jsr223.GroovyCompilerGremlinPlugin.*;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.core.Is.is;
 import static org.hamcrest.core.IsInstanceOf.instanceOf;
@@ -40,7 +39,7 @@ public class GroovyCompilerGremlinPluginTest {
 @Test
 public void shouldConfigureForGroovyOnly() {
 final GroovyCompilerGremlinPlugin plugin = 
GroovyCompilerGremlinPlugin.build().
-compilation(Compilation.COMPILE_STATIC).create();
+
compilation(GroovyCompilerGremlinPlugin.Compilation.COMPILE_STATIC).create();
 final Optional customizers = 
plugin.getCustomizers("gremlin-not-real");
 assertThat(customizers.isPresent(), is(false));
 }
@@ -49,7 +48,7 @@ public class GroovyCompilerGremlinPluginTest {
 public void shouldConfigureWithCompileStatic() {
 final GroovyCompilerGremlinPlugin plugin = 
GroovyCompilerGremlinPlugin.build().
 expectedCompilationTime(0).
-compilation(Compilation.COMPILE_STATIC).create();
+
compilation(GroovyCompilerGremlinPlugin.Compilation.COMPILE_STATIC).create();
 final Optional customizers = 
plugin.getCustomizers("gremlin-groovy");
 assertThat(customizers.isPresent(), is(true));
 assertEquals(1, customizers.get().length);
@@ -60,7 +59,7 @@ public class GroovyCompilerGremlinPluginTest {
 public void shouldConfigureWithTypeChecked() {
 final GroovyCompilerGremlinPlugin plugin = 
GroovyCompilerGremlinPlugin.build().
 expectedCompilationTime(0).
-compilation(Compilation.TYPE_CHECKED).create();
+
compilation(GroovyCompilerGremlinPlugin.Compilation.TYPE_CHECKED).create();
 final Optional customizers = 
plugin.getCustomizers("gremlin-groovy");
 assertThat(customizers.isPresent(), is(true));
 assertEquals(1, customizers.get().length);



[32/45] tinkerpop git commit: Changed benchmark for addVertex() to use the object array params

2017-03-20 Thread spmallette
Changed benchmark for addVertex() to use the object array params

This is a the more likely way folks would add a vertex with the Graph API so 
it's a better comparison. Ultimately, the speed of the benchmark didn't change 
that much so that's good. CTR


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

Branch: refs/heads/TINKERPOP-1642
Commit: 2138c8e196d7b08a10510e7dffe744087e2c8e05
Parents: 3821792
Author: Stephen Mallette 
Authored: Mon Mar 20 13:55:08 2017 -0400
Committer: Stephen Mallette 
Committed: Mon Mar 20 13:55:08 2017 -0400

--
 .../gremlin/process/GraphMutateBenchmark.java | 14 ++
 1 file changed, 10 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2138c8e1/gremlin-benchmark/src/main/java/org/apache/tinkerpop/gremlin/process/GraphMutateBenchmark.java
--
diff --git 
a/gremlin-benchmark/src/main/java/org/apache/tinkerpop/gremlin/process/GraphMutateBenchmark.java
 
b/gremlin-benchmark/src/main/java/org/apache/tinkerpop/gremlin/process/GraphMutateBenchmark.java
index 3963c49..733e32b 100644
--- 
a/gremlin-benchmark/src/main/java/org/apache/tinkerpop/gremlin/process/GraphMutateBenchmark.java
+++ 
b/gremlin-benchmark/src/main/java/org/apache/tinkerpop/gremlin/process/GraphMutateBenchmark.java
@@ -22,12 +22,15 @@ import 
org.apache.tinkerpop.benchmark.util.AbstractGraphMutateBenchmark;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
 import org.apache.tinkerpop.gremlin.structure.Edge;
 import org.apache.tinkerpop.gremlin.structure.Property;
+import org.apache.tinkerpop.gremlin.structure.T;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.apache.tinkerpop.gremlin.structure.VertexProperty;
 
 import org.openjdk.jmh.annotations.Benchmark;
 import org.openjdk.jmh.annotations.Setup;
 
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Random;
 
 /**
@@ -61,15 +64,18 @@ public class GraphMutateBenchmark extends 
AbstractGraphMutateBenchmark {
 
 @Benchmark
 public Vertex testAddVertexWithProps() {
-final Vertex v = graph.addVertex("test");
+final List l = new ArrayList<>();
+l.add(T.label);
+l.add("test");
 for (int iy = 0; iy < 32; iy++) {
+l.add("x" + String.valueOf(iy));
 if (iy % 2 == 0)
-v.property("x" + String.valueOf(iy), iy);
+l.add(iy);
 else
-v.property("x" + String.valueOf(iy), String.valueOf(iy));
+l.add(String.valueOf(iy));
 }
 
-return v;
+return graph.addVertex(l.toArray());
 }
 
 @Benchmark



[43/45] tinkerpop git commit: Fixed VertexProgram test that verifies proper TraversalRequirements.

2017-03-20 Thread spmallette
Fixed VertexProgram test that verifies proper TraversalRequirements.


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

Branch: refs/heads/TINKERPOP-1642
Commit: a2eef9c28e4efbfcd3bcd8fea6e037a5dd0d236c
Parents: 61c1f81
Author: Daniel Kuppitz 
Authored: Mon Mar 13 16:01:12 2017 +0100
Committer: Stephen Mallette 
Committed: Mon Mar 20 14:09:02 2017 -0400

--
 .../process/computer/GraphComputerTest.java | 199 +--
 1 file changed, 92 insertions(+), 107 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a2eef9c2/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
--
diff --git 
a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
 
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
index 40b03fe..5c66673 100644
--- 
a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
+++ 
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
@@ -36,6 +36,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.Path;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.EmptyPath;
 import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.VerificationException;
 import 
org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement;
 import 
org.apache.tinkerpop.gremlin.process.traversal.traverser.util.TraverserSet;
@@ -47,6 +48,7 @@ import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.apache.tinkerpop.gremlin.structure.VertexProperty;
 import org.apache.tinkerpop.gremlin.structure.util.StringFactory;
 import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
+import org.javatuples.Pair;
 import org.junit.Ignore;
 import org.junit.Test;
 
@@ -58,6 +60,7 @@ import java.util.Comparator;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.Optional;
@@ -108,9 +111,6 @@ import static org.junit.Assume.assumeNoException;
 @ExceptionCoverage(exceptionClass = Graph.Exceptions.class, methods = {
 "graphDoesNotSupportProvidedGraphComputer"
 })
-@ExceptionCoverage(exceptionClass = Path.Exceptions.class, methods = {
-"shouldFailWithImproperTraverserRequirements"
-})
 @SuppressWarnings("ThrowableResultOfMethodCallIgnored")
 public class GraphComputerTest extends AbstractGremlinProcessTest {
 
@@ -2351,30 +2351,26 @@ public class GraphComputerTest extends 
AbstractGremlinProcessTest {
 @LoadGraphWith(MODERN)
 public void shouldSucceedWithProperTraverserRequirements() throws 
Exception {
 
-final AtomicInteger counter = new AtomicInteger(0);
-final Map idsByName = new HashMap<>();
-final VertexProgramQ vp = 
VertexProgramQ.build().from("a").property("coworkers").create();
-
-g.V().hasLabel("person").filter(outE("created")).valueMap(true, 
"name").forEachRemaining((Map map) ->
-idsByName.put((String) ((List) map.get("name")).get(0), 
map.get(id)));
+final VertexProgramQ vp = 
VertexProgramQ.build().property("pl").create();
+final Map expected = new HashMap<>();
+expected.put("vadas", Collections.singletonList(2));
+expected.put("lop", Arrays.asList(2, 2, 2, 3));
+expected.put("josh", Collections.singletonList(2));
+expected.put("ripple", Arrays.asList(2, 3));
 
 try {
-g.V().as("a").out("created").in("created").program(vp).dedup()
-.valueMap("name", 
"coworkers").forEachRemaining((Map map) -> {
+g.V().repeat(__.out()).emit().program(vp).dedup()
+.valueMap("name", "pl").forEachRemaining((Map map) -> {
 
 final String name = (String) ((List) map.get("name")).get(0);
-final Map coworkers = (Map) 
((List) map.get("coworkers")).get(0);
-assertTrue(idsByName.containsKey(name));
-assertEquals(2, coworkers.size());
-idsByName.keySet().stream().filter(cn -> 

[38/45] tinkerpop git commit: TINKERPOP-1642 Removed some extra iteration in Parameters.getTraversals()

2017-03-20 Thread spmallette
TINKERPOP-1642 Removed some extra iteration in Parameters.getTraversals()


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

Branch: refs/heads/TINKERPOP-1642
Commit: 149a6f8bbb98360357d6099f8324ec4c53ba622a
Parents: 5061c47
Author: Stephen Mallette 
Authored: Fri Mar 10 12:31:38 2017 -0500
Committer: Stephen Mallette 
Committed: Mon Mar 20 14:09:02 2017 -0400

--
 .../gremlin/process/traversal/step/util/Parameters.java  | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/149a6f8b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
index 6640e87..93cf1f8 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
@@ -54,7 +54,7 @@ public final class Parameters implements Cloneable, 
Serializable {
  * {@link #set(Object...)} because when the parameter map is large the 
cost of iterating it repeatedly on the
  * high number of calls to {@link #getTraversals()} and {@link 
#integrateTraversals(TraversalParent)} is great.
  */
-private List traversals = new ArrayList<>();
+private List traversals = new ArrayList<>();
 
 /**
  * Checks for existence of key in parameter set.
@@ -203,11 +203,7 @@ public final class Parameters implements Cloneable, 
Serializable {
  */
 public  List> getTraversals() {
 // stupid generics - just need to return "traversals"
-final List> result = new ArrayList<>();
-for (Traversal.Admin t : traversals) {
-result.add(t);
-}
-return result;
+return (List>) (Object) traversals;
 }
 
 public Parameters clone() {



[18/45] tinkerpop git commit: TINKERPOP-1644 Made the "counter" in GremlinGroovyScriptEngine static

2017-03-20 Thread spmallette
TINKERPOP-1644 Made the "counter" in GremlinGroovyScriptEngine static

It seems that this field should be static and shared across all instances as 
the script name seems to share space with other GroovyClassLoaders. Not sure 
what would happen in the case of collision, but there doesn't seem to be much 
harm in ensuring better uniqueness. This counter wasn't used for tracking the 
number of scripts actually processed or anything so it should be ok to make 
this change without fear of breaking anything.


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

Branch: refs/heads/TINKERPOP-1642
Commit: a06072b0502f9b42fee4c68dba554b4991406c36
Parents: b29ba12
Author: Stephen Mallette 
Authored: Wed Mar 8 16:17:40 2017 -0500
Committer: Stephen Mallette 
Committed: Fri Mar 10 11:12:37 2017 -0500

--
 .../groovy/jsr223/GremlinGroovyScriptEngine.java| 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a06072b0/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
--
diff --git 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
index 5168130..3bcb06c 100644
--- 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
+++ 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
@@ -196,7 +196,15 @@ public class GremlinGroovyScriptEngine extends 
GroovyScriptEngineImpl
  */
 private final ManagedConcurrentValueMap globalClosures = 
new ManagedConcurrentValueMap<>(ReferenceBundle.getHardBundle());
 
-private final AtomicLong counter = new AtomicLong(0L);
+/**
+ * Ensures unique script names across all instances.
+ */
+private final static AtomicLong scriptNameCounter = new AtomicLong(0L);
+
+/**
+ * A counter for the instance that tracks the number of warnings issued 
during script compilations that exceeded
+ * the {@link #expectedCompilationTime}.
+ */
 private final AtomicLong longRunCompilationCount = new AtomicLong(0L);
 
 /**
@@ -799,7 +807,7 @@ public class GremlinGroovyScriptEngine extends 
GroovyScriptEngineImpl
 }
 
 private synchronized String generateScriptName() {
-return SCRIPT + counter.incrementAndGet() + DOT_GROOVY;
+return SCRIPT + scriptNameCounter.incrementAndGet() + DOT_GROOVY;
 }
 
 @SuppressWarnings("unchecked")



[02/45] tinkerpop git commit: Removed references to gremlin-groovy-test as it is deprecated

2017-03-20 Thread spmallette
Removed references to gremlin-groovy-test as it is deprecated

There really isn't any point to continuing to encourage providers to implement 
gremlin-groovy-test on the 3.2.x line as it is deprecated. It has already been 
removed in 3.3.x. CTR


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

Branch: refs/heads/TINKERPOP-1642
Commit: 591a65a3ce3a06ac0919f77117622fa44a0456b7
Parents: a8acd67
Author: Stephen Mallette 
Authored: Tue Mar 7 07:00:26 2017 -0500
Committer: Stephen Mallette 
Committed: Tue Mar 7 07:00:26 2017 -0500

--
 docs/src/dev/provider/index.asciidoc | 33 +++
 1 file changed, 7 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/591a65a3/docs/src/dev/provider/index.asciidoc
--
diff --git a/docs/src/dev/provider/index.asciidoc 
b/docs/src/dev/provider/index.asciidoc
index 71d071f..3988ee9 100644
--- a/docs/src/dev/provider/index.asciidoc
+++ b/docs/src/dev/provider/index.asciidoc
@@ -458,20 +458,16 @@ Validating with Gremlin-Test
 image:gremlin-edumacated.png[width=225]
 
 [source,xml]
+
 
   org.apache.tinkerpop
   gremlin-test
   x.y.z
 
-
-  org.apache.tinkerpop
-  gremlin-groovy-test
-  x.y.z
-
+
 
-The operational semantics of any OLTP or OLAP implementation are validated by 
`gremlin-test` and functional
-interoperability with the Groovy environment is ensured by 
`gremlin-groovy-test`. To implement these tests, provide
-test case implementations as shown below, where `XXX` below denotes the name 
of the graph implementation (e.g.
+The operational semantics of any OLTP or OLAP implementation are validated by 
`gremlin-test`. To implement these tests,
+provide test case implementations as shown below, where `XXX` below denotes 
the name of the graph implementation (e.g.
 TinkerGraph, Neo4jGraph, HadoopGraph, etc.).
 
 [source,java]
@@ -489,22 +485,11 @@ public class XXXProcessComputerTest {}
 @RunWith(ProcessStandardSuite.class)
 @GraphProviderClass(provider = XXXGraphProvider.class, graph = XXXGraph.class)
 public class XXXProcessStandardTest {}
-
-@RunWith(GroovyEnvironmentSuite.class)
-@GraphProviderClass(provider = XXXProvider.class, graph = TinkerGraph.class)
-public class XXXGroovyEnvironmentTest {}
-
-@RunWith(GroovyProcessStandardSuite.class)
-@GraphProviderClass(provider = XXXGraphProvider.class, graph = 
TinkerGraph.class)
-public class XXXGroovyProcessStandardTest {}
-
-@RunWith(GroovyProcessComputerSuite.class)
-@GraphProviderClass(provider = XXXGraphComputerProvider.class, graph = 
TinkerGraph.class)
-public class XXXGroovyProcessComputerTest {}
 
 
 The above set of tests represent the minimum test suite set to implement.  
There are other "integration" and
-"performance" tests that should be considered optional.  Implementing those 
tests requires the same pattern as shown above.
+"performance" tests that should be considered optional.  Implementing those 
tests requires the same pattern as shown
+above.
 
 IMPORTANT: It is as important to look at "ignored" tests as it is to look at 
ones that fail.  The `gremlin-test`
 suite utilizes the `Feature` implementation exposed by the `Graph` to 
determine which tests to execute.  If a test
@@ -526,9 +511,6 @@ annotation.  See the `TinkerGraph` implementation below as 
an example:
 @Graph.OptIn(Graph.OptIn.SUITE_STRUCTURE_STANDARD)
 @Graph.OptIn(Graph.OptIn.SUITE_PROCESS_STANDARD)
 @Graph.OptIn(Graph.OptIn.SUITE_PROCESS_COMPUTER)
-@Graph.OptIn(Graph.OptIn.SUITE_GROOVY_PROCESS_STANDARD)
-@Graph.OptIn(Graph.OptIn.SUITE_GROOVY_PROCESS_COMPUTER)
-@Graph.OptIn(Graph.OptIn.SUITE_GROOVY_ENVIRONMENT)
 public class TinkerGraph implements Graph {
 
 
@@ -567,8 +549,7 @@ public class HadoopGraph implements Graph {
 The above examples show how to ignore individual tests.  It is also possible 
to:
 
 * Ignore an entire test case (i.e. all the methods within the test) by setting 
the `method` to "*".
-* Ignore a "base" test class such that test that extend from those classes 
will all be ignored.  This style of
-ignoring is useful for Gremlin "process" tests that have bases classes that 
are extended by various Gremlin flavors (e.g. groovy).
+* Ignore a "base" test class such that test that extend from those classes 
will all be ignored.
 * Ignore a `GraphComputer` test based on the type of `GraphComputer` being 
used.  Specify the "computer" attribute on
 the `OptOut` (which is an array specification) which should have a value of 
the `GraphComputer` implementation class
 that should ignore that 

[44/45] tinkerpop git commit: added MARKER model to PathRetractionStrategy to reduce recurssive lookups of invalidating steps. Again, we really need Traversal.metdata to make this more 'pure'.

2017-03-20 Thread spmallette
added MARKER model to PathRetractionStrategy to reduce recurssive lookups of 
invalidating steps. Again, we really need Traversal.metdata to make this more 
'pure'.


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

Branch: refs/heads/TINKERPOP-1642
Commit: f1f656377a1cf30792c389f9f670196017686eb6
Parents: b88b264
Author: Marko A. Rodriguez 
Authored: Fri Mar 17 13:04:58 2017 -0600
Committer: Stephen Mallette 
Committed: Mon Mar 20 14:09:03 2017 -0400

--
 CHANGELOG.asciidoc|  3 ++-
 .../strategy/optimization/PathRetractionStrategy.java | 10 +-
 2 files changed, 11 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f1f65637/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 1d89305..59158cb 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,7 +26,8 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.2.5 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~
 
-* `ProfileStrategy` now uses the marker-model to reduce recrussive lookups of 
`ProfileSideEffectStep`.
+* `PathRetractionStrategy` now uses the marker-model to reduce recursive 
lookups of invalidating steps.
+* `ProfileStrategy` now uses the marker-model to reduce recursive lookups of 
`ProfileSideEffectStep`.
 * `Mutating` steps now implement `Scoping` interface.
 * `LABELED_PATH` requirement is now set if any step in the traversal is 
labeled.
 * Added various metrics to the `GremlinGroovyScriptEngine` around script 
compilation and exposed them in Gremlin Server.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f1f65637/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java
index bd27a3e..d19954b 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java
@@ -18,6 +18,7 @@
  */
 package org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization;
 
+import 
org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.VertexProgramStep;
 import org.apache.tinkerpop.gremlin.process.traversal.Step;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
@@ -36,6 +37,7 @@ import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversal
 import 
org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement;
 import org.apache.tinkerpop.gremlin.process.traversal.util.PathUtil;
 import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
+import org.apache.tinkerpop.gremlin.structure.Graph;
 import org.javatuples.Pair;
 
 import java.util.ArrayList;
@@ -57,6 +59,7 @@ public final class PathRetractionStrategy extends 
AbstractTraversalStrategy> PRIORS = 
new HashSet<>(Arrays.asList(
 RepeatUnrollStrategy.class, MatchPredicateStrategy.class, 
PathProcessorStrategy.class));
+private static final String MARKER = 
Graph.Hidden.hide("gremlin.pathRetraction");
 
 private final int standardBarrierSize;
 
@@ -72,8 +75,13 @@ public final class PathRetractionStrategy extends 
AbstractTraversalStrategy traversal) {
 // do not apply this strategy if there are lambdas as you can't 
introspect to know what path information the lambdas are using
 // do not apply this strategy if a PATH requirement step is being used 
(in the future, we can do PATH requirement lookhead to be more intelligent 
about its usage)
-if (TraversalHelper.anyStepRecursively(step -> step instanceof 
LambdaHolder || step.getRequirements().contains(TraverserRequirement.PATH), 
TraversalHelper.getRootTraversal(traversal)))
+if ((traversal.getParent() instanceof EmptyStep || 
traversal.getParent() instanceof VertexProgramStep) &&
+TraversalHelper.anyStepRecursively(step -> step instanceof 

[22/45] tinkerpop git commit: TINKERPOP-1644 Exposed GremlinScriptEngine metrics in Gremlin Server

2017-03-20 Thread spmallette
TINKERPOP-1644 Exposed GremlinScriptEngine metrics in Gremlin Server


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

Branch: refs/heads/TINKERPOP-1642
Commit: b689deb1dd1a0c745966a1ed5f8e7e3b2d543af2
Parents: 8ffa5af
Author: Stephen Mallette 
Authored: Thu Mar 9 12:25:35 2017 -0500
Committer: Stephen Mallette 
Committed: Fri Mar 10 11:13:03 2017 -0500

--
 CHANGELOG.asciidoc  |  2 +-
 .../gremlin/groovy/engine/ScriptEngines.java|  7 ++
 .../gremlin/server/op/session/Session.java  | 27 +++
 .../gremlin/server/util/MetricManager.java  | 79 +---
 .../server/util/ServerGremlinExecutor.java  | 15 
 5 files changed, 118 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b689deb1/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 3729271..a306dea 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,7 +26,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.2.5 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~
 
-* Added various metrics to the `GremlinGroovyScriptEngine` around script 
compilation.
+* Added various metrics to the `GremlinGroovyScriptEngine` around script 
compilation and exposed them in Gremlin Server.
 * Moved the `caffeine` dependency down to `gremlin-groovy` and out of 
`gremlin-server`.
 * Improved script compilation in `GremlinGroovyScriptEngine to use better 
caching, log long compile times and prevent failed compilations from 
recompiling on future requests.
 * Script compilation is synchronised.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b689deb1/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/ScriptEngines.java
--
diff --git 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/ScriptEngines.java
 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/ScriptEngines.java
index 7dcfc5c..6dfd87a 100644
--- 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/ScriptEngines.java
+++ 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/ScriptEngines.java
@@ -311,6 +311,13 @@ public class ScriptEngines implements AutoCloseable {
 }
 
 /**
+ * Gets an {@link GremlinScriptEngine} by its name.
+ */
+public GremlinScriptEngine getEngineByName(final String engineName) {
+return scriptEngines.get(engineName);
+}
+
+/**
  * Get the set of {@code ScriptEngine} that implement {@link 
DependencyManager} interface.
  */
 private Set getDependencyManagers() {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b689deb1/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java
--
diff --git 
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java
 
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java
index 9b16a3b..b8cb28c 100644
--- 
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java
+++ 
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java
@@ -18,11 +18,16 @@
  */
 package org.apache.tinkerpop.gremlin.server.op.session;
 
+import com.codahale.metrics.Metric;
+import com.codahale.metrics.MetricFilter;
 import org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor;
+import org.apache.tinkerpop.gremlin.groovy.engine.ScriptEngines;
+import org.apache.tinkerpop.gremlin.jsr223.GremlinScriptEngine;
 import org.apache.tinkerpop.gremlin.server.Context;
 import org.apache.tinkerpop.gremlin.server.GraphManager;
 import org.apache.tinkerpop.gremlin.server.Settings;
 import org.apache.tinkerpop.gremlin.server.util.LifeCycleHook;
+import org.apache.tinkerpop.gremlin.server.util.MetricManager;
 import org.apache.tinkerpop.gremlin.server.util.ThreadFactoryUtil;
 import org.apache.tinkerpop.gremlin.structure.Graph;
 import org.slf4j.Logger;
@@ -30,6 +35,7 @@ import org.slf4j.LoggerFactory;
 
 import javax.script.Bindings;
 import javax.script.SimpleBindings;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ExecutorService;
@@ -92,6 +98,15 @@ 

[07/45] tinkerpop git commit: Fixed an NPE in GraphMLReader where if the doesn't have an ID field and the base graph supports ids, then an NPE happens. Added a test case to verifiy working beha

2017-03-20 Thread spmallette
Fixed an NPE in GraphMLReader where if the  doesn't have an ID field and 
the base graph supports ids, then an NPE happens. Added a test case to verifiy 
working behavior. Super simple fix. CTR.


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

Branch: refs/heads/TINKERPOP-1642
Commit: 61a3d125c48869c8e5fdaf195abbb46fbaaf0c30
Parents: 9ea319d
Author: Marko A. Rodriguez 
Authored: Thu Mar 9 14:49:36 2017 -0700
Committer: Marko A. Rodriguez 
Committed: Thu Mar 9 14:49:36 2017 -0700

--
 .../structure/io/graphml/GraphMLReader.java | 19 +++--
 .../tinkerpop/gremlin/structure/io/IoTest.java  | 25 ++--
 .../structure/io/graphml/graph-no-edge-ids.xml  | 30 
 3 files changed, 62 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/61a3d125/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLReader.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLReader.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLReader.java
index e161ba7..3289166 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLReader.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLReader.java
@@ -19,10 +19,10 @@
 package org.apache.tinkerpop.gremlin.structure.io.graphml;
 
 import org.apache.tinkerpop.gremlin.structure.Direction;
-import org.apache.tinkerpop.gremlin.structure.Property;
-import org.apache.tinkerpop.gremlin.structure.T;
 import org.apache.tinkerpop.gremlin.structure.Edge;
 import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.Property;
+import org.apache.tinkerpop.gremlin.structure.T;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.apache.tinkerpop.gremlin.structure.VertexProperty;
 import org.apache.tinkerpop.gremlin.structure.io.GraphReader;
@@ -72,7 +72,7 @@ public final class GraphMLReader implements GraphReader {
 
 @Override
 public void readGraph(final InputStream graphInputStream, final Graph 
graphToWriteTo) throws IOException {
-final Map cache = new HashMap<>();
+final Map cache = new HashMap<>();
 final AtomicLong counter = new AtomicLong(0);
 final boolean supportsTx = 
graphToWriteTo.features().graph().supportsTransactions();
 final Graph.Features.EdgeFeatures edgeFeatures = 
graphToWriteTo.features().edge();
@@ -186,9 +186,9 @@ public final class GraphMLReader implements GraphReader {
 isInVertex = false;
 } else if (elementName.equals(GraphMLTokens.EDGE)) {
 final Object[] propsAsArray = 
edgeProps.entrySet().stream().flatMap(e -> Stream.of(e.getKey(), 
e.getValue())).toArray();
-final Object[] propsReady = 
edgeFeatures.willAllowId(edgeId) ? ElementHelper.upsert(propsAsArray, T.id, 
edgeId) : propsAsArray;
-
-   edgeOutVertex.addEdge(null == edgeLabel ? 
Edge.DEFAULT_LABEL : edgeLabel, edgeInVertex, propsReady);
+final Object[] propsReady = null != edgeId && 
edgeFeatures.willAllowId(edgeId) ? ElementHelper.upsert(propsAsArray, T.id, 
edgeId) : propsAsArray;
+
+edgeOutVertex.addEdge(null == edgeLabel ? 
Edge.DEFAULT_LABEL : edgeLabel, edgeInVertex, propsReady);
 
 if (supportsTx && counter.incrementAndGet() % 
batchSize == 0)
 graphToWriteTo.tx().commit();
@@ -292,7 +292,7 @@ public final class GraphMLReader implements GraphReader {
 
 private static Vertex findOrCreate(final Object id, final Graph 
graphToWriteTo,
final Graph.Features.VertexFeatures 
features,
-   final Map cache, final 
boolean asVertex, final Object... args) {
+   final Map cache, final 
boolean asVertex, final Object... args) {
 if (cache.containsKey(id)) {
 // if the request to findOrCreate come from a vertex then AND the 
vertex was already created, that means
 // that the vertex was created by an edge that arrived first in 
the stream (allowable via GraphML
@@ -306,7 +306,7 @@ public final class GraphMLReader implements GraphReader {

[37/45] tinkerpop git commit: Add a slight optimization to ScopingStrategy that will not compute step labels if no Scoping steps are defined. Also added JavaDoc and comments accordingly.

2017-03-20 Thread spmallette
Add a slight optimization to ScopingStrategy that will not compute step labels 
if no Scoping steps are defined. Also added JavaDoc and comments accordingly.


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

Branch: refs/heads/TINKERPOP-1642
Commit: 2aecff5feb0e74bc4efdfd8af3382b0fc6e11d66
Parents: d130cc8
Author: Marko A. Rodriguez 
Authored: Mon Mar 6 08:07:39 2017 -0700
Committer: Stephen Mallette 
Committed: Mon Mar 20 14:08:31 2017 -0400

--
 .../gremlin/process/traversal/step/Scoping.java |  5 +
 .../strategy/finalization/ScopingStrategy.java  | 12 ++--
 2 files changed, 15 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2aecff5f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Scoping.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Scoping.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Scoping.java
index 68655e4..fae52d7 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Scoping.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Scoping.java
@@ -69,6 +69,11 @@ public interface Scoping {
 return null;
 }
 
+/**
+ * Get the labels that this scoping step will access during the traversal
+ *
+ * @return the accessed labels of the scoping step
+ */
 public Set getScopeKeys();
 
 /**

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2aecff5f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/finalization/ScopingStrategy.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/finalization/ScopingStrategy.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/finalization/ScopingStrategy.java
index ce66da4..073f45e 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/finalization/ScopingStrategy.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/finalization/ScopingStrategy.java
@@ -19,6 +19,7 @@
 
 package org.apache.tinkerpop.gremlin.process.traversal.strategy.finalization;
 
+import org.apache.tinkerpop.gremlin.process.traversal.Step;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.step.Scoping;
@@ -29,6 +30,10 @@ import 
org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
 import java.util.Set;
 
 /**
+ * ScopingStrategy will analyze the traversal for step labels (e.g. as()) and 
provide {@link Scoping} steps that information.
+ * This enables Scoping steps to avoid  having to generate step label data at 
{@link Step#getRequirements()} and thus,
+ * may significantly reduce compilation times.
+ *
  * @author Marko A. Rodriguez (http://markorodriguez.com)
  */
 public final class ScopingStrategy extends 
AbstractTraversalStrategy implements 
TraversalStrategy.FinalizationStrategy {
@@ -41,11 +46,14 @@ public final class ScopingStrategy extends 
AbstractTraversalStrategy traversal) {
-// only operate on the root traversal and apply global step labels 
recursively
-if (!(traversal.getParent() instanceof EmptyStep))
+// only operate on the root traversal and only if it contains scoping 
steps
+if (!(traversal.getParent() instanceof EmptyStep) ||
+
!TraversalHelper.hasStepOfAssignableClassRecursively(Scoping.class, traversal))
 return;
 
+// get the labels associated with the traveral
 final Set labels = TraversalHelper.getLabels(traversal);
+// tell all scoping steps what those labels are
 for (final Scoping scoping : 
TraversalHelper.getStepsOfAssignableClassRecursively(Scoping.class, traversal)) 
{
 scoping.setPathLabels(labels);
 }



[26/45] tinkerpop git commit: TINKERPOP-1644 Minor fixup of variable assignment

2017-03-20 Thread spmallette
TINKERPOP-1644 Minor fixup of variable assignment


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

Branch: refs/heads/TINKERPOP-1642
Commit: 33416ddd743f6c726ccb9d91d5959ae50c60bab3
Parents: 7fced96
Author: Stephen Mallette 
Authored: Tue Mar 14 12:43:58 2017 -0400
Committer: Stephen Mallette 
Committed: Tue Mar 14 12:43:58 2017 -0400

--
 .../jsr223/customizer/CompilationOptionsCustomizerProvider.java| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/33416ddd/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/CompilationOptionsCustomizerProvider.java
--
diff --git 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/CompilationOptionsCustomizerProvider.java
 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/CompilationOptionsCustomizerProvider.java
index 00a20f1..58b304f 100644
--- 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/CompilationOptionsCustomizerProvider.java
+++ 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/CompilationOptionsCustomizerProvider.java
@@ -38,7 +38,7 @@ public class CompilationOptionsCustomizerProvider implements 
CompilerCustomizerP
 }
 
 public CompilationOptionsCustomizerProvider(final Long 
expectedCompilationTime) {
-this.expectedCompilationTime = expectedCompilationTime.intValue();
+this.expectedCompilationTime = expectedCompilationTime;
 }
 
 public long getExpectedCompilationTime() {



[08/45] tinkerpop git commit: Updated changelog CTR

2017-03-20 Thread spmallette
Updated changelog CTR


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

Branch: refs/heads/TINKERPOP-1642
Commit: 60a3fb33e33245f2ad9f3b1494d349c7ccf482b5
Parents: 61a3d12
Author: Stephen Mallette 
Authored: Fri Mar 10 06:30:27 2017 -0500
Committer: Stephen Mallette 
Committed: Fri Mar 10 06:30:27 2017 -0500

--
 CHANGELOG.asciidoc | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/60a3fb33/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 04541d6..6861d57 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.2.5 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~
 
+* Fixed an `NullPointerException` in `GraphMLReader` that occurred when an 
`` didn't have an ID field and the base graph supported ID assignment.
 * Split `ComputerVerificationStrategy` into two strategies: 
`ComputerVerificationStrategy` and `ComputerFinalizationStrategy`.
 * Removed `HasTest.g_V_hasId_compilationEquality` from process test suite as 
it makes too many assumptions about provider compilation.
 * Deprecated `CustomizerProvider` infrastructure.



[17/45] tinkerpop git commit: TINKERPOP-1644 Use Caffeine cache

2017-03-20 Thread spmallette
TINKERPOP-1644
Use Caffeine cache


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

Branch: refs/heads/TINKERPOP-1642
Commit: 18778e405981523355319fa56bd04fd6cc07b845
Parents: deb6828
Author: BrynCooke 
Authored: Wed Mar 8 12:24:46 2017 +
Committer: Stephen Mallette 
Committed: Fri Mar 10 11:12:36 2017 -0500

--
 gremlin-groovy/pom.xml  |  5 ++
 .../jsr223/GremlinGroovyScriptEngine.java   | 75 +++-
 2 files changed, 48 insertions(+), 32 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/18778e40/gremlin-groovy/pom.xml
--
diff --git a/gremlin-groovy/pom.xml b/gremlin-groovy/pom.xml
index 511952a..474b458 100644
--- a/gremlin-groovy/pom.xml
+++ b/gremlin-groovy/pom.xml
@@ -70,6 +70,11 @@ limitations under the License.
 jbcrypt
 0.4
 
+
+com.github.ben-manes.caffeine
+caffeine
+2.3.1
+
 
 
 org.slf4j

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/18778e40/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
--
diff --git 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
index 67275f8..51850ad 100644
--- 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
+++ 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
@@ -18,6 +18,9 @@
  */
 package org.apache.tinkerpop.gremlin.groovy.jsr223;
 
+import com.github.benmanes.caffeine.cache.CacheLoader;
+import com.github.benmanes.caffeine.cache.Caffeine;
+import com.github.benmanes.caffeine.cache.LoadingCache;
 import groovy.grape.Grape;
 import groovy.lang.Binding;
 import groovy.lang.Closure;
@@ -80,6 +83,8 @@ import java.util.Map;
 import java.util.ServiceLoader;
 import java.util.Set;
 import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Executor;
 import java.util.concurrent.Future;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.regex.Pattern;
@@ -154,17 +159,44 @@ public class GremlinGroovyScriptEngine extends 
GroovyScriptEngineImpl
 }
 };
 
+private GremlinGroovyClassLoader loader;
+
 /**
  * Script to generated Class map.
  */
-private ManagedConcurrentValueMap classMap = new 
ManagedConcurrentValueMap<>(ReferenceBundle.getSoftBundle());
+private LoadingCache classMap = 
Caffeine.newBuilder().softValues().build(new CacheLoader() {
+@Override
+public Future load(String script) throws Exception {
+long start = System.currentTimeMillis();
+try {
+return CompletableFuture.supplyAsync(() -> 
loader.parseClass(script, generateScriptName()), command -> command.run());
+} catch (Exception e) {
+if (e.getCause() instanceof CompilationFailedException) {
+long finish = System.currentTimeMillis();
+log.error("Script compilation FAILED {} took {}ms {}", 
script, finish - start, e.getCause());
+throw (CompilationFailedException) e.getCause();
+} else {
+throw new AssertionError("Unexpected exception when 
compiling script", e);
+}
+} finally {
+long time = System.currentTimeMillis() - start;
+if (time > 5000) {
+//We warn if a script took longer than a few seconds. 
Repeatedly seeing these warnings is a sign that something is wrong.
+//Scripts with a large numbers of parameters often trigger 
this and should be avoided.
+log.warn("Script compilation {} took {}ms", script, time);
+} else {
+log.debug("Script compilation {} took {}ms", script, time);
+}
+}
+}
+
+});
 
 /**
  * Global closures map - this is used to simulate a single global 
functions namespace
  */
 private ManagedConcurrentValueMap globalClosures = new 

[29/45] tinkerpop git commit: Merge branch 'tp31' into tp32

2017-03-20 Thread spmallette
Merge branch 'tp31' into tp32


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

Branch: refs/heads/TINKERPOP-1642
Commit: 99ad76d0b37c7f653c87324080f955d3f65aebca
Parents: d7c2a22 06bf620
Author: Stephen Mallette 
Authored: Wed Mar 15 12:38:40 2017 -0400
Committer: Stephen Mallette 
Committed: Wed Mar 15 12:38:40 2017 -0400

--
 CHANGELOG.asciidoc  |   1 +
 .../step/sideEffect/AddPropertyStep.java|  17 +-
 .../decoration/EventStrategyProcessTest.java| 474 ++-
 3 files changed, 488 insertions(+), 4 deletions(-)
--


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



[34/45] tinkerpop git commit: TINKERPOP-1642 Improved performance of addV() and chained mutating statements

2017-03-20 Thread spmallette
TINKERPOP-1642 Improved performance of addV() and chained mutating statements

Added more tests for Parameters. Performance improved by about 2.5x given the 
benchmarks. Also long chained mutating traversals are now inserting roughly on 
par with single insert traversals (prior to this change they were about 25% 
slower).


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

Branch: refs/heads/TINKERPOP-1642
Commit: 8621401b9a7a7a1b622fed3daefdabd0469cc0b0
Parents: 2138c8e
Author: Stephen Mallette 
Authored: Thu Mar 2 10:44:58 2017 -0500
Committer: Stephen Mallette 
Committed: Mon Mar 20 14:07:22 2017 -0400

--
 .../traversal/dsl/graph/GraphTraversal.java |   9 +-
 .../process/traversal/step/util/Parameters.java |  33 -
 .../traversal/step/util/ParametersTest.java | 119 ++-
 3 files changed, 146 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8621401b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
index 8070538..c89c7be 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
@@ -1010,7 +1010,6 @@ public interface GraphTraversal extends 
Traversal {
 for (int i = 0; i < propertyKeyValues.length; i = i + 2) {
 this.property(propertyKeyValues[i], propertyKeyValues[i + 1]);
 }
-//((AddVertexStep) 
this.asAdmin().getEndStep()).addPropertyMutations(propertyKeyValues);
 return (GraphTraversal) this;
 }
 
@@ -2058,11 +2057,13 @@ public interface GraphTraversal extends 
Traversal {
 this.asAdmin().getBytecode().addStep(Symbols.property, key, value, 
keyValues);
 else
 this.asAdmin().getBytecode().addStep(Symbols.property, 
cardinality, key, value, keyValues);
+
 // if it can be detected that this call to property() is related to an 
addV/E() then we can attempt to fold
 // the properties into that step to gain an optimization for those 
graphs that support such capabilities.
-if ((this.asAdmin().getEndStep() instanceof AddVertexStep || 
this.asAdmin().getEndStep() instanceof AddEdgeStep
-|| this.asAdmin().getEndStep() instanceof AddVertexStartStep) 
&& keyValues.length == 0 && null == cardinality) {
-((Mutating) this.asAdmin().getEndStep()).addPropertyMutations(key, 
value);
+final Step endStep = this.asAdmin().getEndStep();
+if ((endStep instanceof AddVertexStep || endStep instanceof 
AddEdgeStep || endStep instanceof AddVertexStartStep) &&
+keyValues.length == 0 && null == cardinality) {
+((Mutating) endStep).addPropertyMutations(key, value);
 } else {
 this.asAdmin().addStep(new AddPropertyStep(this.asAdmin(), 
cardinality, key, value));
 ((AddPropertyStep) 
this.asAdmin().getEndStep()).addPropertyMutations(keyValues);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8621401b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
index 3584c87..67cb2f9 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
@@ -49,6 +49,11 @@ public final class Parameters implements Cloneable, 
Serializable {
 private Map parameters = new HashMap<>();
 
 /**
+ * Determines if there are traversals present in the parameters {@code 
Map}.
+ */
+private boolean traversalsPresent = false;
+
+/**
  * Checks for existence of key in parameter set.
  *
  * @param key the key to check
@@ -138,6 +143,11 @@ public final class Parameters implements Cloneable, 
Serializable {
 

[31/45] tinkerpop git commit: Quick fix to logging and to init script execution

2017-03-20 Thread spmallette
Quick fix to logging and to init script execution

Init scripts weren't working right for scriptengines because they weren't 
getting the bindings set to the engine scope (which was happening under the old 
model of initialization). Without that setting, the types couldn't be 
identified and type checking features of Groovy wouldn't work if configured. CTR


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

Branch: refs/heads/TINKERPOP-1642
Commit: 38217929138ffe9e5ff391d33a42b92d8ca5700e
Parents: 7b234b4
Author: Stephen Mallette 
Authored: Wed Mar 15 17:18:07 2017 -0400
Committer: Stephen Mallette 
Committed: Wed Mar 15 17:18:07 2017 -0400

--
 .../gremlin/jsr223/DefaultGremlinScriptEngineManager.java | 7 ++-
 .../gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java  | 2 --
 .../tinkerpop/gremlin/server/util/ServerGremlinExecutor.java  | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/38217929/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/DefaultGremlinScriptEngineManager.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/DefaultGremlinScriptEngineManager.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/DefaultGremlinScriptEngineManager.java
index b3025ec..c8b77e6 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/DefaultGremlinScriptEngineManager.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/DefaultGremlinScriptEngineManager.java
@@ -474,7 +474,12 @@ public class DefaultGremlinScriptEngineManager implements 
GremlinScriptEngineMan
 scriptCustomizers.stream().flatMap(sc -> sc.getScripts().stream()).
 map(l -> String.join(System.lineSeparator(), 
l)).forEach(initScript -> {
 try {
-final Object initializedBindings = engine.eval(initScript);
+// need to apply global bindings here as part of the engine or 
else they don't get their binding types
+// registered by certain GremlinScriptEngine instances (pretty 
much talking about gremlin-groovy here)
+// where type checking is made important. this may not be a 
good generic way to handled this in the
+// long run, but for now we only have two GremlinScriptEngines 
to be concerned about so thus far it
+// presents no real pains
+final Object initializedBindings = engine.eval(initScript, 
getBindings());
 if (initializedBindings != null && initializedBindings 
instanceof Map)
 ((Map) initializedBindings).forEach((k,v) 
-> put(k,v));
 } catch (Exception ex) {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/38217929/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
--
diff --git 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
index 4b27180..7a39f43 100644
--- 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
+++ 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
@@ -720,8 +720,6 @@ public class GremlinGroovyScriptEngine extends 
GroovyScriptEngineImpl
 //This should never happen as the future should completed before 
it is returned to the us.
 throw new AssertionError();
 }
-
-
 }
 
 boolean isCached(final String script) {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/38217929/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/ServerGremlinExecutor.java
--
diff --git 
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/ServerGremlinExecutor.java
 
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/ServerGremlinExecutor.java
index e3c0cae..56e78fb 100644
--- 
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/ServerGremlinExecutor.java
+++ 
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/ServerGremlinExecutor.java
@@ -149,7 +149,7 @@ public class ServerGremlinExecutor {
 

[25/45] tinkerpop git commit: TINKERPOP-1644 Changed time settings to Long values.

2017-03-20 Thread spmallette
TINKERPOP-1644 Changed time settings to Long values.

Using long is consistent with other customizer instances.


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

Branch: refs/heads/TINKERPOP-1642
Commit: 7fced963db5b73b4bb8e943f7db02cf2a491cd12
Parents: 85c5330
Author: Stephen Mallette 
Authored: Tue Mar 14 12:30:26 2017 -0400
Committer: Stephen Mallette 
Committed: Tue Mar 14 12:30:26 2017 -0400

--
 .../groovy/jsr223/CompilationOptionsCustomizer.java |  6 +++---
 .../groovy/jsr223/GremlinGroovyScriptEngine.java|  2 +-
 .../CompilationOptionsCustomizerProvider.java   | 12 
 3 files changed, 12 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7fced963/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/CompilationOptionsCustomizer.java
--
diff --git 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/CompilationOptionsCustomizer.java
 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/CompilationOptionsCustomizer.java
index 2a22eb3..de39b62 100644
--- 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/CompilationOptionsCustomizer.java
+++ 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/CompilationOptionsCustomizer.java
@@ -27,13 +27,13 @@ import org.apache.tinkerpop.gremlin.jsr223.Customizer;
  */
 class CompilationOptionsCustomizer implements Customizer {
 
-private final int expectedCompilationTime;
+private final long expectedCompilationTime;
 
-public CompilationOptionsCustomizer(final int expectedCompilationTime) {
+public CompilationOptionsCustomizer(final long expectedCompilationTime) {
 this.expectedCompilationTime = expectedCompilationTime;
 }
 
-public int getExpectedCompilationTime() {
+public long getExpectedCompilationTime() {
 return expectedCompilationTime;
 }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7fced963/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
--
diff --git 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
index 0ed8d84..4b27180 100644
--- 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
+++ 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
@@ -238,7 +238,7 @@ public class GremlinGroovyScriptEngine extends 
GroovyScriptEngineImpl
 
 private final Set artifactsToUse = new HashSet<>();
 private final boolean interpreterModeEnabled;
-private final int expectedCompilationTime;
+private final long expectedCompilationTime;
 
 /**
  * Creates a new instance using the {@link 
DefaultImportCustomizerProvider}.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7fced963/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/CompilationOptionsCustomizerProvider.java
--
diff --git 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/CompilationOptionsCustomizerProvider.java
 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/CompilationOptionsCustomizerProvider.java
index 0475511..00a20f1 100644
--- 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/CompilationOptionsCustomizerProvider.java
+++ 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/customizer/CompilationOptionsCustomizerProvider.java
@@ -31,13 +31,17 @@ import 
org.codehaus.groovy.control.customizers.CompilationCustomizer;
 @Deprecated
 public class CompilationOptionsCustomizerProvider implements 
CompilerCustomizerProvider {
 
-private final int expectedCompilationTime;
+private final long expectedCompilationTime;
 
-public CompilationOptionsCustomizerProvider(final int 
expectedCompilationTime) {
-this.expectedCompilationTime = expectedCompilationTime;
+public CompilationOptionsCustomizerProvider(final Integer 
expectedCompilationTime) {
+this.expectedCompilationTime = expectedCompilationTime.longValue();
 }
 
-public int 

[05/45] tinkerpop git commit: Added some notes on sampling to recommendation recipe CTR

2017-03-20 Thread spmallette
Added some notes on sampling to recommendation recipe CTR


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

Branch: refs/heads/TINKERPOP-1642
Commit: 3fe223bdcbf0695529aa9f5fd58b3bff573845b6
Parents: df285d3
Author: Stephen Mallette 
Authored: Thu Mar 9 07:34:23 2017 -0500
Committer: Stephen Mallette 
Committed: Thu Mar 9 07:34:23 2017 -0500

--
 docs/src/recipes/recommendation.asciidoc | 45 ++-
 1 file changed, 44 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3fe223bd/docs/src/recipes/recommendation.asciidoc
--
diff --git a/docs/src/recipes/recommendation.asciidoc 
b/docs/src/recipes/recommendation.asciidoc
index 8d5f1ec..0aaa7e4 100644
--- a/docs/src/recipes/recommendation.asciidoc
+++ b/docs/src/recipes/recommendation.asciidoc
@@ -245,4 +245,47 @@ g.V().has("person","name","alice").as("alice").
 by(values, decr).
 by(select(keys).values("name")).
   unfold().select(keys).values("name")
-
\ No newline at end of file
+
+
+In considering the practical applications of this recipe, it is worth 
revisiting the earlier "basic" version of the
+reccomendation algorithm:
+
+[gremlin-groovy,existing]
+
+g.V().has('person','name','alice').as('her').
+  out('bought').aggregate('self').
+  in('bought').where(neq('her')).
+  out('bought').where(without('self')).
+  groupCount().
+  order(local).
+by(values, decr)
+
+
+The above traversal performs a full ranking of items based on all the 
connected data. That could be a time consuming
+operation depending on the number of paths being traversed. As it turns out, 
recommendations don't need to have perfect
+knowledge of all data to provide a "pretty good" approximation of a 
recommendation. It can therefore make sense to
+place additional limits on the traversal to have it better return more quickly 
at the expense of examining less data.
+
+
+Gremlin provides a number of steps that can help with these limits like:
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#coin-step[coin()],
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#sample-step[sample()], 
and
+link:http://tinkerpop.apache.org/docs/current/reference/#timelimit-step[timeLimit()].
 For example, to have the
+traversal sample the data for no longer than one second, the previous "basic" 
recommendation could be changed to:
+
+[gremlin-groovy,existing]
+
+g.V().has('person','name','alice').as('her').
+  out('bought').aggregate('self').
+  in('bought').where(neq('her')).
+  out('bought').where(without('self')).timeLimit(1000).
+  groupCount().
+  order(local).
+by(values, decr)
+
+
+In using sampling methods, it is important to consider that the natural 
ordering of edges in the graph may not produce
+an ideal sample for the recommendation. For example, if the edges end up being 
returned oldest first, then the
+recommendation will be based on the oldest data, which would not be ideal. As 
with any traversal, it is important to
+understand the nature of the graph being traversed and the behavior of the 
underlying graph database to properly
+achieve the desired outcome.
\ No newline at end of file



[12/45] tinkerpop git commit: TINKERPOP-1644 Remove gremlin-server caffeine dependency

2017-03-20 Thread spmallette
TINKERPOP-1644 Remove gremlin-server caffeine dependency

Caffeine is now down in gremlin-groovy.


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

Branch: refs/heads/TINKERPOP-1642
Commit: 608f024f7bb83eb168a6aa637d46ee0650674903
Parents: 1df71c8
Author: Stephen Mallette 
Authored: Wed Mar 8 13:31:52 2017 -0500
Committer: Stephen Mallette 
Committed: Fri Mar 10 11:12:36 2017 -0500

--
 gremlin-server/pom.xml | 5 -
 1 file changed, 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/608f024f/gremlin-server/pom.xml
--
diff --git a/gremlin-server/pom.xml b/gremlin-server/pom.xml
index adb41fd..7a4cad9 100644
--- a/gremlin-server/pom.xml
+++ b/gremlin-server/pom.xml
@@ -55,11 +55,6 @@ limitations under the License.
 log4j
 true
 
-
-com.github.ben-manes.caffeine
-caffeine
-2.3.1
-
 
 
 com.codahale.metrics



[33/45] tinkerpop git commit: TINKERPOP-1642 Minor fixes

2017-03-20 Thread spmallette
TINKERPOP-1642 Minor fixes


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

Branch: refs/heads/TINKERPOP-1642
Commit: d3bb05bb5ba90062ce8d393906680647d23b4d12
Parents: cb4e502
Author: Stephen Mallette 
Authored: Fri Mar 3 08:45:24 2017 -0500
Committer: Stephen Mallette 
Committed: Mon Mar 20 14:07:22 2017 -0400

--
 .../gremlin/process/traversal/step/util/Parameters.java| 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d3bb05bb/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
index 3f0cb7c..6640e87 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
@@ -50,7 +50,7 @@ public final class Parameters implements Cloneable, 
Serializable {
 private Map parameters = new HashMap<>();
 
 /**
- * A cached list of traversals that server as parameter values. The list 
is cached on calls to
+ * A cached list of traversals that serve as parameter values. The list is 
cached on calls to
  * {@link #set(Object...)} because when the parameter map is large the 
cost of iterating it repeatedly on the
  * high number of calls to {@link #getTraversals()} and {@link 
#integrateTraversals(TraversalParent)} is great.
  */
@@ -129,10 +129,10 @@ public final class Parameters implements Cloneable, 
Serializable {
 
 /**
  * Gets the array of keys/values of the parameters while resolving 
parameter values that contain
- * {@link Traversal} instances
+ * {@link Traversal} instances.
  */
 public  Object[] getKeyValues(final Traverser.Admin traverser, final 
Object... exceptKeys) {
-if (this.parameters.size() == 0) return EMPTY_ARRAY;
+if (this.parameters.isEmpty()) return EMPTY_ARRAY;
 final List keyValues = new ArrayList<>();
 for (final Map.Entry entry : 
this.parameters.entrySet()) {
 if (!ArrayUtils.contains(exceptKeys, entry.getKey())) {



[16/45] tinkerpop git commit: TINKERPOP-1644 Fix exception handling.

2017-03-20 Thread spmallette
TINKERPOP-1644
Fix exception handling.


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

Branch: refs/heads/TINKERPOP-1642
Commit: 17a72e0e1db6fe52d3a0821ef2bfae1eb39be856
Parents: 18778e4
Author: BrynCooke 
Authored: Wed Mar 8 13:23:30 2017 +
Committer: Stephen Mallette 
Committed: Fri Mar 10 11:12:36 2017 -0500

--
 .../jsr223/GremlinGroovyScriptEngine.java   | 33 ++--
 1 file changed, 16 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/17a72e0e/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
--
diff --git 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
index 51850ad..2151a82 100644
--- 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
+++ 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
@@ -168,26 +168,25 @@ public class GremlinGroovyScriptEngine extends 
GroovyScriptEngineImpl
 @Override
 public Future load(String script) throws Exception {
 long start = System.currentTimeMillis();
-try {
-return CompletableFuture.supplyAsync(() -> 
loader.parseClass(script, generateScriptName()), command -> command.run());
-} catch (Exception e) {
-if (e.getCause() instanceof CompilationFailedException) {
+
+return CompletableFuture.supplyAsync(() -> {
+try {
+return loader.parseClass(script, generateScriptName());
+} catch (CompilationFailedException e) {
 long finish = System.currentTimeMillis();
 log.error("Script compilation FAILED {} took {}ms {}", 
script, finish - start, e.getCause());
-throw (CompilationFailedException) e.getCause();
-} else {
-throw new AssertionError("Unexpected exception when 
compiling script", e);
-}
-} finally {
-long time = System.currentTimeMillis() - start;
-if (time > 5000) {
-//We warn if a script took longer than a few seconds. 
Repeatedly seeing these warnings is a sign that something is wrong.
-//Scripts with a large numbers of parameters often trigger 
this and should be avoided.
-log.warn("Script compilation {} took {}ms", script, time);
-} else {
-log.debug("Script compilation {} took {}ms", script, time);
+throw e;
+} finally {
+long time = System.currentTimeMillis() - start;
+if (time > 5000) {
+//We warn if a script took longer than a few seconds. 
Repeatedly seeing these warnings is a sign that something is wrong.
+//Scripts with a large numbers of parameters often 
trigger this and should be avoided.
+log.warn("Script compilation {} took {}ms", script, 
time);
+} else {
+log.debug("Script compilation {} took {}ms", script, 
time);
+}
 }
-}
+}, command -> command.run());
 }
 
 });



[13/45] tinkerpop git commit: TINKERPOP-1644 Fix exception handling.

2017-03-20 Thread spmallette
TINKERPOP-1644
Fix exception handling.


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

Branch: refs/heads/TINKERPOP-1642
Commit: 1df71c81e032daa9c9db6f626d99c39b37d434ce
Parents: 17a72e0
Author: BrynCooke 
Authored: Wed Mar 8 13:26:31 2017 +
Committer: Stephen Mallette 
Committed: Fri Mar 10 11:12:36 2017 -0500

--
 .../tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1df71c81/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
--
diff --git 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
index 2151a82..cadc3b0 100644
--- 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
+++ 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
@@ -174,7 +174,7 @@ public class GremlinGroovyScriptEngine extends 
GroovyScriptEngineImpl
 return loader.parseClass(script, generateScriptName());
 } catch (CompilationFailedException e) {
 long finish = System.currentTimeMillis();
-log.error("Script compilation FAILED {} took {}ms {}", 
script, finish - start, e.getCause());
+log.error("Script compilation FAILED {} took {}ms {}", 
script, finish - start, e);
 throw e;
 } finally {
 long time = System.currentTimeMillis() - start;



[42/45] tinkerpop git commit: TINKERPOP-1642 Made Mutating steps implement Scoping.

2017-03-20 Thread spmallette
TINKERPOP-1642 Made Mutating steps implement Scoping.

This simplified PathUtil.getReferencedLabels() and reduced iterations over 
Parameter traversals.


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

Branch: refs/heads/TINKERPOP-1642
Commit: 61c1f8154100b50debe9f4c95b803767d0026791
Parents: 8a1c328
Author: Stephen Mallette 
Authored: Fri Mar 10 15:11:52 2017 -0500
Committer: Stephen Mallette 
Committed: Mon Mar 20 14:09:02 2017 -0400

--
 CHANGELOG.asciidoc  |  1 +
 .../process/traversal/Parameterizing.java   |  8 +
 .../gremlin/process/traversal/step/Scoping.java | 14 +---
 .../process/traversal/step/map/AddEdgeStep.java | 10 +-
 .../traversal/step/map/AddVertexStartStep.java  |  9 -
 .../traversal/step/map/AddVertexStep.java   |  9 -
 .../step/sideEffect/AddPropertyStep.java|  9 -
 .../process/traversal/step/util/Parameters.java | 37 +---
 .../process/traversal/util/PathUtil.java| 17 +
 9 files changed, 84 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/61c1f815/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 3fc3da2..dd80275 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.2.5 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~
 
+* `Mutating` steps now implement `Scoping` interface.
 * `LABELED_PATH` requirement is now set if any step in the traversal is 
labeled.
 * Added various metrics to the `GremlinGroovyScriptEngine` around script 
compilation and exposed them in Gremlin Server.
 * Moved the `caffeine` dependency down to `gremlin-groovy` and out of 
`gremlin-server`.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/61c1f815/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Parameterizing.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Parameterizing.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Parameterizing.java
index 8af80b3..9b7e088 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Parameterizing.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Parameterizing.java
@@ -21,9 +21,17 @@ package org.apache.tinkerpop.gremlin.process.traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.Parameters;
 
 /**
+ * An interface for {@link Step} implementations that hold a {@link 
Parameters} object, which fold in arguments from
+ * other steps. It is typically used on mutating steps, such as {@code 
addV()}, where calls to {@code property(k,v)}
+ * are folded in as parameters to that add vertex step.
+ *
  * @author Marko A. Rodriguez (http://markorodriguez.com)
+ * @author Stephen Mallette (http://stephen.genoprime.com)
  */
 public interface Parameterizing {
 
+/**
+ * Gets the parameters on the step.
+ */
 public Parameters getParameters();
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/61c1f815/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Scoping.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Scoping.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Scoping.java
index 22109bf..683e661 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Scoping.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Scoping.java
@@ -20,23 +20,27 @@ package org.apache.tinkerpop.gremlin.process.traversal.step;
 
 import org.apache.tinkerpop.gremlin.process.traversal.Path;
 import org.apache.tinkerpop.gremlin.process.traversal.Pop;
+import org.apache.tinkerpop.gremlin.process.traversal.Step;
 import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
-import 
org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement;
 
-import java.util.EnumSet;
 import java.util.Map;
 import java.util.Set;
 
 /**
+ * This interface is implemented by {@link Step} implementations that access 
labeled path steps, side-effects or
+ * {@code 

[10/45] tinkerpop git commit: TINKERPOP-1644 Minor code format updates

2017-03-20 Thread spmallette
TINKERPOP-1644 Minor code format updates


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

Branch: refs/heads/TINKERPOP-1642
Commit: de1d58ab33c3121e9bafb5e4908f3e0d76c8e26e
Parents: 608f024
Author: Stephen Mallette 
Authored: Wed Mar 8 13:37:42 2017 -0500
Committer: Stephen Mallette 
Committed: Fri Mar 10 11:12:36 2017 -0500

--
 .../groovy/jsr223/GremlinGroovyScriptEngine.java| 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/de1d58ab/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
--
diff --git 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
index cadc3b0..42d954a 100644
--- 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
+++ 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
@@ -164,20 +164,20 @@ public class GremlinGroovyScriptEngine extends 
GroovyScriptEngineImpl
 /**
  * Script to generated Class map.
  */
-private LoadingCache classMap = 
Caffeine.newBuilder().softValues().build(new CacheLoader() {
+private final LoadingCache classMap = 
Caffeine.newBuilder().softValues().build(new CacheLoader() {
 @Override
-public Future load(String script) throws Exception {
-long start = System.currentTimeMillis();
+public Future load(final String script) throws Exception {
+final long start = System.currentTimeMillis();
 
 return CompletableFuture.supplyAsync(() -> {
 try {
 return loader.parseClass(script, generateScriptName());
 } catch (CompilationFailedException e) {
-long finish = System.currentTimeMillis();
+final long finish = System.currentTimeMillis();
 log.error("Script compilation FAILED {} took {}ms {}", 
script, finish - start, e);
 throw e;
 } finally {
-long time = System.currentTimeMillis() - start;
+final long time = System.currentTimeMillis() - start;
 if (time > 5000) {
 //We warn if a script took longer than a few seconds. 
Repeatedly seeing these warnings is a sign that something is wrong.
 //Scripts with a large numbers of parameters often 
trigger this and should be avoided.
@@ -186,7 +186,7 @@ public class GremlinGroovyScriptEngine extends 
GroovyScriptEngineImpl
 log.debug("Script compilation {} took {}ms", script, 
time);
 }
 }
-}, command -> command.run());
+}, Runnable::run);
 }
 
 });



[40/45] tinkerpop git commit: Wow. Can't believe we didn't do this from the start. LABELED_PATH is set if a Step is labeled. Dar. So much simpler than all the recurssion in TraversalHelper.getLabels()

2017-03-20 Thread spmallette
Wow. Can't believe we didn't do this from the start. LABELED_PATH is set if a 
Step is labeled. Dar. So much simpler than all the recurssion in 
TraversalHelper.getLabels() and having a ScopingStrategy @spmallette -- can 
you verify that your Mutating traversal profiling is faster now.


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

Branch: refs/heads/TINKERPOP-1642
Commit: 5061c47be4c9beff6c12728b424febb829277958
Parents: 2aecff5
Author: Marko A. Rodriguez 
Authored: Wed Mar 8 07:37:07 2017 -0700
Committer: Stephen Mallette 
Committed: Mon Mar 20 14:09:02 2017 -0400

--
 CHANGELOG.asciidoc  |  1 +
 .../process/traversal/TraversalStrategies.java  |  2 -
 .../gremlin/process/traversal/step/Scoping.java | 15 -
 .../step/filter/WherePredicateStep.java | 15 +
 .../step/filter/WhereTraversalStep.java | 14 +
 .../traversal/step/map/SelectOneStep.java   | 13 +---
 .../process/traversal/step/map/SelectStep.java  | 13 +---
 .../strategy/finalization/ScopingStrategy.java  | 65 
 .../traversal/util/DefaultTraversal.java|  2 +
 .../process/traversal/util/TraversalHelper.java | 18 ++
 .../traversal/step/filter/WhereStepTest.java|  4 +-
 .../process/computer/GraphComputerTest.java |  2 +
 12 files changed, 29 insertions(+), 135 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5061c47b/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 86f30f7..3fc3da2 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.2.5 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~
 
+* `LABELED_PATH` requirement is now set if any step in the traversal is 
labeled.
 * Added various metrics to the `GremlinGroovyScriptEngine` around script 
compilation and exposed them in Gremlin Server.
 * Moved the `caffeine` dependency down to `gremlin-groovy` and out of 
`gremlin-server`.
 * Improved script compilation in `GremlinGroovyScriptEngine to use better 
caching, log long compile times and prevent failed compilations from 
recompiling on future requests.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5061c47b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java
index 0ddae91..63ae23f 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java
@@ -24,7 +24,6 @@ import 
org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.optimiza
 import 
org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.optimization.MessagePassingReductionStrategy;
 import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ConnectiveStrategy;
 import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.finalization.ProfileStrategy;
-import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.finalization.ScopingStrategy;
 import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.AdjacentToIncidentStrategy;
 import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.FilterRankingStrategy;
 import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.IncidentToAdjacentStrategy;
@@ -215,7 +214,6 @@ public interface TraversalStrategies extends Serializable, 
Cloneable {
 RangeByIsCountStrategy.instance(),
 PathRetractionStrategy.instance(),
 LazyBarrierStrategy.instance(),
-ScopingStrategy.instance(),
 ProfileStrategy.instance(),
 StandardVerificationStrategy.instance());
 GRAPH_CACHE.put(Graph.class, graphStrategies);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5061c47b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Scoping.java
--
diff --git 

[45/45] tinkerpop git commit: I made it so ProfileStrategy uses the MARKER model developed by @dkuppitz and myself to reduce recurssive lookups in strategies. Moving forward, we really need to move to

2017-03-20 Thread spmallette
I made it so ProfileStrategy uses the MARKER model developed by @dkuppitz and 
myself to reduce recurssive lookups in strategies. Moving forward, we really 
need to move to a Traversal.metadata model as using labeled steps is a bit 
hackish.


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

Branch: refs/heads/TINKERPOP-1642
Commit: b88b264ee418246a6b9585be635435614f573f31
Parents: 0b9f9a5
Author: Marko A. Rodriguez 
Authored: Fri Mar 17 11:57:52 2017 -0600
Committer: Stephen Mallette 
Committed: Mon Mar 20 14:09:03 2017 -0400

--
 CHANGELOG.asciidoc  |  1 +
 .../strategy/finalization/ProfileStrategy.java  | 39 +---
 2 files changed, 19 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b88b264e/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index dd80275..1d89305 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.2.5 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~
 
+* `ProfileStrategy` now uses the marker-model to reduce recrussive lookups of 
`ProfileSideEffectStep`.
 * `Mutating` steps now implement `Scoping` interface.
 * `LABELED_PATH` requirement is now set if any step in the traversal is 
labeled.
 * Added various metrics to the `GremlinGroovyScriptEngine` around script 
compilation and exposed them in Gremlin Server.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b88b264e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/finalization/ProfileStrategy.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/finalization/ProfileStrategy.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/finalization/ProfileStrategy.java
index 6d08652..b5f0b86 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/finalization/ProfileStrategy.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/finalization/ProfileStrategy.java
@@ -18,13 +18,16 @@
  */
 package org.apache.tinkerpop.gremlin.process.traversal.strategy.finalization;
 
+import 
org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.VertexProgramStep;
 import org.apache.tinkerpop.gremlin.process.traversal.Step;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
 import 
org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.ProfileSideEffectStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.EmptyStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.ProfileStep;
 import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
+import org.apache.tinkerpop.gremlin.structure.Graph;
 
 import java.util.List;
 
@@ -34,34 +37,28 @@ import java.util.List;
 public final class ProfileStrategy extends 
AbstractTraversalStrategy implements 
TraversalStrategy.FinalizationStrategy {
 
 private static final ProfileStrategy INSTANCE = new ProfileStrategy();
+private static final String MARKER = Graph.Hidden.hide("gremlin.profile");
 
 private ProfileStrategy() {
 }
 
 @Override
 public void apply(final Traversal.Admin traversal) {
-if 
(TraversalHelper.hasStepOfAssignableClassRecursively(ProfileSideEffectStep.class,
 TraversalHelper.getRootTraversal(traversal).asAdmin())) {
-prepTraversalForProfiling(traversal);
-}
-}
-
-// Iterate the traversal steps and inject the .profile()-steps.
-private void prepTraversalForProfiling(Traversal.Admin traversal) {
-// Add .profile() step after every pre-existing step.
-final List steps = traversal.getSteps();
-final int numSteps = steps.size();
-for (int ii = 0; ii < numSteps; ii++) {
-// Get the original step
-final Step step = steps.get(ii * 2);
-
-// Do not inject profiling after ProfileSideEffectStep as this 
will be the last step on the root traversal.
-if (step instanceof ProfileSideEffectStep) {
-break;
+ 

[39/45] tinkerpop git commit: TINKERPOP-1642 Minor refactoring to get rid of duplicate code

2017-03-20 Thread spmallette
TINKERPOP-1642 Minor refactoring to get rid of duplicate code


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

Branch: refs/heads/TINKERPOP-1642
Commit: 8a1c328e701aada723519e2db63f74d0034076e9
Parents: 149a6f8
Author: Stephen Mallette 
Authored: Fri Mar 10 13:27:01 2017 -0500
Committer: Stephen Mallette 
Committed: Mon Mar 20 14:09:02 2017 -0400

--
 .../process/traversal/util/TraversalHelper.java  | 19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8a1c328e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalHelper.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalHelper.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalHelper.java
index 5163824..95862d0 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalHelper.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalHelper.java
@@ -417,7 +417,7 @@ public final class TraversalHelper {
  * Determine if any step in {@link Traversal} or its children match the 
step given the provided {@link Predicate}.
  *
  * @param predicate the match function
- * @param traversal th traversal to perform the action on
+ * @param traversal the traversal to perform the action on
  * @return {@code true} if there is a match and {@code false} otherwise
  */
 public static boolean anyStepRecursively(final Predicate predicate, 
final Traversal.Admin traversal) {
@@ -425,18 +425,19 @@ public final class TraversalHelper {
 if (predicate.test(step)) {
 return true;
 }
-if (step instanceof TraversalParent) {
-for (final Traversal.Admin localChild : 
((TraversalParent) step).getLocalChildren()) {
-if (anyStepRecursively(predicate, localChild)) return true;
-}
-for (final Traversal.Admin globalChild : 
((TraversalParent) step).getGlobalChildren()) {
-if (anyStepRecursively(predicate, globalChild)) return 
true;
-}
-}
+
+if (step instanceof TraversalParent) anyStepRecursively(predicate, 
((TraversalParent) step));
 }
 return false;
 }
 
+/**
+ * Determine if any child step of a {@link TraversalParent} match the step 
given the provided {@link Predicate}.
+ *
+ * @param predicate the match function
+ * @param step the step to perform the action on
+ * @return {@code true} if there is a match and {@code false} otherwise
+ */
 public static boolean anyStepRecursively(final Predicate predicate, 
final TraversalParent step) {
 for (final Traversal.Admin localChild : step.getLocalChildren()) 
{
 if (anyStepRecursively(predicate, localChild)) return true;



[03/45] tinkerpop git commit: Improve an error message in Gremlin Server around large scripts. CTR

2017-03-20 Thread spmallette
Improve an error message in Gremlin Server around large scripts. CTR


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

Branch: refs/heads/TINKERPOP-1642
Commit: 258dccb9c1dbe89c9cb439cc9c7fdbde73209b42
Parents: 591a65a
Author: Stephen Mallette 
Authored: Tue Mar 7 16:06:34 2017 -0500
Committer: Stephen Mallette 
Committed: Tue Mar 7 16:06:34 2017 -0500

--
 CHANGELOG.asciidoc  |  1 +
 .../server/op/AbstractEvalOpProcessor.java  | 20 +--
 .../server/GremlinServerIntegrateTest.java  | 35 ++--
 3 files changed, 51 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/258dccb9/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 8cc2adc..04541d6 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -36,6 +36,7 @@ TinkerPop 3.2.5 (Release Date: NOT OFFICIALLY RELEASED YET)
 * Fixed an optimization bug in `LazyBarrierStrategy` around appending barriers 
to the end of a `Traversal`.
 * Fixed an optimization bug in `PathRetractionStrategy` around appending 
barriers to the end of a `Traversal`.
 * `TraverserIterator` in GremlinServer is smart to try and bulk traversers 
prior to network I/O.
+* Improved error handling of compilation failures for very large or highly 
parameterized script sent to Gremlin Server.
 * Fixed a bug in `RangeByIsCountStrategy` that changed the meaning of inner 
traversals.
 * Improved Gremlin-Python Driver implementation by adding a threaded client 
with basic connection pooling and support for pluggable websocket clients.
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/258dccb9/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
--
diff --git 
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
 
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
index 48de830..1ba6e36 100644
--- 
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
+++ 
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
@@ -41,10 +41,13 @@ import 
org.apache.tinkerpop.gremlin.server.util.MetricManager;
 import org.apache.tinkerpop.gremlin.util.function.ThrowingConsumer;
 import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
 import io.netty.channel.ChannelHandlerContext;
+import org.codehaus.groovy.control.ErrorCollector;
+import org.codehaus.groovy.control.MultipleCompilationErrorsException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import javax.script.Bindings;
+import javax.script.ScriptException;
 import javax.script.SimpleBindings;
 import java.util.Arrays;
 import java.util.HashSet;
@@ -292,8 +295,21 @@ public abstract class AbstractEvalOpProcessor extends 
AbstractOpProcessor {
 logger.warn(errorMessage, t);
 
ctx.writeAndFlush(ResponseMessage.build(msg).code(ResponseStatusCode.SERVER_ERROR_TIMEOUT).statusMessage(t.getMessage()).create());
 } else {
-logger.warn(String.format("Exception processing a script 
on request [%s].", msg), t);
-
ctx.writeAndFlush(ResponseMessage.build(msg).code(ResponseStatusCode.SERVER_ERROR_SCRIPT_EVALUATION).statusMessage(t.getMessage()).create());
+// try to trap the specific jvm error of "Method code too 
large!" to re-write it as something nicer,
+// but only re-write if it's the only error because 
otherwise we might lose some other important
+// information related to the failure. at this point, 
there hasn't been a scenario that has
+// presented itself where the "Method code too large!" 
comes with other compilation errors so
+// it seems that this message trumps other compilation 
errors to some reasonable degree that ends
+// up being favorable for this problem
+if (t instanceof MultipleCompilationErrorsException && 
t.getMessage().contains("Method code too large!") &&
+((MultipleCompilationErrorsException) 
t).getErrorCollector().getErrorCount() == 1) {
+final String errorMessage = String.format("The Gremlin 
statement that was submitted exceed the maximum 

[09/45] tinkerpop git commit: TINKERPOP-1644 Provided configuration options for GremlinGroovyScriptEngine

2017-03-20 Thread spmallette
TINKERPOP-1644 Provided configuration options for GremlinGroovyScriptEngine

Introduced new customizers to pass in configuration options to the 
GremlinGroovyScriptEngine.


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

Branch: refs/heads/TINKERPOP-1642
Commit: 4bdeac4b796b38fb14d1be763e03cc837b57d3d7
Parents: de1d58a
Author: Stephen Mallette 
Authored: Wed Mar 8 16:13:06 2017 -0500
Committer: Stephen Mallette 
Committed: Fri Mar 10 11:12:36 2017 -0500

--
 .../jsr223/CompilationOptionsCustomizer.java| 39 ++
 .../jsr223/GremlinGroovyScriptEngine.java   | 36 +++--
 .../jsr223/GroovyCompilerGremlinPlugin.java | 13 
 .../CompilationOptionsCustomizerProvider.java   | 48 
 ...roovyScriptEngineCompilationOptionsTest.java | 80 
 .../jsr223/GroovyCompilerGremlinPluginTest.java | 24 --
 6 files changed, 225 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4bdeac4b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/CompilationOptionsCustomizer.java
--
diff --git 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/CompilationOptionsCustomizer.java
 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/CompilationOptionsCustomizer.java
new file mode 100644
index 000..2a22eb3
--- /dev/null
+++ 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/CompilationOptionsCustomizer.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.groovy.jsr223;
+
+import org.apache.tinkerpop.gremlin.jsr223.Customizer;
+
+/**
+ * Provides some custom compilation options to the {@link 
GremlinGroovyScriptEngine}.
+ *
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+class CompilationOptionsCustomizer implements Customizer {
+
+private final int expectedCompilationTime;
+
+public CompilationOptionsCustomizer(final int expectedCompilationTime) {
+this.expectedCompilationTime = expectedCompilationTime;
+}
+
+public int getExpectedCompilationTime() {
+return expectedCompilationTime;
+}
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4bdeac4b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
--
diff --git 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
index 42d954a..5168130 100644
--- 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
+++ 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
@@ -35,6 +35,7 @@ import 
org.apache.tinkerpop.gremlin.groovy.DefaultImportCustomizerProvider;
 import org.apache.tinkerpop.gremlin.groovy.EmptyImportCustomizerProvider;
 import org.apache.tinkerpop.gremlin.groovy.ImportCustomizerProvider;
 import org.apache.tinkerpop.gremlin.groovy.NoImportCustomizerProvider;
+import 
org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.CompilationOptionsCustomizerProvider;
 import 
org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.ConfigurationCustomizerProvider;
 import 
org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.InterpreterModeCustomizerProvider;
 import org.apache.tinkerpop.gremlin.groovy.loaders.GremlinLoader;
@@ -80,11 +81,11 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Optional;
 import 

tinkerpop git commit: Changed benchmark for addVertex() to use the object array params

2017-03-20 Thread spmallette
Repository: tinkerpop
Updated Branches:
  refs/heads/tp32 382179291 -> 2138c8e19


Changed benchmark for addVertex() to use the object array params

This is a the more likely way folks would add a vertex with the Graph API so 
it's a better comparison. Ultimately, the speed of the benchmark didn't change 
that much so that's good. CTR


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

Branch: refs/heads/tp32
Commit: 2138c8e196d7b08a10510e7dffe744087e2c8e05
Parents: 3821792
Author: Stephen Mallette 
Authored: Mon Mar 20 13:55:08 2017 -0400
Committer: Stephen Mallette 
Committed: Mon Mar 20 13:55:08 2017 -0400

--
 .../gremlin/process/GraphMutateBenchmark.java | 14 ++
 1 file changed, 10 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2138c8e1/gremlin-benchmark/src/main/java/org/apache/tinkerpop/gremlin/process/GraphMutateBenchmark.java
--
diff --git 
a/gremlin-benchmark/src/main/java/org/apache/tinkerpop/gremlin/process/GraphMutateBenchmark.java
 
b/gremlin-benchmark/src/main/java/org/apache/tinkerpop/gremlin/process/GraphMutateBenchmark.java
index 3963c49..733e32b 100644
--- 
a/gremlin-benchmark/src/main/java/org/apache/tinkerpop/gremlin/process/GraphMutateBenchmark.java
+++ 
b/gremlin-benchmark/src/main/java/org/apache/tinkerpop/gremlin/process/GraphMutateBenchmark.java
@@ -22,12 +22,15 @@ import 
org.apache.tinkerpop.benchmark.util.AbstractGraphMutateBenchmark;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
 import org.apache.tinkerpop.gremlin.structure.Edge;
 import org.apache.tinkerpop.gremlin.structure.Property;
+import org.apache.tinkerpop.gremlin.structure.T;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.apache.tinkerpop.gremlin.structure.VertexProperty;
 
 import org.openjdk.jmh.annotations.Benchmark;
 import org.openjdk.jmh.annotations.Setup;
 
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Random;
 
 /**
@@ -61,15 +64,18 @@ public class GraphMutateBenchmark extends 
AbstractGraphMutateBenchmark {
 
 @Benchmark
 public Vertex testAddVertexWithProps() {
-final Vertex v = graph.addVertex("test");
+final List l = new ArrayList<>();
+l.add(T.label);
+l.add("test");
 for (int iy = 0; iy < 32; iy++) {
+l.add("x" + String.valueOf(iy));
 if (iy % 2 == 0)
-v.property("x" + String.valueOf(iy), iy);
+l.add(iy);
 else
-v.property("x" + String.valueOf(iy), String.valueOf(iy));
+l.add(String.valueOf(iy));
 }
 
-return v;
+return graph.addVertex(l.toArray());
 }
 
 @Benchmark



tinkerpop git commit: updated Grakn name.

2017-03-20 Thread okram
Repository: tinkerpop
Updated Branches:
  refs/heads/master 195b819db -> c446be25f


updated Grakn name.


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

Branch: refs/heads/master
Commit: c446be25f7b7660e48c7bee6ac6b7a96c61b89bb
Parents: 195b819
Author: Marko A. Rodriguez 
Authored: Mon Mar 20 10:52:41 2017 -0600
Committer: Marko A. Rodriguez 
Committed: Mon Mar 20 10:52:41 2017 -0600

--
 docs/site/home/providers.html | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c446be25/docs/site/home/providers.html
--
diff --git a/docs/site/home/providers.html b/docs/site/home/providers.html
index 56dd50e..6df96bc 100644
--- a/docs/site/home/providers.html
+++ b/docs/site/home/providers.html
@@ -140,7 +140,7 @@ limitations under the License.
   
  
 https://grakn.ai/;>
-https://grakn.ai/;>Grakn is a distributed 
knowledge graph that brings knowledge ontologies and transactional data 
together to enable intelligent querying of data. Querying is performed through 
the language: Graql, a declarative, knowledge-oriented graph query language for 
retrieving explicitly stored and implicitly derived information, as well as to 
perform graph analytics and automated reasoning.
+https://grakn.ai/;>GRAKN.AI is a distributed 
knowledge graph that brings knowledge ontologies and transactional data 
together to enable intelligent querying of data. Querying is performed through 
the language: Graql, a declarative, knowledge-oriented graph query language for 
retrieving explicitly stored and implicitly derived information, as well as to 
perform graph analytics and automated reasoning.
  
  
 http://www.ibm.com/analytics/us/en/technology/cloud-data-services/graph/;>
@@ -363,4 +363,4 @@ WHERE(Created.by(Friends.of("gremlin")))
  });
   

-
\ No newline at end of file
+



svn commit: r1787810 [2/3] - in /tinkerpop/site/images: homepage.graffle logos/grakn-logo.png

2017-03-20 Thread dkuppitz

Modified: tinkerpop/site/images/homepage.graffle
URL: 
http://svn.apache.org/viewvc/tinkerpop/site/images/homepage.graffle?rev=1787810=1787809=1787810=diff
==
--- tinkerpop/site/images/homepage.graffle (original)
+++ tinkerpop/site/images/homepage.graffle Mon Mar 20 16:42:09 2017
@@ -4,8 +4,8 @@
 
ApplicationVersion

-   com.omnigroup.OmniGrafflePro
-   139.18.0.187838
+   com.omnigroup.OmniGraffle6
+   169.14.0.260934

CreationDate
2015-11-17 20:30:24 +
@@ -14,17 +14,15510 @@
FileType
flat
GraphDocumentVersion
-   8
+   12
GuidesLocked
NO
GuidesVisible
YES
ImageCounter
-   12
+   15
Images


Extension
+   png
+   ID
+   14
+   RawData
+   
+   iVBORw0KGgoNSUhEUgAAFSkAAAs7CAYAAAFM36+DCXBI
+   WXMAAC4jAAAuIwF4pT92GXRFWHRTb2Z0d2FyZQBBZG9iZSBJ
+   bWFnZVJlYWR5ccllPAAJNk5JREFUeNrsnXuUZVV54E9V3apbVbee
+   Xf1AuqENMphMVhLjA5XHbdQYBRQfATUzQnDMrMly7GH+mDVoyJph
+   rYkGMv8EIbNmjTEixEQF0QkKGKPSBYJps4yRYZQlMDTQSHdVdT1u
+   vZ9T3+0+1adu38c+5+xzzt77/H6su7qpvnXvOfu8fvvbe39fW/mC
+   gxseAEBEdg/9ktfW1u4dm3zGK3QUqz9bXVuiYVKio73g7Rzcv+1n
+   k7Mve8srczSOInuGX1U9f9k+CHscbDw2ss2TlZe85dUFEzfvUDun
+   GgDE4fjU//PmFia3hHRkYB+NktLDRVhbX63+KQ9H/yVS6v87tAbp
+   g6idg/WNNSvPd5FS2ScT7xOIKQDEptQzvHWDk5seUmTGw4fjEF70
+   TUSiW2AmY1PPWXud+R1Z0wQVMQUApAjAYAwdcs1Vp8XlqLovqAOl
+   3UbctxFTANDa80ZO02tzOgh627O/d6dx29XT1c/ByZip2ZdzcZ3N
+   zB3fuq/I/vT17EBMAcDuqAJilF1bN3to9haHaDQFeouDxm2TRLEg
+   22ttKYcLCeW+MbtwIpNhfsQUALTezNrbC8ipYfT3jtAICkzMvEgj
+   wBY7BvYpD+Gf7AAOOHlPT3seKmIKANpuYMKumtRFgqzcz2pYKA/M
+   L063PDZ0DlojWSVoJ/DpPJX+Tr0DuMvp+7u8ip2lxK8RxBQAtCE3
+   rLHpI2f8fGNj3etmrpz2ToBPZWG85e/MLU7RcAAh7mVhFzxJB9x1
+   ZFpDcB7qcP/ZiCkAmM36+mrdHvX4prASjYqPFDSIwuzCBO0fQfpN
+   EAGwA+mA5+kak2tFUpnpHuZHTAEgtYc6Q8rxkSpbcY4P7d8ak9qo
+   1YpwSOb4R+2g2JhwX8d9X17SadZx7SCmAJDITb3RDQo50kvUCCo0
+   RiJfkF+Wlmcj/67NCffjIlMZ5P4unWdpg6idaMQUADLpYSOn0dsu
+   SNibP22v9oDdWWcRXxadPEi/zafmjtEQMTt2cp/xpzaE7TwjpgCg
+   FT/ljtyYugrdCJJGdC00aHVswPM6atKegft0d/VpmWPMvW17W0hH
+   L8w8VMQUALQSTLkz3L+35U0riVWdrtJV6NEouXtp0BbnJuSLwdIe
+   GiHB68m/37cSVMQUABKjXuqoWpjPl92DgqhOc2iffB1rnZ0R+SzK
+   yZ6JrOIPppuSvKiIKQAkzsJypfpno9RRQWTVMQKg/rDTycrqIo0K
+   kBCUk219P5N0aLXD/IgpAGhnZu6419+7M9QNCjltTpj2VOVE5Sjt
+   3uK8jJOey7SOCNRHd7TUJw8J93Wd54GypwcQUwBIhN7iYCjpRE7V
+   2jOJhwLt3hjScbnPxsZGQp+7zrUVXlAPIaYAYNSNiRt5OCrzEzRC
+   gmRVeWmo7ywaPwXkfnN86tnEPn+dOfShQUwBIDHJ9FPuhElPhJzW
+   x0/DVcv80hQdggTJag50vUUhoJ+kh9vHTqVKAsQUAAwgmKQ8THoi
+   v7wdnJYUScOVdEcCIE+IMJIVBDEFgJwSVnwq8+OZLjwxibSGdYns
+   IO15ktK0jisjEogpABj6QA9zc5aUU0RNm6O7fXiAIu0AiCkA8EBH
+   lJoi6bfqkUREeX19jZPWAGRuKyR3T0o7Cn5ynn0PjY+YAoBJRBHN
+   vMupLCDzCxakwdj0c3QGGpyHaVbyySobACQH5ZcRUwAw5IGehdC6
+   QnABWZrHjGkUZ5JWJR8ia8mRRbTUh4T7iCkAGPQwCEpPb3EIOTUc
+   Fp6dSaMpFbohspYcUqs9K0i4j5gCgKH0945E+r08ymmaw/h0BFof
+   C9rE7g7y8upCptuw4W1wIFpQoAkAIA3Jafb/YZBE84WOYuJ5PU0h
+   rSidynEDsJUdA/uMOJ+PTz6b6XQCkzsNpzhAxBQA0r7x1P1/VURI
+   RzYfMnlss7xug8mdLLCDzs3OLJh1b/Nf/nV16nUIMQUAK+UAYZIi
+   BBO0tYOynvVws4vHy6QORR6vKV9C/UWVARE9470M5QNAKtQOSfs3
+   56gPjLi/bwOra8tN/31+aYoTy0GyXKADEBeZauWPakknS87nMPdp
+   IqYAkAqycER36iPXIw8TMy8YsR1ETc9sj7TKxEI8TO28yjYVHJle
+   UOwsbUVEJaWaTLfyo6FROlmIKQCkhiSLr705D/TuQpoaPFCb0VXo
+   Tv1Bmpe5vaoP4yyOO4TsEC9VjN02W6+nvp4dWyLaWxysFoPwRVTH
+   Yk2G8gEgNeoNTfcUB7yZ+TEtcpqnhSlDfa9IPWF3gQUkW5As3Y7O
+   ncn3hPHpI1a0o0RB/apnUip3duFE9ZUUREwBIDVkaFp62LVSqUsU
+   0iwZmTVZJMBnSP80JEs3G+nwmt5RXVtfNfIcGhk4ZysiKqNcEgX1
+   I6JplMolYgoAqdLfu9ObX5re9jMdkQ0RBfnsrBLSJyGBJjJmSZQH
+   8o1MEVpYmjG/g2NAwn1ZKe93dOW+k/XcdiKmAOAMEjV1IYpl8j6s
+   GxrlofMAOju6qd2zTiXcT7t9gjlE5b7ZKHUTYgoAuXyY6xwiZrg5
+ 

tinkerpop git commit: CTR: Added AWK script that helps to publish the homepage. The script used by publish-docs.sh is not reusable in this case.

2017-03-20 Thread dkuppitz
Repository: tinkerpop
Updated Branches:
  refs/heads/master 71af16049 -> 195b819db


CTR: Added AWK script that helps to publish the homepage. The script
used by publish-docs.sh is not reusable in this case.


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

Branch: refs/heads/master
Commit: 195b819db4842fc822a953a6f4b47d33f88e2e11
Parents: 71af160
Author: Daniel Kuppitz 
Authored: Mon Mar 20 17:43:29 2017 +0100
Committer: Daniel Kuppitz 
Committed: Mon Mar 20 17:43:29 2017 +0100

--
 bin/publish-home.awk | 31 +++
 bin/publish-home.sh  |  2 +-
 2 files changed, 32 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/195b819d/bin/publish-home.awk
--
diff --git a/bin/publish-home.awk b/bin/publish-home.awk
new file mode 100644
index 000..3876938
--- /dev/null
+++ b/bin/publish-home.awk
@@ -0,0 +1,31 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+#
+# @author Daniel Kuppitz (http://gremlin.guru)
+#
+/^Files / {
+  print "U " gensub("^[^/]*/", "", "g", $2)
+}
+
+/^Only in (images|css|js)/ {
+  print "D " gensub(/:$/, "", "g", gensub("^[^/]*/", "", "g", $3)) "/" $4
+}
+
+/^Only in \.\./ {
+  print "A " gensub(/:$/, "", "g", gensub("^[^/]*/[^/]*/", "", "g", $3)) "/" $4
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/195b819d/bin/publish-home.sh
--
diff --git a/bin/publish-home.sh b/bin/publish-home.sh
index 1543c42..377e740 100755
--- a/bin/publish-home.sh
+++ b/bin/publish-home.sh
@@ -48,7 +48,7 @@ cd target/svn
 
 find ../site/home -mindepth 1 -maxdepth 1 -type d | xargs -n1 basename | xargs 
-r ${SVN_CMD} update
 
-diff -rq ./ ../site/home/ | awk -f ../../bin/publish-docs.awk | sed 's/^\(.\) 
\//\1 /g' > ../publish-home.files
+diff -rq ./ ../site/home/ | awk -f ../../bin/publish-home.awk | sed 's/^\(.\) 
\//\1 /g' > ../publish-home.files
 
 for file in $(cat ../publish-home.files | awk '/^[AU]/ {print $2}')
 do



svn commit: r1787810 [1/3] - in /tinkerpop/site/images: homepage.graffle logos/grakn-logo.png

2017-03-20 Thread dkuppitz
Author: dkuppitz
Date: Mon Mar 20 16:42:09 2017
New Revision: 1787810

URL: http://svn.apache.org/viewvc?rev=1787810=rev
Log:
Deploy TinkerPop homepage

Modified:
tinkerpop/site/images/homepage.graffle
tinkerpop/site/images/logos/grakn-logo.png



svn commit: r1787810 [3/3] - in /tinkerpop/site/images: homepage.graffle logos/grakn-logo.png

2017-03-20 Thread dkuppitz
Modified: tinkerpop/site/images/logos/grakn-logo.png
URL: 
http://svn.apache.org/viewvc/tinkerpop/site/images/logos/grakn-logo.png?rev=1787810=1787809=1787810=diff
==
Binary files - no diff available.




svn commit: r1787803 - /tinkerpop/site/.DS_Store

2017-03-20 Thread okram
Author: okram
Date: Mon Mar 20 16:07:27 2017
New Revision: 1787803

URL: http://svn.apache.org/viewvc?rev=1787803=rev
Log:
Deploy TinkerPop homepage

Modified:
tinkerpop/site/.DS_Store

Modified: tinkerpop/site/.DS_Store
URL: 
http://svn.apache.org/viewvc/tinkerpop/site/.DS_Store?rev=1787803=1787802=1787803=diff
==
Binary files - no diff available.




[2/3] tinkerpop git commit: updated grakn logo.

2017-03-20 Thread okram
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/71af1604/docs/site/home/images/homepage.graffle
--
diff --git a/docs/site/home/images/homepage.graffle 
b/docs/site/home/images/homepage.graffle
index 80f79d6..1f7c316 100644
--- a/docs/site/home/images/homepage.graffle
+++ b/docs/site/home/images/homepage.graffle
@@ -20,7496 +20,15500 @@
GuidesVisible
YES
ImageCounter
-   14
+   15
Images


Extension
png
ID
-   13
+   14
RawData

-   iVBORw0KGgoNSUhEUgAABRQAAAKyCAYAAACkBFKVBGdB
-   TUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAA
-   AOpgAAA6mAAAF3CculE8AAAB1WlUWHRYTUw6Y29tLmFkb2JlLnht
-   cAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRh
-   LyIgeDp4bXB0az0iWE1QIENvcmUgNS40LjAiPgogICA8cmRmOlJE
-   RiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIv
-   MjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0
-   aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZm
-   PSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAg
-   ICAgIDx0aWZmOkNvbXByZXNzaW9uPjE8L3RpZmY6Q29tcHJlc3Np
-   b24+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6
-   T3JpZW50YXRpb24+CiAgICAgICAgIDx0aWZmOlBob3RvbWV0cmlj
-   SW50ZXJwcmV0YXRpb24+MjwvdGlmZjpQaG90b21ldHJpY0ludGVy
-   cHJldGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAg
-   PC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KAtiABQAAQABJREFUeAHs
-   vYlC5DqyLZqQA1PNu7vP/bT3wfdf7unuXRMUBWQm8NayEZZnRVgR
-   GCq9d5EepIgVK2RZDms4+v/+738eF698OwL+9fHR4v3qaLFeHi0u
-   dw+Lm/3j4tUb9sr9coA/fwZ47/x1ssTfx8Xu4RH3zrT75mjWd519
-   jXBs4nJ73FrYLD+vY8vL4SmeMyd45pzhmfPvm/ui1Ot8nxdXny/m
-   6ycL++UyY37+cbJaPBT14WJxjbbEtBqxzyPhvBxryJn+66EjHc2U
-   lEexowSC7J5Lb4jbJz5VHD968WCjB1V5+Q6xXi4eYcv3u/uiDhAU
-   MXFSaVFO94sNR10GVjZ46bTXo3uOd7EzdM7ajnT5azjx08lmQV9e
-   7XaLm/vxvJXfSxubx0OW66+N49LLds551GELSFzCC4xlnC+XiyV+
-   b+7vFzv44+7hofCPFOXr9ksHR0ICrOyvy52Oc9wsDx0LVRmLsa/i
-   g9e4j/e6xRpP2veoFVfL48X32/vFLQIjh+3AwIGBcQZ4p1ztHxaf
-   N8fFg+wWD667hAZFLNnuZS3Wotm3rwfsG5/2NmiYnX8eW94YUFzh
-   uXOLe4eNi3oDY4wdW2zULsMzhjfndXvbJWhjnsL+1f5+8WWzXKBK
-   RF24wIcWicSxtF72e+kZs3f69fRASqXL5pn0djitmKr2xDy7BBHt
-   Oed9f4p3hw1e4Jd40f/bMJgY6piK9fE9sV/GRapStLHb+4Yfuj02
-   +3YcrbCyZZpc9CFYXO/3KP/HeI/eLLYP28V9wr3dLg8WnppmmwUi
-   tcyuIOKTsCVu8mO02k7xgfp8uV7sF/eLH3f7xf6xbHykcp2aTm3D
-   c8Z5+sXK/rpcT9vtddVte3awaudVBxRx7y0+rstACG+7/97wBlTx
-   cMh0YOCPZYABxGsERtig5v303wf0uBq4j2xe1nLRPwA8kwq7xqc9
-   9hwU5HwA5cBTyfDhj4HEM7yAcrvcVdr793xwUf88feNl/7iemJ94
-   P/bd9rk+PEZ9uFx83e4H68M4b//+OLb+vKlXPHSkYtGn0wRQ7J9J
-   b4Pb2Ct43Mu2oUaBTFJCag++Sx1rBFLeod3DeA97JqYEUxIMKJJI
-   KWYmTfkv8eTnrI0/v44Se/zXXoddGy62g/tWtuSV+xvt/x1IWeI+
-   +IQe+t8RzCr75VR6fDir9DWZfJXHA0FE2nOEm53tyYvVEh06GFLk
-   KLEtPmRyZETa1r5H0/LJUqWikUntTp2uy9r2uvx0XN12pZy111G3
-   KQVTeppXG1Bk74FP6EXAjT0SOcz50DEx3fGHlAcGYgZ+4TMl76kv
-   J/hKuTrG0If6A83+hS1GI9m3r4CJxq4x5YNfwmhXWsuHUJe+9HM+
-   /MX+P8UBnzV88dwPPnTssf3ZfknnN+Yp3u8rZ/zAsj9+xMvVcvEO
-   w4/Ya1G2pWOTyY1Te+iI9dnuSwMpds+kt8Vr8BrLvZTjIq9LINGD
-   87YOvsx/wT1+i48IW9TlW4zQyLGl1DGxHpVfkkMOsabx/Tr2Nmfj
-   EqQpPHSUmOLnuBRlenore6zklpbtUfYvMeT5Lwx/5jvAbwS17h9Y
-   Gmz1lto9dKR7UJ1yJIBYyAWlZJXDm0/B87vlarFDT8Rb9BJlYLf+
-   5tVGUr8/29fznvHwi1yHBQdtmXJccu49dJTlTY5NnuPVBRT5QDjB
-   cDMGPvARZfETgY89Gjw+bpETfMhxYOA1MMD7h3Mo/txhuB8a2Fs0
-   Ju4GgyUvbZX9HW/X+LTHnsM77QdsDqk5ZNjz1+d7csLeLLw/+AJa
-   35rH9as5jubrE1pnb3+KjiZHzeMUP9C1HO58uX1AUPEYHy3Hhj57
-   2O7FcQpD09Nogig2QUT6jqXEy4fTuUuVIO6FSMFvJoBYGNNLFYcZ
-   fkZbh+2ea3ww4K92k9YxmrJvWT4r/HoO5NzZ6+p7jsuxDuWwtMNS
-   dt0mauIIv5/bLab8OMH+3eIWxzbVgZ9ddSszH6UEECOV7IPIe21z
-   hEAiOkSxS9QVRkDcPmLO1hFKqns0Eph9dwREFn1yHRa2UyaR1GXL
-   sckp8dDRtEuOMi1H3ZZXE1DkA5iNozP8Ya+BKzT0LxHNt6ns0qg8
-   

[1/3] [tinkerpop] Git Push Summary

2017-03-20 Thread okram
Repository: tinkerpop
Updated Branches:
  refs/heads/master 91c273ad7 -> 71af16049


[3/3] tinkerpop git commit: updated grakn logo.

2017-03-20 Thread okram
updated grakn logo.


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

Branch: refs/heads/master
Commit: 71af16049b00c4eec610597813d51388b6470339
Parents: 91c273a
Author: Marko A. Rodriguez 
Authored: Mon Mar 20 10:05:12 2017 -0600
Committer: Marko A. Rodriguez 
Committed: Mon Mar 20 10:05:12 2017 -0600

--
 docs/site/home/images/homepage.graffle | 22976 +++---
 docs/site/home/images/logos/grakn-logo.png |   Bin 141276 -> 72677 bytes
 2 files changed, 15490 insertions(+), 7486 deletions(-)
--