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 24, 2022
1 parent 8fbcc97 commit 4ed1715
Show file tree
Hide file tree
Showing 19 changed files with 108 additions and 151 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-index-solr.yml
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
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
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
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
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();
}
}
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
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
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
4 changes: 0 additions & 4 deletions janusgraph-cql/pom.xml
Expand Up @@ -108,10 +108,6 @@
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
</exclusion>
<exclusion>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
<exclusion>
<groupId>com.thinkaurelius.thrift</groupId>
<artifactId>thrift-server</artifactId>
Expand Down
1 change: 1 addition & 0 deletions janusgraph-cql/src/test/resources/cql-read.properties
Expand Up @@ -15,6 +15,7 @@
gremlin.graph=org.apache.tinkerpop.gremlin.hadoop.structure.HadoopGraph
gremlin.hadoop.graphReader=org.janusgraph.hadoop.formats.cql.CqlInputFormat
gremlin.hadoop.graphWriter=org.apache.hadoop.mapreduce.lib.output.NullOutputFormat

gremlin.hadoop.jarsInDistributedCache=true
gremlin.hadoop.inputLocation=none
gremlin.hadoop.outputLocation=target/output
Expand Down
15 changes: 5 additions & 10 deletions janusgraph-dist/pom.xml
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 @@ -65,10 +66,6 @@
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</exclusion>
<exclusion>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.htrace</groupId>
<artifactId>htrace-core4</artifactId>
Expand Down Expand Up @@ -223,11 +220,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 +349,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
13 changes: 0 additions & 13 deletions janusgraph-hadoop/pom.xml
Expand Up @@ -91,21 +91,8 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
</exclusion>
<exclusion>
<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
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
Expand Up @@ -32,19 +32,24 @@
@Testcontainers
public class HBaseInputFormatIT extends AbstractInputFormatIT {
@Container
public static final HBaseContainer hBaseContainer = new HBaseContainer();
private static final HBaseContainer hbase = new HBaseContainer();

protected Graph getGraph() throws IOException, ConfigurationException {
final PropertiesConfiguration config = ConfigurationUtil.loadPropertiesConfig("target/test-classes/hbase-read.properties", false);
private PropertiesConfiguration getGraphConfiguration(final String filename) throws ConfigurationException, IOException {
final PropertiesConfiguration config = ConfigurationUtil.loadPropertiesConfig(filename, false);
Path baseOutDir = Paths.get((String) config.getProperty("gremlin.hadoop.outputLocation"));
baseOutDir.toFile().mkdirs();
String outDir = Files.createTempDirectory(baseOutDir, null).toAbsolutePath().toString();
config.setProperty("gremlin.hadoop.outputLocation", outDir);
return GraphFactory.open(config);
return config;
}

@Override
public WriteConfiguration getConfiguration() {
return hBaseContainer.getWriteConfiguration();
return hbase.getWriteConfiguration();
}

@Override
protected Graph getGraph() throws ConfigurationException, IOException {
return GraphFactory.open(getGraphConfiguration("target/test-classes/hbase-read.properties"));
}
}
1 change: 1 addition & 0 deletions janusgraph-hbase/src/test/resources/hbase-read.properties
Expand Up @@ -19,6 +19,7 @@ gremlin.hadoop.graphWriter=org.apache.hadoop.mapreduce.lib.output.NullOutputForm
gremlin.hadoop.jarsInDistributedCache=true
gremlin.hadoop.inputLocation=none
gremlin.hadoop.outputLocation=target/output

janusgraphmr.ioformat.conf.storage.backend=hbase
janusgraphmr.ioformat.conf.storage.hostname=localhost
####################################
Expand Down
2 changes: 1 addition & 1 deletion janusgraph-hbase/src/test/resources/log4j2-test.xml
Expand Up @@ -8,7 +8,7 @@
</File>
</Appenders>
<Loggers>
<Root level="debug">
<Root level="info">
<AppenderRef ref="TestFile"/>
</Root>
</Loggers>
Expand Down
15 changes: 0 additions & 15 deletions janusgraph-solr/pom.xml
Expand Up @@ -146,14 +146,6 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
<exclusion>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
<exclusion>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
</exclusion>
<!-- Use apiguardian-api from junit-platform-engine -->
<exclusion>
<groupId>org.apiguardian</groupId>
Expand All @@ -175,13 +167,6 @@
<artifactId>kerb-simplekdc</artifactId>
<version>2.0.1</version>
<scope>test</scope>
<exclusions>
<!-- Use asm from solr-test-framework -->
<exclusion>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
Expand Down
4 changes: 2 additions & 2 deletions mkdocs.yml
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

1 comment on commit 4ed1715

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: 4ed1715 Previous: a83351d Ratio
org.janusgraph.MgmtOlapJobBenchmark.runRemoveIndex 114.78567540909091 ms/op 114.94679506363636 ms/op 1.00
org.janusgraph.JanusGraphSpeedBenchmark.basicAddAndDelete 18632.59473006484 ms/op 13590.87573788 ms/op 1.37
org.janusgraph.GraphCentricQueryBenchmark.getVertices 2140.8608455052463 ms/op 1709.5811915947977 ms/op 1.25
org.janusgraph.MgmtOlapJobBenchmark.runReindex 419.3062161482518 ms/op 364.64019498761905 ms/op 1.15
org.janusgraph.JanusGraphSpeedBenchmark.basicCount 435.04387060592063 ms/op 297.45087948356877 ms/op 1.46
org.janusgraph.CQLMultiQueryBenchmark.getNeighborNames 49314.56148063334 ms/op 41293.368817489994 ms/op 1.19
org.janusgraph.CQLMultiQueryBenchmark.getNames 49517.03297223333 ms/op 40830.05037818333 ms/op 1.21

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.