Skip to content

Commit

Permalink
Update TinkerPop 3.6.1
Browse files Browse the repository at this point in the history
Fixes JanusGraph#3069

* Upgrade hadoop 3.x
* Remove Jackson 1

Signed-off-by: Jan Jansen <jan.jansen@gdata.de>
  • Loading branch information
farodin91 committed Sep 23, 2022
1 parent 8a8f6d1 commit d7ff1f3
Show file tree
Hide file tree
Showing 13 changed files with 84 additions and 113 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-index-solr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
args: "-Psolr8"
name: solr8
java: 8
- module: es
- module: solr
install-args: "-Pjava-11"
args: "-Psolr8"
name: solr8
Expand Down
6 changes: 3 additions & 3 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ All currently supported verions of JanusGraph are listed below.
| JanusGraph | Storage Version | Cassandra | HBase | Bigtable | Elasticsearch | Solr | TinkerPop | Spark | Scala |
| ----- | ---- | ---- | ---- | ---- | ---- | ---- | --- | ---- | ---- |
| 0.6.z | 2 | 3.0.z, 3.11.z | 1.6.z, 2.2.z | 1.3.0, 1.4.0, 1.5.z, 1.6.z, 1.7.z, 1.8.z, 1.9.z, 1.10.z, 1.11.z, 1.14.z | 6.y, 7.y | 7.y, 8.y | 3.5.z | 3.0.z | 2.12.z |
| 1.0.z | 2 | 3.0.z, 3.11.z | 1.6.z, 2.2.z | 1.3.0, 1.4.0, 1.5.z, 1.6.z, 1.7.z, 1.8.z, 1.9.z, 1.10.z, 1.11.z, 1.14.z | 6.y, 7.y | 8.y | 3.5.z | 3.0.z | 2.12.z |
| 1.0.z | 2 | 3.0.z, 3.11.z | 2.2.z | 1.3.0, 1.4.0, 1.5.z, 1.6.z, 1.7.z, 1.8.z, 1.9.z, 1.10.z, 1.11.z, 1.14.z | 6.y, 7.y | 8.y | 3.6.z | 3.0.z | 2.12.z |

#### End-of-Life
The versions of JanusGraph listed below are outdated and will no longer receive bugfixes.
Expand Down Expand Up @@ -59,13 +59,13 @@ compile "org.janusgraph:janusgraph-core:1.0.0"
**Tested Compatibility:**

* Apache Cassandra 3.0.14, 3.11.10
* Apache HBase 1.6.0, 2.2.7
* Apache HBase 2.2.7
* Google Bigtable 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.9.0, 1.10.0, 1.11.0, 1.14.0
* Oracle BerkeleyJE 7.5.11
* Elasticsearch 6.0.1, 6.6.0, 7.17.5
* Apache Lucene 8.11.1
* Apache Solr 8.11.1
* Apache TinkerPop 3.5.3
* Apache TinkerPop 3.6.1
* Java 8, 11

#### Changes
Expand Down
27 changes: 0 additions & 27 deletions janusgraph-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,33 +104,6 @@
<version>${project.version}</version>
</dependency>

<!-- Override Jackson versions in our transitive dependencies.
Without these dependencies, janusgraph-all users can end up with
1.9 + 1.8 jars together, and this leads to linkage errors.
It might be a better idea to dependencyManagement imports if your Maven version supports it:
https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Dependencies -->
<!-- Jackson 1.x -->
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>${jackson1.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>${jackson1.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-xc</artifactId>
<version>${jackson1.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-jaxrs</artifactId>
<version>${jackson1.version}</version>
</dependency>

<!-- Jackson 2.x -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@
method = "shouldResetAfterRollback",
reason = "JanusGraph assumes lifecycle of transactionListeners in AbstractThreadLocalTransaction ends when the " +
"transaction ends (commit/rollback/close). TinkerPop, however, asserts transactionListeners are active across transactions.")
@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.map.MergeVertexTest",
method = "g_mergeVXlabel_person_name_markoX_optionXonMatch_age_19X_option",
reason = "JanusGraph doesn't support MergeVertex yet.")
@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.map.MergeVertexTest",
method = "g_withSideEffectXc_label_person_name_markoX_withSideEffectXm_age_19X_mergeVXselectXcXX_optionXonMatch_selectXmXX_option",
reason = "JanusGraph doesn't support MergeVertex yet.")
public interface JanusGraph extends Transaction {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

package org.janusgraph.graphdb.tinkerpop;

import org.apache.tinkerpop.gremlin.structure.Element;
import org.apache.tinkerpop.gremlin.structure.Graph;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.janusgraph.core.JanusGraphEdge;
import org.janusgraph.core.JanusGraphVertex;
Expand Down Expand Up @@ -61,13 +59,4 @@ public static RelationIdentifier getEdgeId(Object id) {
}
return null;
}

public static void verifyArgsMustBeEitherIdOrElement(Object... ids) {
assert ids.length>0;
int numElements = 0;
for (Object id : ids) {
if (id instanceof Element) numElements++;
}
if (numElements>0 && numElements<ids.length) throw Graph.Exceptions.idArgsMustBeEitherIdOrElement();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ public JanusGraphVertex addVertex(Object... keyValues) {
@Override
public Iterator<Vertex> vertices(Object... vertexIds) {
if (vertexIds==null || vertexIds.length==0) return (Iterator)getVertices().iterator();
ElementUtils.verifyArgsMustBeEitherIdOrElement(vertexIds);
long[] ids = new long[vertexIds.length];
int pos = 0;
for (Object vertexId : vertexIds) {
Expand All @@ -147,7 +146,6 @@ public Iterator<Vertex> vertices(Object... vertexIds) {
@Override
public Iterator<Edge> edges(Object... edgeIds) {
if (edgeIds==null || edgeIds.length==0) return (Iterator)getEdges().iterator();
ElementUtils.verifyArgsMustBeEitherIdOrElement(edgeIds);
RelationIdentifier[] ids = new RelationIdentifier[edgeIds.length];
int pos = 0;
for (Object edgeId : edgeIds) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
import org.apache.tinkerpop.gremlin.structure.Element;
import org.apache.tinkerpop.gremlin.structure.Graph;
import org.janusgraph.graphdb.tinkerpop.ElementUtils;
import org.janusgraph.graphdb.tinkerpop.optimize.JanusGraphTraversalUtil;
import org.janusgraph.graphdb.tinkerpop.optimize.step.HasStepFolder;
import org.janusgraph.graphdb.tinkerpop.optimize.step.JanusGraphStep;
Expand Down Expand Up @@ -63,17 +62,19 @@ public void apply(final Traversal.Admin<?, ?> traversal) {
} else {
//Make sure that any provided "start" elements are instantiated in the current transaction
final 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++) {
final Object[] elementIds = new Object[ids.length];
for (int i = 0; i < ids.length; i++) {
if (ids[i] instanceof Element) {
elementIds[i] = ((Element) ids[i]).id();
}
originalGraphStep.setIteratorSupplier(() -> originalGraphStep.returnsVertex() ?
((Graph) originalGraphStep.getTraversal().getGraph().get()).vertices(elementIds) :
((Graph) originalGraphStep.getTraversal().getGraph().get()).edges(elementIds));
else
{
elementIds[i] = ids[i];
}
}
originalGraphStep.setIteratorSupplier(() -> originalGraphStep.returnsVertex() ?
((Graph) originalGraphStep.getTraversal().getGraph().get()).vertices(elementIds) :
((Graph) originalGraphStep.getTraversal().getGraph().get()).edges(elementIds));
}

});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

public class CloseableIteratorUtils {

public static final CloseableIterator<Object> EMPTY_CLOSABLE_ITERATOR = CloseableIterator.asCloseable(Collections.emptyIterator());
public static final CloseableIterator<Object> EMPTY_CLOSABLE_ITERATOR = CloseableIterator.of(Collections.emptyIterator());

public static <T> CloseableIterator<T> emptyIterator() {
return (CloseableIterator<T>) EMPTY_CLOSABLE_ITERATOR;
Expand Down
11 changes: 5 additions & 6 deletions janusgraph-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

<properties>
<top.level.basedir>${project.basedir}/..</top.level.basedir>
<cassandra-dist.version>4.0.3</cassandra-dist.version>

<!-- Zipfile/Tarfile assembly source paths -->
<assembly.txtfile.dir>${top.level.basedir}</assembly.txtfile.dir>
Expand All @@ -22,7 +23,7 @@
<assembly.static.dir>${project.basedir}/src/assembly/static</assembly.static.dir>
<assembly.resources.dir>${project.basedir}/src/assembly/resources</assembly.resources.dir>
<assembly.es.dir>${project.build.directory}/elasticsearch-${elasticsearch.version}</assembly.es.dir>
<assembly.cassandra.dir>${project.build.directory}/apache-cassandra-${cassandra.version}</assembly.cassandra.dir>
<assembly.cassandra.dir>${project.build.directory}/apache-cassandra-${cassandra-dist.version}</assembly.cassandra.dir>

<packname.standard>janusgraph-${project.version}</packname.standard>
<packname.full>janusgraph-full-${project.version}</packname.full>
Expand Down Expand Up @@ -223,11 +224,11 @@
<goal>wget</goal>
</goals>
<configuration>
<url>https://archive.apache.org/dist/cassandra/${cassandra.version}/apache-cassandra-${cassandra.version}-bin.tar.gz</url>
<outputFileName>apache-cassandra-${cassandra.version}-bin.tar.gz</outputFileName>
<url>https://archive.apache.org/dist/cassandra/${cassandra-dist.version}/apache-cassandra-${cassandra-dist.version}-bin.tar.gz</url>
<outputFileName>apache-cassandra-${cassandra-dist.version}-bin.tar.gz</outputFileName>
<outputDirectory>${project.build.directory}/</outputDirectory>
<unpack>true</unpack>
<sha256>${cassandra.version.sha256}</sha256>
<sha256>${cassandra-dist.version.sha256}</sha256>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -352,8 +353,6 @@
<properties>
<packname.standard>janusgraph-java-11-${project.version}</packname.standard>
<packname.full>janusgraph-java-11-full-${project.version}</packname.full>
<test.excluded.groups>FULL_TESTS</test.excluded.groups>
<build.full>none</build.full>
</properties>
</profile>
<profile>
Expand Down
9 changes: 0 additions & 9 deletions janusgraph-hadoop/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,8 @@
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.htrace</groupId>
<artifactId>htrace-core4</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.htrace</groupId>
<artifactId>htrace-core4</artifactId>
<version>${htrace.version}</version>
</dependency>

<!-- JANUSGRAPH -->
<dependency>
Expand Down
9 changes: 0 additions & 9 deletions janusgraph-hbase/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,13 @@
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.htrace</groupId>
<artifactId>htrace-core4</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<version>1.0-SP4</version>
</dependency>
<dependency>
<groupId>org.apache.htrace</groupId>
<artifactId>htrace-core4</artifactId>
<version>4.2.0-incubating</version>
</dependency>
<dependency>
<groupId>org.janusgraph</groupId>
<artifactId>janusgraph-backend-testutils</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,6 @@ nav:
extra:
latest_version: 1.0.0
snapshot_version: 1.0.0-SNAPSHOT
tinkerpop_version: 3.5.3
hadoop2_version: 2.8.5
tinkerpop_version: 3.6.1
hadoop2_version: 3.3.4
jamm_version: 0.3.0
Loading

0 comments on commit d7ff1f3

Please sign in to comment.