Appendix D. Upgrade Instructions

Please follow these instructions when upgrading from Titan or an older JanusGraph release.

D.1. Upgrading to JanusGraph 0.4.0

D.1.1. HBase: Upgrade from 1.2 to 2.1

The version of HBase that is included in the distribution of JanusGraph was upgraded from 1.2.6 to 2.1.5. HBase 2.x client is not fully backward compatible with HBase 1.x server. Users who operate their own HBase version 1.x cluster may need to upgrade their cluster to version 2.x. Optionally users may build their own distribution of JanusGraph which includes HBase 1.x from source with the maven flags -Dhbase.profile -Phbase1.

D.1.2. Cassandra: Upgrade from 2.1 to 2.2

The version of Cassandra that is included in the distribution of JanusGraph was upgraded from 2.1.20 to 2.2.13. Refer to the upgrade documentation of Cassandra for detailed instructions to perform this upgrade. Users who operate their own Cassandra cluster instead of using Cassandra distributed together with JanusGraph are not affected by this upgrade. This also does not change the different versions of Cassandra that are supported by JanusGraph (see Appendix B, Version Compatibility for a detailed list of the supported versions).

D.1.3. BerkeleyDB : Upgrade from 7.4 to 7.5

The BerkeleyDB version has been updated, and it contains changes to the file format stored on disk (see the BerkeleyDB changelog for reference). This file format change is forward compatible with previous versions of BerkeleyDB, so existing graph data stored with JanusGraph can be read in. However, once the data has been read in with the newer version of BerkeleyDB, those files can no longer be read by the older version. Users are encouraged to backup the BerkeleyDB storage directory before attempting to use it with the JanusGraph release.

D.1.4. Solr: Compatible Lucene version changed from 5.0.0 to 7.0.0 in distributed config

The JanusGraph distribution contains a solrconfig.xml file that can be used to configure Solr. The value luceneMatchVersion in this config that tells Solr to behave according to that Lucene version was changed from 5.0.0 to 7.0.0 as that is the default version currently used by JanusGraph. Users should generally set this value to the version of their Solr installation. If the config distributed by JanusGraph is used for an existing Solr installation that used a lower version before (like 5.0.0 from a previous versions of this file), it is highly recommended that a re-indexing is performed.

D.2. Upgrading to JanusGraph 0.3.0


You should back-up your data prior to attempting an upgrade! Also please note that once an upgrade has been completed you will no longer be able to connect to your graph with client versions prior to 0.3.0.

JanusGraph 0.3.0 implements schema constraints which made it necessary to also introduce the concept of a schema version. There is a check to prevent client connections that either expect a different schema version or have no concept of a schema version. To perform an upgrade, the configuration option graph.allow-upgrade=true must be set on each graph you wish to upgrade. The graph must be opened with a 0.3.0 or greater version of JanusGraph since older versions have no concept of and will not allow for it to be set.

Example excerpt from file

# JanusGraph configuration sample: Cassandra over a socket
# This file connects to a Cassandra daemon running on localhost via
# Thrift.  Cassandra must already be started before starting JanusGraph
# with this file.

# This option should be removed as soon as the upgrade is complete. Otherwise if this file
# is used in the future to connect to a different graph it could cause an unintended upgrade.


# The primary persistence provider used by JanusGraph.  This is required.
# It should be set one of JanusGraph's built-in shorthand names for its
# standard storage backends (shorthands: berkeleyje, cassandrathrift,
# cassandra, astyanax, embeddedcassandra, cql, hbase, inmemory) or to the
# full package and classname of a custom/third-party StoreManager
# implementation.
# Default:    (no default value)
# Data Type:  String
# Mutability: LOCAL

# The hostname or comma-separated list of hostnames of storage backend
# servers.  This is only applicable to some storage backends, such as
# cassandra and hbase.
# Default:
# Data Type:  class java.lang.String[]
# Mutability: LOCAL

If graph.allow-upgrade is set to true on a graph and graph.janusgraph-version will automatically be upgraded to match the version level of the server, or local client, that is opening the graph. You can verify the upgrade was successful by opening the management API and validating the values of and graph.janusgraph-version.

Once the storage version has been set you should remove graph.allow-upgrade=true from your properties file and reopen your graph to ensure that the upgrade was successful.

D.3. Upgrading from Titan 1.0.0, 1.1.0-SNAPSHOT

JanusGraph is based on the latest commit to the titan11 branch of Titan repo.

JanusGraph has made the following changes to Titan, so you will need to adjust your code and configuration accordingly:

  1. module names: titan-* are now janusgraph-*
  2. package names: com.thinkaurelius.titan are now org.janusgraph
  3. class names: Titan* are now JanusGraph* except in cases where this would duplicate a word, e.g., TitanGraph is simply JanusGraph rather than JanusGraphGraph

For more information on how to configure JanusGraph to read data which had previously been written by Titan refer to Chapter 42, Migrating from Titan.

D.4. Upgrading from JanusGraph 0.1.z

D.4.1. Elasticsearch

JanusGraph 0.1.z is compatible with Elasticsearch 1.5.z. There were several configuration options available, including transport client, node client, and legacy configuration track. JanusGraph 0.2.0 is compatible with Elasticsearch versions from 1.y through 6.y, however it offers only a single configuration option using the REST client.

D.4.1.1. Transport client

The TRANSPORT_CLIENT interface has been replaced with REST_CLIENT. When migrating an existing graph to JanusGraph 0.2.0, the interface property must be set when connecting to the graph:

After connecting to the graph, the property update can be made permanent by making the change with JanusGraphManagement:

mgmt = graph.openManagement()
mgmt.set("", "REST_CLIENT")

D.4.1.2. Node client

A node client with JanusGraph can be configured in a few ways. If the node client was configured as a client-only or non-data node, follow the steps from the transport client section to connect to the existing cluster using the REST_CLIENT instead. If the node client was a data node (local-mode), then convert it into a standalone Elasticsearch node, running in a separate JVM from your application process. This can be done by using the node’s configuration from the JanusGraph configuration to start a standalone Elasticsearch 1.5.z node. For example, we start with these JanusGraph 0.1.z properties:

where the configuration file es-client.yml has properties: true /var/lib/elasticsearch/data /var/lib/elasticsearch/work
path.logs: /var/log/elasticsearch

The properties found in the configuration file es-client.yml and the* properties can be inserted into $ES_HOME/config/elasticsearch.yml so that a standalone Elasticsearch 1.5.z node can be started with the same properties. Keep in mind that if any path locations have relative paths, those values may need to be updated appropriately. Once the standalone Elasticsearch node is started, follow the directions in the transport client section to complete the migration to the REST_CLIENT interface. Note that the and* properties are not used by the REST_CLIENT interface, so they can be removed from the configuration properties.

D.4.1.3. Legacy configuration

The legacy configuration track was not recommended in JanusGraph 0.1.z and is no longer supported in JanusGraph 0.2.0. Users should refer to the previous sections and migrate to the REST_CLIENT.

D.5. Upgrading from JanusGraph 0.2.0

D.5.1. HBase TTL

In JanusGraph 0.2.0, time-to-live (TTL) support was added for HBase storage backend. In order to utilize the TTL capability on HBase, the graph timestamps need to be MILLI. If the graph.timestamps property is not explicitly set to MILLI, the default is MICRO in JanusGraph 0.2.0, which does not work for HBase TTL. Since the graph.timestamps property is FIXED, a new graph needs to be created to make any change of the graph.timestamps property effective.