Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ compile "org.janusgraph:janusgraph-core:1.2.0"

**Installed versions in the Pre-Packaged Distribution:**

* Cassandra 4.0.6
* Cassandra 5.0.9
* Elasticsearch 7.14.0

#### Changes
Expand Down Expand Up @@ -112,9 +112,9 @@ which itself requires Java 11.
JanusGraph is now built and tested with Java 11, 17, 21 and 25. The exceptions are the OLAP modules
(`janusgraph-hadoop` and the Hadoop/Spark based graph computer of the storage backends): Apache Spark
3.3.x, which TinkerPop's `spark-gremlin` is based on, only runs on Java 8 through 17, so OLAP jobs are
only supported on Java 11 and 17. The pre-packaged distribution bundles Cassandra 4.0.6, which itself
only runs on Java 8 and 11, so the embedded Cassandra of the `janusgraph-full` distribution requires
Java 11 while an external Cassandra cluster can be used from JanusGraph running on any supported Java
only supported on Java 11 and 17. The pre-packaged distribution bundles Cassandra 5.0.9, which itself
only runs on Java 11 and 17, so the embedded Cassandra of the `janusgraph-full` distribution requires
Java 11 or 17 while an external Cassandra cluster can be used from JanusGraph running on any supported Java
version.

Java 17 and newer enforce strong encapsulation of the JDK internals. JanusGraph itself does not need
Expand Down Expand Up @@ -186,8 +186,13 @@ Please review the TinkerPop upgrade documentation for
##### Apache Cassandra 5.0 support

Starting from version 1.2.0 JanusGraph supports Apache Cassandra 5.0 as a storage backend.
The pre-packaged distribution continues to bundle Cassandra 4.0.6; connect JanusGraph to an
externally managed Cassandra 5.0 cluster to use the new backend.
The pre-packaged `janusgraph-full` distribution now bundles Cassandra 5.0.9 instead of Cassandra 4.0.6.
The embedded Cassandra runs on Java 11 and 17 (Cassandra 4.0 only ran on Java 8 and 11). Its
`cassandra/conf/cassandra.yaml` is regenerated from the stock Cassandra 5.0 configuration with the
JanusGraph settings (cluster name, `db/cassandra` data directories) applied; `num_tokens` stays at 256 so
data directories created by earlier `janusgraph-full` distributions keep working. Review the Cassandra
[5.0 upgrade notes](https://github.com/apache/cassandra/blob/cassandra-5.0/NEWS.txt) before reusing an
existing `db/cassandra` directory with the new distribution.

##### ElasticSearch 9 support

Expand Down
42 changes: 25 additions & 17 deletions janusgraph-dist/src/assembly/static/cassandra/bin/cassandra
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
# 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.
#
# This file is derived from the stock bin/cassandra launcher of Apache Cassandra 5.0.9. The only
# JanusGraph change is the default CASSANDRA_LOG_DIR, which points to the logs directory of the
# JanusGraph distribution (see the block above the cassandra-env.sh include).


# OPTIONS:
Expand Down Expand Up @@ -109,23 +113,21 @@ if [ -z "$CASSANDRA_CONF" -o -z "$CLASSPATH" ]; then
exit 1
fi

# JanusGraph change: log into the logs directory of the JanusGraph distribution (next to janusgraph.log)
# instead of cassandra/logs. This has to be set before cassandra-env.sh is sourced because that script
# applies its own default of $CASSANDRA_HOME/logs.
if [ -z "$CASSANDRA_LOG_DIR" ]; then
CASSANDRA_LOG_DIR=$CASSANDRA_HOME/../logs
fi

if [ -f "$CASSANDRA_CONF/cassandra-env.sh" ]; then
. "$CASSANDRA_CONF/cassandra-env.sh"
fi

if [ -z "$CASSANDRA_LOG_DIR" ]; then
# JanusGraph change: All logs in single directory are collected in single directory
CASSANDRA_LOG_DIR=$CASSANDRA_HOME/../logs
CASSANDRA_LOG_DIR=$CASSANDRA_HOME/logs
fi

# Special-case path variables.
case "`uname`" in
CYGWIN*|MINGW*)
CLASSPATH=`cygpath -p -w "$CLASSPATH"`
CASSANDRA_CONF=`cygpath -p -w "$CASSANDRA_CONF"`
;;
esac

# Cassandra uses an installed jemalloc via LD_PRELOAD / DYLD_INSERT_LIBRARIES by default to improve off-heap
# memory allocation performance. The following code searches for an installed libjemalloc.dylib/.so/.1.so using
# Linux and OS-X specific approaches.
Expand All @@ -139,21 +141,27 @@ find_library()
pattern=$1
path=$(echo ${2} | tr ":" " ")

find $path -regex "$pattern" -print 2>/dev/null | head -n 1
find $path -regex "$pattern" -print 2>/dev/null | sort -ru | head -n 1
}
case "`uname -s`" in
Linux)
if [ -z $CASSANDRA_LIBJEMALLOC ] ; then
dirs="/lib64 /lib /usr/lib64 /usr/lib "
which ldconfig > /dev/null 2>&1
if [ $? = 0 ] ; then
# e.g. for CentOS
dirs="/lib64 /lib /usr/lib64 /usr/lib `ldconfig -v 2>/dev/null | grep -v '^\s' | sed 's/^\([^:]*\):.*$/\1/'`"
else
# e.g. for Debian, OpenSUSE
dirs="/lib64 /lib /usr/lib64 /usr/lib `cat /etc/ld.so.conf /etc/ld.so.conf.d/*.conf | grep '^/'`"
dirs="$dirs `ldconfig -v 2>/dev/null | grep -v '^\s' | sed 's/^\([^:]*\):.*$/\1/'`"
fi
if [ -f /etc/ld.so.conf ]; then
dirs="$dirs `cat /etc/ld.so.conf | grep '^/'`"
fi
additional_configs=$(ls /etc/ld.so.conf.d/*.conf 2>&1)
if [ $? = 0 ]; then
for conf in $additional_configs; do
dirs="$dirs `cat $conf | grep '^/'`"
done
fi
dirs=`echo $dirs | tr " " ":"`
CASSANDRA_LIBJEMALLOC=$(find_library '.*/libjemalloc\.so\(\.1\)*' $dirs)
CASSANDRA_LIBJEMALLOC=$(find_library '.*/libjemalloc\.so.*' $dirs)
fi
if [ ! -z $CASSANDRA_LIBJEMALLOC ] ; then
export JVM_OPTS="$JVM_OPTS -Dcassandra.libjemalloc=$CASSANDRA_LIBJEMALLOC"
Expand Down
Loading
Loading