diff --git a/janusgraph-core/src/main/java/org/janusgraph/core/JanusGraph.java b/janusgraph-core/src/main/java/org/janusgraph/core/JanusGraph.java index dd51d2b9cf8..3c9f149fd93 100644 --- a/janusgraph-core/src/main/java/org/janusgraph/core/JanusGraph.java +++ b/janusgraph-core/src/main/java/org/janusgraph/core/JanusGraph.java @@ -55,11 +55,13 @@ @Graph.OptOut( test = "org.apache.tinkerpop.gremlin.structure.io.IoTest$GraphMLTest", method = "shouldReadGraphMLWithNoEdgeLabels", - reason = "Titan does not support default edge label (edge) used when GraphML is missing edge labels.") + reason = "JanusGraph does not support default edge label (edge) used when GraphML is missing edge labels.") @Graph.OptOut( test = "org.apache.tinkerpop.gremlin.process.computer.GraphComputerTest", method = "shouldSupportGraphFilter", - reason = "Titan currently does not support graph filters but does not throw proper exception because doing so breaks numerous tests in gremlin-test ProcessComputerSuite.") + reason = "JanusGraph test graph computer (FulgoraGraphComputer} " + + "currently does not support graph filters but does not throw proper exception because doing so breaks numerous " + + "tests in gremlin-test ProcessComputerSuite.") public interface JanusGraph extends Transaction { /* --------------------------------------------------------------- diff --git a/janusgraph-core/src/main/java/org/janusgraph/graphdb/database/serialize/attribute/SerializableSerializer.java b/janusgraph-core/src/main/java/org/janusgraph/graphdb/database/serialize/attribute/SerializableSerializer.java index 77625f0e11a..b28ea61d32a 100644 --- a/janusgraph-core/src/main/java/org/janusgraph/graphdb/database/serialize/attribute/SerializableSerializer.java +++ b/janusgraph-core/src/main/java/org/janusgraph/graphdb/database/serialize/attribute/SerializableSerializer.java @@ -1,3 +1,17 @@ +// Copyright 2017 JanusGraph Authors +// +// Licensed 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.janusgraph.graphdb.database.serialize.attribute; import org.janusgraph.core.attribute.AttributeSerializer; @@ -11,6 +25,10 @@ import java.io.Serializable; import java.util.HashMap; +/** + * Serializes {@link Serializable} objects. + * @param Serializable type + */ public class SerializableSerializer implements AttributeSerializer, SerializerInjected { private Serializer serializer; diff --git a/janusgraph-core/src/main/java/org/janusgraph/graphdb/olap/computer/FulgoraGraphComputer.java b/janusgraph-core/src/main/java/org/janusgraph/graphdb/olap/computer/FulgoraGraphComputer.java index 55e6a638cb9..66c582a0fb8 100644 --- a/janusgraph-core/src/main/java/org/janusgraph/graphdb/olap/computer/FulgoraGraphComputer.java +++ b/janusgraph-core/src/main/java/org/janusgraph/graphdb/olap/computer/FulgoraGraphComputer.java @@ -1,3 +1,17 @@ +// Copyright 2017 JanusGraph Authors +// +// Licensed 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.janusgraph.graphdb.olap.computer; import com.google.common.base.Function; diff --git a/janusgraph-core/src/main/java/org/janusgraph/graphdb/olap/computer/FulgoraMemory.java b/janusgraph-core/src/main/java/org/janusgraph/graphdb/olap/computer/FulgoraMemory.java index 7cd490a1204..18f31050c02 100644 --- a/janusgraph-core/src/main/java/org/janusgraph/graphdb/olap/computer/FulgoraMemory.java +++ b/janusgraph-core/src/main/java/org/janusgraph/graphdb/olap/computer/FulgoraMemory.java @@ -158,9 +158,7 @@ protected void attachReferenceElements(Graph graph) { } private static void attachReferenceElements(TraverserSet toProcessTraversers, Graph graph) { - final Iterator> traversers = toProcessTraversers.iterator(); - while (traversers.hasNext()) { - final Traverser.Admin traverser = traversers.next(); + toProcessTraversers.stream().forEach(traverser -> { Object value = traverser.get(); if (value instanceof ReferenceVertex) { Vertex vertex = ((ReferenceVertex) value).attach(Attachable.Method.get(graph)); @@ -169,7 +167,7 @@ private static void attachReferenceElements(TraverserSet toProcessTraver Edge edge = ((ReferenceEdge) value).attach(Attachable.Method.get(graph)); traverser.set(edge); } - } + }); } } diff --git a/janusgraph-core/src/main/java/org/janusgraph/graphdb/olap/computer/VertexMemoryHandler.java b/janusgraph-core/src/main/java/org/janusgraph/graphdb/olap/computer/VertexMemoryHandler.java index ea8f6b906d1..a4817274f0d 100644 --- a/janusgraph-core/src/main/java/org/janusgraph/graphdb/olap/computer/VertexMemoryHandler.java +++ b/janusgraph-core/src/main/java/org/janusgraph/graphdb/olap/computer/VertexMemoryHandler.java @@ -67,7 +67,7 @@ public Iterator> properties(String... keys) { if (keys==null || keys.length==0) { keys = memoryKeys.stream().filter(k -> !k.equals(TraversalVertexProgram.HALTED_TRAVERSERS)).toArray(String[]::new); } - List> result = new ArrayList<>(Math.min(keys.length,memoryKeys.size())); + final List> result = new ArrayList<>(Math.min(keys.length,memoryKeys.size())); for (String key : keys) { if (!supports(key)) continue; V value = vertexMemory.getProperty(vertexId,key); diff --git a/janusgraph-core/src/main/java/org/janusgraph/graphdb/tinkerpop/optimize/JanusGraphLocalQueryOptimizerStrategy.java b/janusgraph-core/src/main/java/org/janusgraph/graphdb/tinkerpop/optimize/JanusGraphLocalQueryOptimizerStrategy.java index bee10e1784d..452a048b6fb 100644 --- a/janusgraph-core/src/main/java/org/janusgraph/graphdb/tinkerpop/optimize/JanusGraphLocalQueryOptimizerStrategy.java +++ b/janusgraph-core/src/main/java/org/janusgraph/graphdb/tinkerpop/optimize/JanusGraphLocalQueryOptimizerStrategy.java @@ -50,8 +50,8 @@ public void apply(final Traversal.Admin traversal) { Graph graph = traversal.getGraph().get(); //If this is a compute graph then we can't apply local traversal optimisation at this stage. - StandardJanusGraph titanGraph = graph instanceof StandardJanusGraphTx ? ((StandardJanusGraphTx) graph).getGraph() : (StandardJanusGraph) graph; - final boolean useMultiQuery = !TraversalHelper.onGraphComputer(traversal) && titanGraph.getConfiguration().useMultiQuery(); + StandardJanusGraph janusGraph = graph instanceof StandardJanusGraphTx ? ((StandardJanusGraphTx) graph).getGraph() : (StandardJanusGraph) graph; + final boolean useMultiQuery = !TraversalHelper.onGraphComputer(traversal) && janusGraph.getConfiguration().useMultiQuery(); /* ====== VERTEX STEP ====== diff --git a/janusgraph-core/src/main/java/org/janusgraph/graphdb/tinkerpop/optimize/JanusGraphStep.java b/janusgraph-core/src/main/java/org/janusgraph/graphdb/tinkerpop/optimize/JanusGraphStep.java index 23400a90ef2..49d99565c54 100644 --- a/janusgraph-core/src/main/java/org/janusgraph/graphdb/tinkerpop/optimize/JanusGraphStep.java +++ b/janusgraph-core/src/main/java/org/janusgraph/graphdb/tinkerpop/optimize/JanusGraphStep.java @@ -100,7 +100,7 @@ public List getHasContainers() { @Override public void addHasContainer(final HasContainer hasContainer) { - this.addAll(Collections.singleton(hasContainer)); + this.addAll(Collections.singleton(hasContainer)); } } diff --git a/janusgraph-hadoop-parent/janusgraph-hadoop-2/pom.xml b/janusgraph-hadoop-parent/janusgraph-hadoop-2/pom.xml index 7bfd35294cc..596692a387f 100644 --- a/janusgraph-hadoop-parent/janusgraph-hadoop-2/pom.xml +++ b/janusgraph-hadoop-parent/janusgraph-hadoop-2/pom.xml @@ -50,7 +50,7 @@ org.apache.hbase hbase-server - ${hbase098.version} + ${hbase098.version} true test diff --git a/janusgraph-hadoop-parent/janusgraph-hadoop/pom.xml b/janusgraph-hadoop-parent/janusgraph-hadoop/pom.xml index 19f09063afb..382115b26ee 100644 --- a/janusgraph-hadoop-parent/janusgraph-hadoop/pom.xml +++ b/janusgraph-hadoop-parent/janusgraph-hadoop/pom.xml @@ -19,7 +19,7 @@ ${project.groupId} janusgraph-hadoop-core - ${project.version} + ${project.version} true