remove unnecessary files.
Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/411972de Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/411972de Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/411972de Branch: refs/heads/master Commit: 411972de20b960d9e24813cd439477871840a212 Parents: 124003d Author: DO YUNG YOON <steams...@apache.org> Authored: Sat Jul 29 06:03:39 2017 +0900 Committer: DO YUNG YOON <steams...@apache.org> Committed: Sat Jul 29 06:03:39 2017 +0900 ---------------------------------------------------------------------- .../optimize/S2GraphTraversalUtil.java | 60 -------- .../tinkerpop/optimize/S2GraphVertexStep.java | 148 ------------------- .../core/tinkerpop/optimize/S2GraphStep.scala | 31 ---- .../optimize/S2GraphStepStrategy.scala | 62 -------- 4 files changed, 301 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/411972de/s2core/src/main/java/org/apache/s2graph/core/io/tinkerpop/optimize/S2GraphTraversalUtil.java ---------------------------------------------------------------------- diff --git a/s2core/src/main/java/org/apache/s2graph/core/io/tinkerpop/optimize/S2GraphTraversalUtil.java b/s2core/src/main/java/org/apache/s2graph/core/io/tinkerpop/optimize/S2GraphTraversalUtil.java deleted file mode 100644 index 8bbf2e4..0000000 --- a/s2core/src/main/java/org/apache/s2graph/core/io/tinkerpop/optimize/S2GraphTraversalUtil.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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.s2graph.core.io.tinkerpop.optimize; -// -//import org.apache.s2graph.core.S2Vertex; -//import org.apache.tinkerpop.gremlin.process.traversal.Step; -//import org.apache.tinkerpop.gremlin.process.traversal.Traversal; -//import org.apache.tinkerpop.gremlin.process.traversal.Traverser; -//import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.IdentityStep; -//import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper; -//import org.apache.tinkerpop.gremlin.structure.Edge; -//import org.apache.tinkerpop.gremlin.structure.Element; -//import org.apache.tinkerpop.gremlin.structure.Graph; -//import org.apache.tinkerpop.gremlin.structure.Vertex; -//import org.apache.tinkerpop.gremlin.structure.util.wrapped.WrappedVertex; -// -//import java.util.Optional; -// -//public class S2GraphTraversalUtil { -// -// public static S2Vertex getS2Vertex(Element v) { -// while (v instanceof WrappedVertex) { -// v = ((WrappedVertex<Vertex>) v).getBaseVertex(); -// } -// if (v instanceof S2Vertex) { -// return (S2Vertex) v; -// } else throw new IllegalArgumentException("Expected traverser of JanusGraph vertex but found: " + v); -// } -// -// public static S2Vertex getS2Vertex(Traverser<? extends Element> traverser) { -// return getS2Vertex(traverser.get()); -// } -// -// -// public static Step getNextNonIdentityStep(final Step start) { -// Step currentStep = start.getNextStep(); -// //Skip over identity steps -// while (currentStep instanceof IdentityStep) currentStep = currentStep.getNextStep(); -// return currentStep; -// } -// -// -//} http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/411972de/s2core/src/main/java/org/apache/s2graph/core/io/tinkerpop/optimize/S2GraphVertexStep.java ---------------------------------------------------------------------- diff --git a/s2core/src/main/java/org/apache/s2graph/core/io/tinkerpop/optimize/S2GraphVertexStep.java b/s2core/src/main/java/org/apache/s2graph/core/io/tinkerpop/optimize/S2GraphVertexStep.java deleted file mode 100644 index 8f372c7..0000000 --- a/s2core/src/main/java/org/apache/s2graph/core/io/tinkerpop/optimize/S2GraphVertexStep.java +++ /dev/null @@ -1,148 +0,0 @@ -package org.apache.s2graph.core.io.tinkerpop.optimize; - -/* - * 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. - */ - - - -import org.apache.s2graph.core.Query; -import org.apache.s2graph.core.S2Vertex; -import org.apache.tinkerpop.gremlin.process.traversal.Order; -import org.apache.tinkerpop.gremlin.process.traversal.Traverser; -import org.apache.tinkerpop.gremlin.process.traversal.step.Profiling; -import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexStep; -import org.apache.tinkerpop.gremlin.process.traversal.step.util.HasContainer; -import org.apache.tinkerpop.gremlin.process.traversal.util.FastNoSuchElementException; -import org.apache.tinkerpop.gremlin.process.traversal.util.MutableMetrics; -import org.apache.tinkerpop.gremlin.structure.Element; -import org.apache.tinkerpop.gremlin.structure.Vertex; -import org.apache.tinkerpop.gremlin.structure.util.StringFactory; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -//public class S2GraphVertexStep<E extends Element> extends VertexStep<E> implements HasStepFolder<Vertex, E>, Profiling { -// -// public S2GraphVertexStep(VertexStep<E> originalStep) { -// super(originalStep.getTraversal(), originalStep.getReturnClass(), originalStep.getDirection(), originalStep.getEdgeLabels()); -// originalStep.getLabels().forEach(this::addLabel); -// this.hasContainers = new ArrayList<>(); -// this.limit = Integer.MAX_VALUE; -// } -// -// private boolean initialized = false; -// private Map<S2Vertex, Iterable<? extends Element>> multiQueryResults = null; -// -// -// public Query makeQuery(Query query) { -// query.labels(getEdgeLabels()); -// query.direction(getDirection()); -// for (HasContainer condition : hasContainers) { -// query.has(condition.getKey(), JanusGraphPredicate.Converter.convert(condition.getBiPredicate()), condition.getValue()); -// } -// for (OrderEntry order : orders) query.orderBy(order.key, order.order); -// if (limit != BaseQuery.NO_LIMIT) query.limit(limit); -// ((BasicVertexCentricQueryBuilder) query).profiler(queryProfiler); -// return query; -// } -// -// @SuppressWarnings("deprecation") -// private void initialize() { -// assert !initialized; -// initialized = true; -// -// if (!starts.hasNext()) throw FastNoSuchElementException.instance(); -// JanusGraphMultiVertexQuery mquery = JanusGraphTraversalUtil.getTx(traversal).multiQuery(); -// List<Traverser.Admin<Vertex>> vertices = new ArrayList<>(); -// starts.forEachRemaining(v -> { -// vertices.add(v); -// mquery.addVertex(v.get()); -// }); -// starts.add(vertices.iterator()); -// assert vertices.size() > 0; -// makeQuery(mquery); -// -// multiQueryResults = (Vertex.class.isAssignableFrom(getReturnClass())) ? mquery.vertices() : mquery.edges(); -// -// } -// -// @Override -// protected Traverser.Admin<E> processNextStart() { -// if (!initialized) initialize(); -// return super.processNextStart(); -// } -// -// @Override -// protected Iterator<E> flatMap(final Traverser.Admin<Vertex> traverser) { -// JanusGraphVertexQuery query = makeQuery((JanusGraphTraversalUtil.getJanusGraphVertex(traverser)).query()); -// return (Vertex.class.isAssignableFrom(getReturnClass())) ? query.vertices().iterator() : query.edges().iterator(); -// } -// -// @Override -// public void reset() { -// super.reset(); -// this.initialized = false; -// } -// -// @Override -// public S2GraphVertexStep<E> clone() { -// final S2GraphVertexStep<E> clone = (S2GraphVertexStep<E>) super.clone(); -// clone.initialized = false; -// return clone; -// } -// -// -// private final List<HasContainer> hasContainers; -// private int limit = Integer.MAX_VALUE; -// private List<OrderEntry> orders = new ArrayList<>(); -// -// -// @Override -// public void addAll(Iterable<HasContainer> has) { -// HasStepFolder.splitAndP(hasContainers, has); -// } -// -// @Override -// public void orderBy(String key, Order order) { -// orders.add(new OrderEntry(key, order)); -// } -// -// @Override -// public void setLimit(int limit) { -// this.limit = limit; -// } -// -// @Override -// public int getLimit() { -// return this.limit; -// } -// -// @Override -// public String toString() { -// return this.hasContainers.isEmpty() ? super.toString() : StringFactory.stepString(this, this.hasContainers); -// } -// -// @Override -// public void setMetrics(MutableMetrics metrics) { -//// queryProfiler = new TP3ProfileWrapper(metrics); -// } -//} - http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/411972de/s2core/src/main/scala/org/apache/s2graph/core/tinkerpop/optimize/S2GraphStep.scala ---------------------------------------------------------------------- diff --git a/s2core/src/main/scala/org/apache/s2graph/core/tinkerpop/optimize/S2GraphStep.scala b/s2core/src/main/scala/org/apache/s2graph/core/tinkerpop/optimize/S2GraphStep.scala deleted file mode 100644 index 962af30..0000000 --- a/s2core/src/main/scala/org/apache/s2graph/core/tinkerpop/optimize/S2GraphStep.scala +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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.s2graph.core.tinkerpop.optimize -// -//import org.apache.s2graph.core.utils.logger -//import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep -//import org.apache.tinkerpop.gremlin.structure.Element -// -//class S2GraphStep[S, E <: Element](originalStep: GraphStep[S, E]) -// extends GraphStep[S, E](originalStep.getTraversal(), originalStep.getReturnClass(), originalStep.isStartStep(), originalStep.getIds()) { -// -// -// logger.error(s"[[S2GraphStep]]") -//} http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/411972de/s2core/src/main/scala/org/apache/s2graph/core/tinkerpop/optimize/S2GraphStepStrategy.scala ---------------------------------------------------------------------- diff --git a/s2core/src/main/scala/org/apache/s2graph/core/tinkerpop/optimize/S2GraphStepStrategy.scala b/s2core/src/main/scala/org/apache/s2graph/core/tinkerpop/optimize/S2GraphStepStrategy.scala deleted file mode 100644 index cd477cb..0000000 --- a/s2core/src/main/scala/org/apache/s2graph/core/tinkerpop/optimize/S2GraphStepStrategy.scala +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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.s2graph.core.tinkerpop.optimize -// -//import org.apache.s2graph.core.utils.logger -//import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep -//import org.apache.tinkerpop.gremlin.process.traversal.{Step, Traversal, TraversalStrategy} -//import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy -//import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper -//import org.apache.tinkerpop.gremlin.structure.Element -// -//object S2GraphStepStrategy { -// val INSTANCE = new S2GraphStepStrategy() -// def instance = INSTANCE -//} -//class S2GraphStepStrategy extends AbstractTraversalStrategy[TraversalStrategy.ProviderOptimizationStrategy] with TraversalStrategy.ProviderOptimizationStrategy { -// import scala.collection.JavaConversions._ -// override def apply(traversal: Traversal.Admin[_, _]): Unit = { -// TraversalHelper.getStepsOfClass(classOf[GraphStep[_, Element]], traversal).foreach { originalGraphStep => -// if (originalGraphStep.getIds() == null || originalGraphStep.getIds().length == 0) { -// //Try to optimize for index calls -// -// val s2GraphStep = new S2GraphStep(originalGraphStep) -// TraversalHelper.replaceStep(originalGraphStep, s2GraphStep.asInstanceOf[Step[_ <: Any, _ <: Any]], traversal) -// logger.error(s"[[Ids is empty]]") -// } else { -//// //Make sure that any provided "start" elements are instantiated in the current transaction -//// Object[] ids = originalGraphStep.getIds(); -//// ElementUtils.verifyArgsMustBeEitherIdorElement(ids); -//// if (ids[0] instanceof Element) { -//// //GraphStep constructor ensures that the entire array is elements -//// final Object[] elementIds = new Object[ids.length]; -//// for (int i = 0; i < ids.length; i++) { -//// elementIds[i] = ((Element) ids[i]).id(); -//// } -//// originalGraphStep.setIteratorSupplier(() -> (Iterator) (originalGraphStep.returnsVertex() ? -//// ((Graph) originalGraphStep.getTraversal().getGraph().get()).vertices(elementIds) : -//// ((Graph) originalGraphStep.getTraversal().getGraph().get()).edges(elementIds))); -//// } -// logger.error(s"[[Ids is not empty]]") -// } -// } -// -// } -//}