[32/50] [abbrv] atlas git commit: ATLAS-2520: Introduce JanusGraphTraversal to deprecate use of GremlinScriptEngine
ATLAS-2520: Introduce JanusGraphTraversal to deprecate use of GremlinScriptEngine Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/942a5382 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/942a5382 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/942a5382 Branch: refs/heads/branch-1.0 Commit: 942a5382c9517b8ebe9ed1f99def6bacd9c6a706 Parents: 6973830 Author: apoorvnaik Authored: Tue Oct 23 15:39:29 2018 -0700 Committer: Ashutosh Mestry Committed: Thu Nov 1 15:42:58 2018 -0700 -- graphdb/api/pom.xml | 5 + .../atlas/repository/graphdb/AtlasGraph.java| 21 +- .../repository/graphdb/AtlasGraphTraversal.java | 91 .../graphdb/AtlasGraphTraversalSource.java | 40 .../graphdb/janus/AtlasJanusGraph.java | 19 ++ .../graphdb/janus/AtlasJanusGraphTraversal.java | 232 +++ .../org/apache/atlas/query/GremlinQuery.java| 18 +- 7 files changed, 409 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/942a5382/graphdb/api/pom.xml -- diff --git a/graphdb/api/pom.xml b/graphdb/api/pom.xml index e13c4cb..6e0f050 100644 --- a/graphdb/api/pom.xml +++ b/graphdb/api/pom.xml @@ -46,6 +46,11 @@ org.codehaus.jettison jettison + +org.apache.tinkerpop +gremlin-core +3.3.3 + http://git-wip-us.apache.org/repos/asf/atlas/blob/942a5382/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java -- diff --git a/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java b/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java index 31d2085..09eab28 100644 --- a/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java +++ b/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java @@ -17,18 +17,17 @@ */ package org.apache.atlas.repository.graphdb; +import org.apache.atlas.exception.AtlasBaseException; +import org.apache.atlas.groovy.GroovyExpression; +import org.apache.atlas.type.AtlasType; + +import javax.script.ScriptEngine; +import javax.script.ScriptException; import java.io.IOException; import java.io.OutputStream; import java.util.Map; import java.util.Set; -import javax.script.ScriptEngine; -import javax.script.ScriptException; - -import org.apache.atlas.exception.AtlasBaseException; -import org.apache.atlas.groovy.GroovyExpression; -import org.apache.atlas.type.AtlasType; - /** * Represents a graph. * @@ -144,6 +143,14 @@ public interface AtlasGraph { AtlasGraphQuery query(); /** + * Start a graph traversal + * @return + */ +AtlasGraphTraversal V(Object ... vertexIds); + +AtlasGraphTraversal E(Object ... edgeIds); + +/** * Creates an index query. * * @param indexName index name http://git-wip-us.apache.org/repos/asf/atlas/blob/942a5382/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphTraversal.java -- diff --git a/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphTraversal.java b/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphTraversal.java new file mode 100644 index 000..881bb1e --- /dev/null +++ b/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphTraversal.java @@ -0,0 +1,91 @@ +/** + * 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.atlas.repository.graphdb; + +import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.DefaultGraphTraversal; +import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource; +import org.apache.tinkerpop.gremlin.structure.Graph; + +import java.util.Collection; +import java.util.List; +import
atlas git commit: ATLAS-2520: Introduce JanusGraphTraversal to deprecate use of GremlinScriptEngine [Forced Update!]
Repository: atlas Updated Branches: refs/heads/master 3b64d9643 -> 0cf62fd80 (forced update) ATLAS-2520: Introduce JanusGraphTraversal to deprecate use of GremlinScriptEngine Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/0cf62fd8 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/0cf62fd8 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/0cf62fd8 Branch: refs/heads/master Commit: 0cf62fd8002b68d0e11479752d3d2630a4bdfd38 Parents: 9277531 Author: apoorvnaik Authored: Tue Oct 23 15:39:29 2018 -0700 Committer: apoorvnaik Committed: Thu Oct 25 14:58:40 2018 -0700 -- graphdb/api/pom.xml | 5 + .../atlas/repository/graphdb/AtlasGraph.java| 21 +- .../repository/graphdb/AtlasGraphTraversal.java | 91 .../graphdb/AtlasGraphTraversalSource.java | 40 .../graphdb/janus/AtlasJanusGraph.java | 19 ++ .../graphdb/janus/AtlasJanusGraphTraversal.java | 232 +++ .../org/apache/atlas/query/GremlinQuery.java| 18 +- 7 files changed, 409 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/0cf62fd8/graphdb/api/pom.xml -- diff --git a/graphdb/api/pom.xml b/graphdb/api/pom.xml index 14b273f..58ca51a 100644 --- a/graphdb/api/pom.xml +++ b/graphdb/api/pom.xml @@ -46,6 +46,11 @@ org.codehaus.jettison jettison + +org.apache.tinkerpop +gremlin-core +3.3.3 + http://git-wip-us.apache.org/repos/asf/atlas/blob/0cf62fd8/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java -- diff --git a/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java b/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java index 31d2085..09eab28 100644 --- a/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java +++ b/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java @@ -17,18 +17,17 @@ */ package org.apache.atlas.repository.graphdb; +import org.apache.atlas.exception.AtlasBaseException; +import org.apache.atlas.groovy.GroovyExpression; +import org.apache.atlas.type.AtlasType; + +import javax.script.ScriptEngine; +import javax.script.ScriptException; import java.io.IOException; import java.io.OutputStream; import java.util.Map; import java.util.Set; -import javax.script.ScriptEngine; -import javax.script.ScriptException; - -import org.apache.atlas.exception.AtlasBaseException; -import org.apache.atlas.groovy.GroovyExpression; -import org.apache.atlas.type.AtlasType; - /** * Represents a graph. * @@ -144,6 +143,14 @@ public interface AtlasGraph { AtlasGraphQuery query(); /** + * Start a graph traversal + * @return + */ +AtlasGraphTraversal V(Object ... vertexIds); + +AtlasGraphTraversal E(Object ... edgeIds); + +/** * Creates an index query. * * @param indexName index name http://git-wip-us.apache.org/repos/asf/atlas/blob/0cf62fd8/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphTraversal.java -- diff --git a/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphTraversal.java b/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphTraversal.java new file mode 100644 index 000..881bb1e --- /dev/null +++ b/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphTraversal.java @@ -0,0 +1,91 @@ +/** + * 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.atlas.repository.graphdb; + +import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.DefaultGraphTraversal; +import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource; +import org.apache.tinkerpop.
atlas git commit: ATLAS-2520: Introduce JanusGraphTraversal to deprecate use of GremlinScriptEngine (missing GremlinQuery class)
Repository: atlas Updated Branches: refs/heads/master 5317a7215 -> 3b64d9643 ATLAS-2520: Introduce JanusGraphTraversal to deprecate use of GremlinScriptEngine (missing GremlinQuery class) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/3b64d964 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/3b64d964 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/3b64d964 Branch: refs/heads/master Commit: 3b64d964342fc2d7a2a5df73789f14a404e5b7e7 Parents: 5317a72 Author: apoorvnaik Authored: Thu Oct 25 14:02:36 2018 -0700 Committer: apoorvnaik Committed: Thu Oct 25 14:02:36 2018 -0700 -- .../org/apache/atlas/query/GremlinQuery.java | 19 +++ 1 file changed, 19 insertions(+) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/3b64d964/repository/src/main/java/org/apache/atlas/query/GremlinQuery.java -- diff --git a/repository/src/main/java/org/apache/atlas/query/GremlinQuery.java b/repository/src/main/java/org/apache/atlas/query/GremlinQuery.java new file mode 100644 index 000..50c6784 --- /dev/null +++ b/repository/src/main/java/org/apache/atlas/query/GremlinQuery.java @@ -0,0 +1,19 @@ +package org.apache.atlas.query; + +public class GremlinQuery { +private final String queryStr; +private final boolean hasSelect; + +public GremlinQuery(String text, boolean hasSelect) { +this.queryStr = text; +this.hasSelect = hasSelect; +} + +public String queryStr() { +return queryStr; +} + +public boolean hasSelectList() { +return hasSelect; +} +} \ No newline at end of file
atlas git commit: ATLAS-2520: Introduce JanusGraphTraversal to deprecate use of GremlinScriptEngine
Repository: atlas Updated Branches: refs/heads/master 927753159 -> 5317a7215 ATLAS-2520: Introduce JanusGraphTraversal to deprecate use of GremlinScriptEngine Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/5317a721 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/5317a721 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/5317a721 Branch: refs/heads/master Commit: 5317a7215e21321235c1b9cc99d61d78b10659eb Parents: 9277531 Author: apoorvnaik Authored: Tue Oct 23 15:39:29 2018 -0700 Committer: apoorvnaik Committed: Thu Oct 25 11:29:55 2018 -0700 -- graphdb/api/pom.xml | 5 + .../atlas/repository/graphdb/AtlasGraph.java| 21 +- .../repository/graphdb/AtlasGraphTraversal.java | 91 .../graphdb/AtlasGraphTraversalSource.java | 40 .../graphdb/janus/AtlasJanusGraph.java | 19 ++ .../graphdb/janus/AtlasJanusGraphTraversal.java | 232 +++ .../org/apache/atlas/query/GremlinQuery.java| 38 --- 7 files changed, 401 insertions(+), 45 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/5317a721/graphdb/api/pom.xml -- diff --git a/graphdb/api/pom.xml b/graphdb/api/pom.xml index 14b273f..58ca51a 100644 --- a/graphdb/api/pom.xml +++ b/graphdb/api/pom.xml @@ -46,6 +46,11 @@ org.codehaus.jettison jettison + +org.apache.tinkerpop +gremlin-core +3.3.3 + http://git-wip-us.apache.org/repos/asf/atlas/blob/5317a721/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java -- diff --git a/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java b/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java index 31d2085..09eab28 100644 --- a/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java +++ b/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java @@ -17,18 +17,17 @@ */ package org.apache.atlas.repository.graphdb; +import org.apache.atlas.exception.AtlasBaseException; +import org.apache.atlas.groovy.GroovyExpression; +import org.apache.atlas.type.AtlasType; + +import javax.script.ScriptEngine; +import javax.script.ScriptException; import java.io.IOException; import java.io.OutputStream; import java.util.Map; import java.util.Set; -import javax.script.ScriptEngine; -import javax.script.ScriptException; - -import org.apache.atlas.exception.AtlasBaseException; -import org.apache.atlas.groovy.GroovyExpression; -import org.apache.atlas.type.AtlasType; - /** * Represents a graph. * @@ -144,6 +143,14 @@ public interface AtlasGraph { AtlasGraphQuery query(); /** + * Start a graph traversal + * @return + */ +AtlasGraphTraversal V(Object ... vertexIds); + +AtlasGraphTraversal E(Object ... edgeIds); + +/** * Creates an index query. * * @param indexName index name http://git-wip-us.apache.org/repos/asf/atlas/blob/5317a721/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphTraversal.java -- diff --git a/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphTraversal.java b/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphTraversal.java new file mode 100644 index 000..881bb1e --- /dev/null +++ b/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphTraversal.java @@ -0,0 +1,91 @@ +/** + * 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.atlas.repository.graphdb; + +import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.DefaultGraphTraversal; +import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource; +import org.apache.tinkerpop.gremlin.structu