Skip to content

Commit

Permalink
Add possibility to build JanusGraph Scylla Release
Browse files Browse the repository at this point in the history
Related to #3580

Signed-off-by: Oleksandr Porunov <alexandr.porunov@gmail.com>
  • Loading branch information
porunov committed Oct 14, 2023
1 parent 4e254b8 commit 28f237b
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 2 deletions.
16 changes: 14 additions & 2 deletions docs/storage-backend/scylladb.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,20 @@ compile "org.janusgraph:janusgraph-scylla:1.0.0"
The manual process described below is temporary and should be replaced by automated process after the issue
[janusgraph/janusgraph#3580](https://github.com/JanusGraph/janusgraph/issues/3580) is resolved.

In case `scylla` storage option is needed to be used in JanusGraph distribution then it's necessary to replace the next libraries
in `lib` directory (all libraries can be downloaded via Maven Central Repository).
In case `scylla` storage option is needed to be used in JanusGraph distribution then it's necessary to replace the next
DataStax provided CQL driver with Scylla provided CQL driver.
The default JanusGraph distribution builds contain only DataStax drivers, but not Scylla drivers because they are conflicting.
However, it's possible to build the same distribution build but with Scylla drivers enabled instead.
To do this, you can use the following command inside the JanusGraph repository:
```groovy tab='Bash'
mvn clean install -Pjanusgraph-release -Puse-scylla -DskipTests=true --batch-mode --also-make -Dgpg.skip=true
```

This command will generate distribution builds (both normal and full distribution build) in the
following directory: `janusgraph-dist/target/`.

Otherwise, if you can't build distribution on your own, you can use the JanusGraph provided distribution and replace
the following libraries in `lib` directory (all libraries can be downloaded via Maven Central Repository).
- `org.janusgraph:janusgraph-cql` with `org.janusgraph:janusgraph-scylla`
- `org.janusgraph:cassandra-hadoop-util` with `org.janusgraph:scylla-hadoop-util`
- `com.datastax.oss:java-driver-core` with `com.scylladb:java-driver-core`
Expand Down
35 changes: 35 additions & 0 deletions janusgraph-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,42 @@
<skipDefaultDistroIT>${it.skip}</skipDefaultDistroIT>

<doc.dir>${project.parent.basedir}/docs</doc.dir>

<cql-module>janusgraph-cql</cql-module>
<cql-hadoop-module>cassandra-hadoop-util</cql-hadoop-module>
</properties>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>janusgraph-all</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<artifactId>janusgraph-cql</artifactId>
<groupId>${project.groupId}</groupId>
</exclusion>
<exclusion>
<artifactId>cassandra-hadoop-util</artifactId>
<groupId>${project.groupId}</groupId>
</exclusion>
</exclusions>
</dependency>

<!-- Either "janusgraph-cql" or "janusgraph-scylla" -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${cql-module}</artifactId>
<version>${project.version}</version>
</dependency>

<!-- Either "cassandra-hadoop-util" or "scylla-hadoop-util" -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${cql-hadoop-module}</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
Expand Down Expand Up @@ -326,6 +354,13 @@
<docker.tag-suffix>-java-11</docker.tag-suffix>
</properties>
</profile>
<profile>
<id>use-scylla</id>
<properties>
<cql-module>janusgraph-scylla</cql-module>
<cql-hadoop-module>scylla-hadoop-util</cql-hadoop-module>
</properties>
</profile>
<profile>
<id>janusgraph-release</id>
<dependencies>
Expand Down

0 comments on commit 28f237b

Please sign in to comment.