Upgrading DataStax Enterprise

Upgrading DataStax Enterprise
DataStax Upgrade Guide
Documentation
February 11, 2015
©
2015 DataStax. All rights reserved.
Contents
Contents
About the upgrade guide................................................................................................3
Upgrading DataStax Enterprise......................................................................................4
General upgrade procedure................................................................................................................ 4
Upgrade procedure details....................................................................................................... 4
Upgrade instructions for installing the DSE tarball on any Linux distribution......................................6
Upgrade installation instructions for Debian-based distributions........................................................ 6
Upgrade installation instructions for RHEL-based distributions.......................................................... 7
Upgrading Linux installations using the GUI installer......................................................................... 7
Version specific upgrade instructions..................................................................................................8
Upgrading to DataStax Enterprise 3.2..................................................................................... 8
Upgrading to DataStax Enterprise 4.0, 4.5, or 4.6.................................................................17
Upgrading the DataStax AMI............................................................................................................ 19
Rolling back an upgrade................................................................................................................... 20
Revert to a previous version from a package install..............................................................20
Revert to a previous version from a tarball installation.......................................................... 21
Upgrading from Datastax Community to DataStax Enterprise................................. 22
Upgrading Cassandra....................................................................................................24
Version restrictions............................................................................................................................ 24
Best practices.................................................................................................................................... 24
Upgrading procedure details............................................................................................................. 24
Debian or Ubuntu................................................................................................................... 26
RHEL or CentOS....................................................................................................................26
Tarball..................................................................................................................................... 26
Changes impacting upgrade............................................................................................................. 27
Upgrading OpsCenter....................................................................................................29
Upgrading package installations....................................................................................................... 29
Upgrading tarball installations........................................................................................................... 30
Upgrading agents.............................................................................................................................. 30
Using the docs...............................................................................................................32
2
About the upgrade guide
About the upgrade guide
This document includes detailed instructions on upgrading DataStax Enterprise, Cassandra, and
OpsCenter.
Upgrade instructions
•
•
•
Upgrading DataStax Enterprise
Upgrading Cassandra
Upgrading OpsCenter
3
Upgrading DataStax Enterprise
Upgrading DataStax Enterprise
This section describes how to upgrade to the latest version of DSE.
General upgrade procedure
The upgrade process for DataStax Enterprise is aimed at providing minimal downtime (ideally zero). With a
few exceptions, the cluster will continue to work as though it were on the older version until all of the nodes
in the cluster have been upgraded.
The order in which you upgrade the nodes does matter. Use the following guidelines when planning an
upgrade:
•
•
•
•
In multiple data center clusters upgrade all the nodes within one data center before moving on to
another data center.
Upgrade any Analytics nodes or data centers first, then Cassandra nodes or data centers, and finally
Search nodes or data centers.
If you have any Analytics nodes, upgrade the jobtracker in the data center node first. Hadoop nodes
should be upgraded first, then any Spark nodes.
Upgrade the seed nodes within a data center first.
To perform an upgrade with zero downtime, we recommend performing the upgrade as a rolling restart.
The procedure for the rolling upgrade is:
1.
2.
3.
4.
5.
6.
7.
Make a backup of the data by taking a snapshot of the node to be upgraded.
Stop the node.
Install the new product.
Configure the new product.
Start the node.
Check the logs for warnings, errors and exceptions.
Repeat these steps for each node in the cluster.
While the cluster is in a partially upgraded state, please observe the general limitations.
Upgrade procedure details
About this task
This section describes the procedure for upgrading nodes in a cluster.
Before you begin
Before stopping the node, run nodetool drain to flush the commit log of the old installation:
$ nodetool drain –h hostname
If you are upgrading a DSE Search/Solr node, this step is mandatory to prevent having to re-index data.
This step is recommended for upgrading other nodes because it saves time when the node starts up.
Familiarize yourself with the changes and features in the new Cassandra version by reading the notes
in CHANGES.txt and NEWS.txt. A complete list of changes is available in CHANGES.txt, and general
upgrade advice for different features is available in NEWS.txt.
Procedure
1. Stop the node.
4
Upgrading DataStax Enterprise
2. Back up your configuration files.
Depending on how you install the product, these files may be overwritten with default values during the
installation.
3. Install the new product.
• Binary tarball installs
• Debian-based installs
• RHEL-based installs
• GUI installer.
• Text installer.
• Unattended installer.
4. Configure the new product.
Using the backups you made of your configuration files, merge any modifications you have previously
made into the new configuration files for the new version. Configuration options change often, so
be sure to double check the Version specific upgrade instructions for additional steps and changes
regarding configuration.
5. Start the node.
Follow the steps appropriate for your installation type:
• For packaged installs (Debian and RHEL), start DataStax Enterprise as a service.
• For binary tarball installs, start DataStax Enterprise as a stand-alone process.
6. If you are upgrading over a minor release of Cassandra (for example, from DataStax Enterprise 3.2 to
4.0, or Cassandra 1.1 to 1.2) upgrade the sstables on each node.
$ nodetool upgradesstables
7. Check the logs for warnings, errors and exceptions.
Many times warnings, errors and exceptions will be found in the logs on starting up an upgraded
node. Some of these are informational and will help you execute specific upgrade related steps. Be
sure to check the Version specific upgrade instructions to identify which of these is expected, and for
instructions on using these warnings and errors to complete your upgrade. If you find any unexpected
warnings, errors or exceptions, contact Support.
8. Repeat on each node in the cluster.
The order of upgrading nodes matters. Please upgrade nodes in the following order:
1. Analytics: Jobtracker, Spark master, remaining seeds, remaining task trackers.
2. Cassandra: Seeds, then remaining nodes.
3. Solr: Seeds, then remaining nodes.
General limitations while cluster is in a partially upgraded state:
•
•
•
•
Do not run nodetool repair.
Do not use new features.
Do not issue these types of queries during a rolling restart: DDL, TRUNCATE
Analytics (Hadoop and Spark) specific limitations:
•
• Do not run any analytics jobs until all nodes have been upgraded.
Solr specific limitations:
•
•
•
Do not update schemas.
Do not re-index Solr unless you are following an instruction in these upgrade procedures to reindex.
• Do not issue these types of queries during a rolling restart: DDL, TRUNCATE, and Solr queries.
Security limitations:
•
Do not change security credentials or permissions until the upgrade is complete.
5
Upgrading DataStax Enterprise
•
Do not attempt to set up Kerberos authentication. First upgrade the cluster, and then set up
Kerberos
Upgrade instructions for installing the DSE tarball on any Linux
distribution
About this task
This procedure shows how to install a new version of the DataStax Enterprise binary tarball to replace an
existing installation.
Before performing the installation, be sure to back up your configuration files for future reference.
Upgrading a node and migrating the data
Procedure
1. Download the DataStax Enterprise tarball using your username and password:
$ curl -OL http://username:[email protected]/enterprise/
dse.tar.gz
Get the username and password from your DataStax registration confirmation email. If you don’t have
the email, register on the DataStax web site.
2. Create a directory for the new installation and move it to that directory.
3. Unpack the DataStax Enterprise tarball:
$ tar xzvf dse-4.5 tarball name
4. On RHEL 5 or CentOS 5 platforms only, replace all instances of snappy-java-1.0.5.jar with the
1.0.4.1 JAR available here.
$ rm resources/cassandra/lib/snappy-java-1.0.5.jar resources/hadoop/lib/
snappy-java-1.0.5.jar resources/hive/lib/snappy-java-1.0.5.jar resources/
pig/lib/snappy-java-1.0.5.jar
$ curl -OL http://username:[email protected]/enterprise/
snappy-java-1.0.4.1.jar
$ cp snappy-java-1.0.4.1.jar resources/cassandra/lib/
$ cp snappy-java-1.0.4.1.jar resources/hadoop/lib/
$ cp snappy-java-1.0.4.1.jar resources/hive/lib/
$ cp snappy-java-1.0.4.1.jar resources/pig/lib/
5. If you customized the location of the data in the old installation, create a symbolic link to the old data
directory:
$ cd new install location
$ ln -s old data directory new install location/new data directory
Upgrade installation instructions for Debian-based distributions
About this task
This procedure shows how to install a new version of Datastax Enterprise using the Advanced Package
Tool, apt-get.
6
Upgrading DataStax Enterprise
Please be sure to back up your configuration files before starting this process as apt-get overwrites any
modifications you have made to them.
Procedure
1. If you were previously using a version of Datastax Community, add the DataStax repository to the /
etc/apt/sources.list using your username and password.
$ deb http://username:[email protected]/enterprise stable main
Get the username and password from your DataStax registration confirmation email. If you don’t have
the email, register on the DataStax web site.
2. Upgrade the node.
$ sudo apt-get update
$ sudo apt-get install dse-full
3. If the prompt appears informing you of the disk space to be used, type Y to continue.
Upgrade installation instructions for RHEL-based distributions
About this task
This procedure shows how to install a new version of Datastax Enterprise using the Yum Package
Manager.
Please be sure to backup your configuration files before starting this process. However, Yum may also
back them up in place using a .rpmsave extension. For example, cassandra.yaml.rpmsave.
Procedure
1. Open the Yum repository file for DataStax Enterprise in /etc/yum.repos.d for editing.
$ sudo vi /etc/yum.repos.d/datastax.repo
2. Replace the contents of the file with the following lines using your username and password.
[datastax ]
name = DataStax Repo for Apache Cassandra
baseurl = http://username:[email protected]/enterprise
enabled = 1
gpgcheck = 0
Get the username and password from your DataStax registration confirmation email. If you don’t have
the email, register on the DataStax web site.
3. Upgrade the node.
$ sudo yum remove dse-full
$ sudo yum install dse-full
4. If a prompt informs you of the download size and asks for confirmation to continue, type Y to continue.
Upgrading Linux installations using the GUI installer
About this task
This procedure shows how to upgrade to the latest version of Datastax Enterprise using the GUI installer.
7
Upgrading DataStax Enterprise
Before you begin
You must meet the following requirements in order to upgrade to the latest version of DataStax Enterprise:
•
•
You have an installation of DataStax Enterprise 4.0.x or later.
Your current installation was installed using either:
•
•
The yum (RHEL or CentOS) or apt (Debian or Ubuntu) package managers.
The GUI installer as a services install.
Procedure
1. Download the installer for your computer from the DataStax download page.
2. From the directory where you downloaded the install file make it executable and run it using the sudo
command.
$ chmod +x DataStaxEnterprise-4.5.x-linux-x64-installer.run ## Changes
permission to executable
$ sudo ./DataStaxEnterprise-4.5.x-linux-x64-installer.run
3. Follow the instructions in the setup wizard. See the Getting Start Guide for a detailed description of the
settings in the wizard.
4. Start the services.
$ sudo service dse start ## Starts the DataStax Enterprise server
$ sudo service datastax-agent start ## Starts the DataStax Agent
$ sudo service opscenterd start ## Starts the OpsCenter
5. Verify that DataStax Enterprise is running using the nodetool command.
$ nodetool status
Version specific upgrade instructions
To upgrade from any version of DataStax Community, follow the instructions in Upgrading from any
Datastax Community version.
To upgrade from a Brisk release, contact Support.
Upgrading to DataStax Enterprise 3.2
Follow these instructions to upgrade to DSE 3.2.x
Upgrading directly from versions other than these does not work:
•
•
•
DataStax Enterprise 2.2.2 or later
Cassandra 1.1.9 - 1.2.15
DataStax Community 1.1 (Cassandra 1.1.9)
Most version upgrades also have special limitations or require special steps. Find your current version in
the following table and follow the steps in linked page.
8
Old version
Upgrade instructions
2.2.2
Upgrading from version 2.2.x
3.0
Upgrading from version 3.0.x
3.1
Upgrading from version 3.1.x
Upgrading DataStax Enterprise
Upgrading from version 2.2.x
About this task
Follow these instructions to upgrade from DSE 2.2.x.
Security recommendations
If you wish to use security, you must upgrade the entire cluster before setting up security and then do
another rolling restart.
Hadoop
The ownership of the Hadoop mapred staging directory in the CassandraFS has changed. After
upgrading, you need to set the owner of /tmp/hadoop-dseuser/mapred/staging to the DSE user.
For example, if you run DataStax Enterprise 3.1 as root, use the following command on Linux:
$ dse hadoop fs -chown root /tmp/hadoop-root/mapred/staging
Solr
Do not issue Solr queries after upgrading from DataStax Enterprise 2.1.x or earlier until all nodes are
upgraded and schema disagreements are resolved.
Solr configuration files from previous versions of Datastax Enterprise will be invalidated by the new version
of Solr included in this release. Follow these steps to update your Solr configuration file on the first solr
node you upgrade, before upgrading any other nodes:
1. Open the system.log and look for the message about the Solr error.
The error message briefly describes the changes you need to make.
2. Correct these errors in your solrconfig.xml files, then post the corrected files.
Existing cores cannot be loaded until the solrconfig.xml errors are resolved.
3. Issue the following command to recover indexes on each upgraded Solr node. On the first node
upgraded, this process should happen after the Solr configuration file has been uploaded. Note that in
the command below you will need to substitute the name of your Solr core.
$ curl -v "http://localhost:8983/solr/admin/cores?action=CREATE&solr
core.solr&recovery=true"
The following is an example of how to perform these steps using our Solr-based demos. If you wish to
do this on a test cluster, first run the solr, wiki and logging demos on a test cluster running the older
version of DSE.
Go to the directory containing your Solr application. For example, go to the demos directory:
•
Binary installation
•
$ cd install_location/demos
Package installation
$ cd /usr/share/dse-demos
Run the following commands to HTTP-POST your modified custom solrconfig.xml to DSE-Search. For
example, from the demos or dse-demos directory, run the following commands:
•
From the solr_stress directory:
$ curl -v --data-binary @solrconfig.xml -H 'Content-type:text/xml;
charset=utf-8'
http://localhost:8983/solr/resource/demo.solr/solrconfig.xml
9
Upgrading DataStax Enterprise
•
From the wikipedia directory:
•
$ curl -v --data-binary @solrconfig.xml -H 'Content-type:text/xml;
charset=utf-8'
http://localhost:8983/solr/resource/wiki.solr/solrconfig.xml
From the log_search directory:
$ curl -v --data-binary @solrconfig.xml -H 'Content-type:text/xml;
charset=utf-8'
http://localhost:8983/solr/resource/Logging.log_entries/solrconfig.xml
After running each curl command, a SUCCESS message appears.
This step is only required once, when the first node is upgraded.
After each node is upgraded, run the CREATE command with the the recovery option set to true, and the
distributed option set to false:
$ curl -v "http://localhost:8983/solr/admin/cores?
action=CREATE&name=demo.solr&recovery=true"
$ curl -v "http://localhost:8983/solr/admin/cores?
action=CREATE&name=wiki.solr&recovery=true"
$ curl -v "http://localhost:8983/solr/admin/cores?
action=CREATE&name=Logging.log_entries&recovery=true"
Partitioner
Merge your partitioner setting from the old to the new file. Do not attempt to use the Cassandra 1.2 default
partitioner option, Murmur3Partitioner, in the new file unless you were already using it.
CQL 3
Do not issue any CQL 3 queries until all nodes are upgraded and schema disagreements are resolved.
Security Recommendations
The client_encryption_options for enabling client-to-node SSL have been removed from
dse.yaml starting in 3.1.2. To enable client-to-node SSL, set the option in the cassandra.yaml file.
Before upgrading, if you use these DataStax Enterprise security features, adjust the replication strategy
and options in the cassandra.yaml file to configure a replication factor for the dse_auth keyspace
greater than 1:
•
•
•
Kerberos
Object permission management (internal authorization)
Internal authentication
Adjust the replication factor for dse_auth on each node in the cluster. After updating the
cassandra.yaml file and restarting the node, run nodetool repair to repair the first range returned
by the partitioner for the keyspace:
nodetool repair dse_auth -pr
This should only take a few seconds to complete.
The new version of Cassandra updates the security options. First simply merge the following settings into
the new configuration files:
•
•
•
•
10
authenticator
authorizer
auth_replication_strategy
auth_replication_options
Upgrading DataStax Enterprise
•
any other diffs
Use the old settings while you are upgrading the cluster so that backward compatibility is maintained. For
example, the new file contains the old, Cassandra 1.1 authenticator and authorizer options at this point:
•
•
authenticator: com.datastax.bdp.cassandra.auth.PasswordAuthenticator
authorizer: org.apache.cassandra.auth.CassandraAuthorizer
If you are upgrading a secure cluster, there may be a significant delay to each node's first startup as
the security migration takes place (up to 1 minute). The delay is due to ensuring that the ring is fully
connected before the migration starts. During the upgrade of a secure cluster, you may see a security
related error message (documented below). You will see the following message in the log when the node
has completed the migration:
INFO [NonPeriodicTasks:1 ] 2013-06-22 15:01:08,173
Auth.java (line 208 ) Migration of legacy auth data is complete.
You should now switch to org.apache.cassandra.auth implementations in
cassandra.yaml.
After all nodes have been upgraded, change these options to the new Cassandra 1.2 values and perform a
rolling restart as explained below.
Note: If using Kerberos authentication, there are no credentials data to migrate, but user records
must still be updated. Merge the related diffs from the old to the new file.
1. Edit the cassandra.yaml to switch to the official Apache versions of PasswordAuthenticator and
CassandraAuthorizer:
authenticator: org.apache.cassandra.auth.PasswordAuthenticator
authorizer: org.apache.cassandra.auth.CassandraAuthorizer
2. Remove or comment out these options from the cassandra.yaml file:
•
•
•
auth_replication_strategy
auth_replication_options
replication_factor
Note:
If you have not disabled both auth_replication_strategy and replication_factor,
you will see an error. For information about correcting this error, see Issues in the DataStax
Enterprise 3.2.5 release notes.
3. Optionally, adjust the replication factor of the system_auth keyspace. The amount of data in this
keyspace is typically very small, so leaving it replicated across the cluster is relatively cheap.
SSTable upgrades
After restarting each node, consider upgrading sstables. Upgrading SSTables is highly recommended
under these conditions:
•
•
•
If you use counter columns
If you are upgrading from Cassandra 1.0.x or earlier
If you are upgrading from a DataStax Enterprise version having Cassandra 1.0.x or earlier
Upgrade SSTables before doing these operations:
•
•
•
move
repair
bootstrap
Because these operations copy SSTables within the cluster and the on-disk format sometimes changes
between major versions, DataStax recommends upgrading SSTables now to prevent possible future
SSTable incompatibilities:
•
Tarball: install_location/bin/nodetool -h upgradesstables
11
Upgrading DataStax Enterprise
•
Package or AMI: nodetool -h upgradesstables
Virtual nodes
DataStax recommends using virtual nodes only on data centers running purely Cassandra workloads.
You should disable virtual nodes on data centers running either Hadoop or Solr workloads by setting
num_tokens to 1 in the cassandra.yaml.
Solr
If you make changes to the configuration of a Solr node after upgrading, be sure to set the type mapping
correctly as explained in Configuring the Solr type mapping version.
Expected error messages
If you are upgrading from DataStax Enterprise 3.0.x, an exception that looks something like this might
appear in logs during a rolling upgrade. Ignore these error messages:
ERROR 15:36:54,908 Exception in thread Thread[GossipStage:1,5,main ]
java.lang.NumberFormatException: For input string:
"127605887595351923798765477786913079296"
. . .
When upgrading Cassandra 1.2 nodes, you can ignore the following error messages related to when a
node is attempting to push mutations to the new system_auth keyspace:
ERROR [WRITE-/192.168.123.11] 2013-06-22 14:13:42,336
OutboundTcpConnection.java (line 222)
error writing to /192.168.123.11
java.lang.RuntimeException: Can't serialize ColumnFamily ID
2d324e48-3275-3517-8dd5-9a2c5b0856c5
to be used by version 5, because int <-> uuid mapping could not be established
(CF was created in mixed version cluster).
at
org.apache.cassandra.db.ColumnFamilySerializer.cfIdSerializedSize(ColumnFamilySerializer
When upgrading a Solr node, you can ignore the following error:
ERROR 00:57:17,785 Cannot activate core: ks.cf_10000_keys_50_cols
ERROR 00:57:17,786 <indexDefaults> and <mainIndex> configuration sections are
discontinued.
Use <indexConfig> instead.
ERROR 01:29:55,145 checksum mismatch in segments file (resource:
ChecksumIndexInput (MMapIndexInput ( path = "/var/lib/cassandra/data/
solr.data/ks.
cf_10000_keys_50_cols/index/segments_6" )))
ERROR 01:29:55,145 Solr index ks.cf_10000_keys_50_cols seems to be corrupted:
please CREATE the core again with recovery = true to start reindexing data.
ERROR 01:29:55,145 Cannot activate core: ks.cf_10000_keys_50_cols
ERROR 01:29:55,146 checksum mismatch in segments file (resource:
ChecksumIndexInput
(MMapIndexInput ( path = "/var/lib/cassandra/data/solr.data/ks.
cf_10000_keys_50_cols/index/segments_6" )))
org.apache.lucene.index.CorruptIndexException: checksum mismatch in segments
file
(resource: ChecksumIndexInput (MMapIndexInput
( path = "/var/lib/cassandra/data/solr.data/ks.cf_10000_keys_50_cols/index/
segments_6" )))
Recommissioning a node
If you decommissioned a node in the last 72 hours:
•
12
Do not recommission the node until 72 hours has passed.
Upgrading DataStax Enterprise
•
•
If you wish to recommission the node after 72 hours, run nodetool gossipinfo. Check the STATUS
line for the token of the decommissioned node and verify that it does not exist. If it does not exist, then
the node has been deleted and it is safe to recommission the node.
If you need to bring the node into the cluster, contact Support for detailed information on how to kill the
node.
Temporarily enable the old Gossip protocol in a cluster
After installing the new version, but before the first restart of each node, enable the old protocol so
each upgraded node can connect to the nodes awaiting the upgrade. Add the following line to /etc/
cassandra/cassandra-env.sh for packaged installs or install_location/conf/cassandraenv.sh for tarball installs:
VM_OPTS="$JVM_OPTS -Denable-old-dse-state=true
Note: This is unnecessary when upgrading to DataStax Enterprise 3.2.1 or later.
After upgrading the entire cluster, remove the above line on each node so it uses the new protocol, and
perform a second rolling restart.
Manually updating the dse_system keyspace to use the EverywhereStrategy
When upgrading from older versions, the first upgraded node will automatically alter dse_system to
use the EverywhereStrategy and attempt to run nodetool repair dse_system. This operation
might fail if some other nodes are down during the upgrade. Please consult /var/log/cassandra/
system.log for any errors or warnings. If automatic switching fails, once all the nodes are up manually
update the dse_system keyspace to the EverywhereStrategy. In cqlsh enter:
ALTER KEYSPACE dse_system WITH replication = {'class': 'EverywhereStrategy'};
Then enter the following command on all nodes:
$ nodetool repair dse_system
Upgrading from version 3.0.x
About this task
Follow these instructions to upgrade to the latest version from DSE 3.0.x
Analytics nodes
While upgrading a cluster some column families created through Hadoop interfaces may not appear to
have data in them. Once the upgrade process is complete, the data will be visible again.
Partitioner
Merge your partitioner setting from the old to the new file. Do not attempt to use the Cassandra 1.2 default
partitioner option, Murmur3Partitioner, in the new file unless you were already using it.
CQL 3
Do not issue any CQL 3 queries until all nodes are upgraded and schema disagreements are resolved.
Security Recommendations
The client_encryption_options for enabling client-to-node SSL have been removed from
dse.yaml starting in 3.1.2. To enable client-to-node SSL, set the option in the cassandra.yaml file.
13
Upgrading DataStax Enterprise
Before upgrading, if you use these DataStax Enterprise security features, adjust the replication strategy
and options in the cassandra.yaml file to configure a replication factor for the dse_auth keyspace
greater than 1:
•
•
•
Kerberos
Object permission management (internal authorization)
Internal authentication
Adjust the replication factor for dse_auth on each node in the cluster. After updating the
cassandra.yaml file and restarting the node, run nodetool repair to repair the first range returned
by the partitioner for the keyspace:
nodetool repair dse_auth -pr
This should only take a few seconds to complete.
The new version of Cassandra updates the security options. First simply merge the following settings into
the new configuration files:
•
•
•
•
•
authenticator
authorizer
auth_replication_strategy
auth_replication_options
any other diffs
Use the old settings while you are upgrading the cluster so that backward compatibility is maintained. For
example, the new file contains the old, Cassandra 1.1 authenticator and authorizer options at this point:
•
•
authenticator: com.datastax.bdp.cassandra.auth.PasswordAuthenticator
authorizer: org.apache.cassandra.auth.CassandraAuthorizer
If you are upgrading a secure cluster, there may be a significant delay to each node's first startup as
the security migration takes place (up to 1 minute). The delay is due to ensuring that the ring is fully
connected before the migration starts. During the upgrade of a secure cluster, you may see a security
related error message (documented below). You will see the following message in the log when the node
has completed the migration:
INFO [NonPeriodicTasks:1 ] 2013-06-22 15:01:08,173
Auth.java (line 208 ) Migration of legacy auth data is complete.
You should now switch to org.apache.cassandra.auth implementations in
cassandra.yaml.
After all nodes have been upgraded, change these options to the new Cassandra 1.2 values and perform a
rolling restart as explained below.
Note: If using Kerberos authentication, there are no credentials data to migrate, but user records
must still be updated. Merge the related diffs from the old to the new file.
1. Edit the cassandra.yaml to switch to the official Apache versions of PasswordAuthenticator and
CassandraAuthorizer:
authenticator: org.apache.cassandra.auth.PasswordAuthenticator
authorizer: org.apache.cassandra.auth.CassandraAuthorizer
2. Remove or comment out these options from the cassandra.yaml file:
•
•
•
auth_replication_strategy
auth_replication_options
replication_factor
Note:
If you have not disabled both auth_replication_strategy and replication_factor,
you will see an error. For information about correcting this error, see Issues in the DataStax
Enterprise 3.2.5 release notes.
14
Upgrading DataStax Enterprise
3. Optionally, adjust the replication factor of the system_auth keyspace. The amount of data in this
keyspace is typically very small, so leaving it replicated across the cluster is relatively cheap.
SSTable upgrades
After restarting each node, consider upgrading sstables. Upgrading SSTables is highly recommended
under these conditions:
•
•
•
If you use counter columns
If you are upgrading from Cassandra 1.0.x or earlier
If you are upgrading from a DataStax Enterprise version having Cassandra 1.0.x or earlier
Upgrade SSTables before doing these operations:
•
•
•
move
repair
bootstrap
Because these operations copy SSTables within the cluster and the on-disk format sometimes changes
between major versions, DataStax recommends upgrading SSTables now to prevent possible future
SSTable incompatibilities:
•
•
Tarball: install_location/bin/nodetool -h upgradesstables
Package or AMI: nodetool -h upgradesstables
Virtual nodes
DataStax recommends using virtual nodes only on data centers running purely Cassandra workloads.
You should disable virtual nodes on data centers running either Hadoop or Solr workloads by setting
num_tokens to 1 in the cassandra.yaml.
Solr
If you make changes to the configuration of a Solr node after upgrading, be sure to set the type mapping
correctly as explained in Configuring the Solr type mapping version.
Expected error messages
If you are upgrading from DataStax Enterprise 3.0.x, an exception that looks something like this might
appear in logs during a rolling upgrade. Ignore these error messages:
ERROR 15:36:54,908 Exception in thread Thread[GossipStage:1,5,main ]
java.lang.NumberFormatException: For input string:
"127605887595351923798765477786913079296"
. . .
When upgrading Cassandra 1.2 nodes, you can ignore the following error messages related to when a
node is attempting to push mutations to the new system_auth keyspace:
ERROR [WRITE-/192.168.123.11] 2013-06-22 14:13:42,336
OutboundTcpConnection.java (line 222)
error writing to /192.168.123.11
java.lang.RuntimeException: Can't serialize ColumnFamily ID
2d324e48-3275-3517-8dd5-9a2c5b0856c5
to be used by version 5, because int <-> uuid mapping could not be established
(CF was created in mixed version cluster).
at
org.apache.cassandra.db.ColumnFamilySerializer.cfIdSerializedSize(ColumnFamilySerializer
When upgrading a Solr node, you can ignore the following error:
ERROR 00:57:17,785 Cannot activate core: ks.cf_10000_keys_50_cols
ERROR 00:57:17,786 <indexDefaults> and <mainIndex> configuration sections are
discontinued.
15
Upgrading DataStax Enterprise
Use <indexConfig> instead.
ERROR 01:29:55,145 checksum mismatch in segments file (resource:
ChecksumIndexInput (MMapIndexInput ( path = "/var/lib/cassandra/data/
solr.data/ks.
cf_10000_keys_50_cols/index/segments_6" )))
ERROR 01:29:55,145 Solr index ks.cf_10000_keys_50_cols seems to be corrupted:
please CREATE the core again with recovery = true to start reindexing data.
ERROR 01:29:55,145 Cannot activate core: ks.cf_10000_keys_50_cols
ERROR 01:29:55,146 checksum mismatch in segments file (resource:
ChecksumIndexInput
(MMapIndexInput ( path = "/var/lib/cassandra/data/solr.data/ks.
cf_10000_keys_50_cols/index/segments_6" )))
org.apache.lucene.index.CorruptIndexException: checksum mismatch in segments
file
(resource: ChecksumIndexInput (MMapIndexInput
( path = "/var/lib/cassandra/data/solr.data/ks.cf_10000_keys_50_cols/index/
segments_6" )))
Recommissioning a node
If you decommissioned a node in the last 72 hours:
•
•
•
Do not recommission the node until 72 hours has passed.
If you wish to recommission the node after 72 hours, run nodetool gossipinfo. Check the STATUS
line for the token of the decommissioned node and verify that it does not exist. If it does not exist, then
the node has been deleted and it is safe to recommission the node.
If you need to bring the node into the cluster, contact Support for detailed information on how to kill the
node.
Temporarily enable the old Gossip protocol in a cluster
After installing the new version, but before the first restart of each node, enable the old protocol so
each upgraded node can connect to the nodes awaiting the upgrade. Add the following line to /etc/
cassandra/cassandra-env.sh for packaged installs or install_location/conf/cassandraenv.sh for tarball installs:
VM_OPTS="$JVM_OPTS -Denable-old-dse-state=true
Note: This is unnecessary when upgrading to DataStax Enterprise 3.2.1 or later.
After upgrading the entire cluster, remove the above line on each node so it uses the new protocol, and
perform a second rolling restart.
Manually updating the dse_system keyspace to use the EverywhereStrategy
When upgrading from older versions, the first upgraded node will automatically alter dse_system to
use the EverywhereStrategy and attempt to run nodetool repair dse_system. This operation
might fail if some other nodes are down during the upgrade. Please consult /var/log/cassandra/
system.log for any errors or warnings. If automatic switching fails, once all the nodes are up manually
update the dse_system keyspace to the EverywhereStrategy. In cqlsh enter:
ALTER KEYSPACE dse_system WITH replication = {'class': 'EverywhereStrategy'};
Then enter the following command on all nodes:
$ nodetool repair dse_system
Upgrading from version 3.1.x
About this task
Follow these instructions to upgrade to the latest version from DSE 3.1.x.
16
Upgrading DataStax Enterprise
Temporarily enable the old Gossip protocol in a cluster
After installing the new version, but before the first restart of each node, enable the old protocol so
each upgraded node can connect to the nodes awaiting the upgrade. Add the following line to /etc/
cassandra/cassandra-env.sh for packaged installs or install_location/conf/cassandraenv.sh for tarball installs:
VM_OPTS="$JVM_OPTS -Denable-old-dse-state=true
Note: This is unnecessary when upgrading to DataStax Enterprise 3.2.1 or later.
After upgrading the entire cluster, remove the above line on each node so it uses the new protocol, and
perform a second rolling restart.
Manually updating the dse_system keyspace to use the EverywhereStrategy
When upgrading from older versions, the first upgraded node will automatically alter dse_system to
use the EverywhereStrategy and attempt to run nodetool repair dse_system. This operation
might fail if some other nodes are down during the upgrade. Please consult /var/log/cassandra/
system.log for any errors or warnings. If automatic switching fails, once all the nodes are up manually
update the dse_system keyspace to the EverywhereStrategy. In cqlsh enter:
ALTER KEYSPACE dse_system WITH replication = {'class': 'EverywhereStrategy'};
Then enter the following command on all nodes:
$ nodetool repair dse_system
Upgrading to DataStax Enterprise 4.0, 4.5, or 4.6
Follow these instructions to upgrade to DSE 4.0, 4.5, or 4.6.
Before you start: You must have Java 7 or higher installed before upgrading to DSE 4.x.
The recommended upgrade path for DSE 4.x is to first upgrade to one of the following versions:
•
•
•
DataStax Enterprise 3.2.5 and above
DataStax Community 1.2.16
Cassandra 2.0.x
After successfully upgrading, upgrade your sstables (as described in the upgrade details), then perform
another rolling upgrade to DSE 4.0, 4.5, or 4.6.
Note: Upgrading your sstables before updating to DSE 4.0 or higher is necessary even if you had
previously upgraded your sstables with a version of DSE that included Cassandra 1.2.x.
Note: If you are upgrading from DSE 4.0.0 and have Solr nodes, see Upgrading from DataStax
Enterprise 4.0.0 for special instructions.
Most version upgrades also have special limitations or require special steps. Find your current version in
the following table and follow the steps in linked page.
Old version
Upgrade instructions
Any version of DSC
earlier than 1.2.16
Upgrade to DSC 1.2.16 and follow the instructions in Upgrading from Datastax
Community to DataStax Enterprise
Any version of DSE
earlier than 3.2
Upgrading to DataStax Enterprise 3.2
DataStax 3.2.0 to
3.2.4
Follow the Upgrade procedure details to update to DSE 3.2.5 and above, then
follow the instructions in Upgrading from version 3.2.5
17
Upgrading DataStax Enterprise
Old version
Upgrade instructions
3.2.5 and above
Upgrading from version 3.2.5
4.0.0
Upgrading from DataStax Enterprise 4.0.0
4.0.1 or higher, 4.5.x
If you are upgrading to DataStax Enterprise 4.6, see Upgrading to DataStax
Enterprise 4.6. Otherwise, follow the General upgrade procedure.
Upgrading from version 3.2.x
Instructions on upgrading from DataStax Enterprise 3.2.x
Remove unsupported options in cassandra.yaml
Remove or comment out the following options in each node's cassandra.yaml:
# auth_replication_options:
# replication_factor: 1
These options are no longer supported by DataStax Enterprise.
Cassandra 2.0 upgrade changes
DSE 4.0.x includes Cassandra 2.0.x. See Changes impacting upgrade for details on Cassandra 2.0
changes.
Procedure
1. On each node upgrade your sstables using nodetool.
$ nodetool upgradesstables
Note: Upgrading your sstables before updating to DSE 4.0 or higher is necessary even if you
had previously upgraded your sstables with a version of DSE that included Cassandra 1.2.x.
2. Upgrade to DSE 4.0 as described in Upgrade procedure details.
Upgrading from DataStax Enterprise 4.0.0
Instructions on upgrading from DSE 4.0.0.
About this task
Due to a bug in DSE 4.0.0, upgrading clusters with search nodes from DSE 4.0.0 to DSE 4.0.x require
special steps to prevent data loss.
Note: Upgrading from versions prior to DSE 4.0.0 are unaffected by this bug.
Procedure
1. Drain each node in the cluster, but do not stop the node.
2. Reload the Solr core.
In the following example, the Solr core is wiki.solr running on the local host on port 8983.
$ curl -X POST "http://127.0.0.1:8983/solr/admin/cores?
action=RELOAD&name=wiki.solr&reindex=false&deleteAll=false"
3. Upgrade the cluster.
4. Re-index the Solr core.
18
Upgrading DataStax Enterprise
In the following example, the Solr core is wiki.solr running on the local host on port 8983.
$ curl -X POST "http://127.0.0.1:8983/solr/admin/cores?
action=RELOAD&name=wiki.solr&reindex=true
Upgrading to DataStax Enterprise 4.6
About this task
Starting in DataStax Enterprise 4.6, the endpoint snitch is set in cassandra.yaml, not
dse.yaml. The com.datastax.bdp.snitch.DseDelegateSnitch has been replaced by
com.datastax.bdp.snitch.DseSimpleSnitch in cassandra.yaml and the endpoint_snitch
option has been removed from dse.yaml.
Note: The DataStax Standalone Installer automatically sets the default endpoint_snitch to
DseSimpleSnitch and removes the option from the dse.yaml.
Procedure
1. Follow the steps in General upgrade procedure until you start the node.
2. Open cassandra.yaml in a text editor.
3. Set the endpoint_snitch option to the same snitch that's set in delegated_snitch in dse.yaml.
For example:
endpoint_snitch: com.datastax.bdp.snitch.DseSimpleSnitch
4. In a text editor and remove the delegated_snitch option from the old dse.yaml.
5. Repeat these steps for each node in the cluster.
Upgrading the DataStax AMI
About this task
Before upgrading, be sure to make a backup. After upgrading, read NEWS.txt to learn about any latebreaking upgrade information.
Note: If you have analytics nodes in the cluster, upgrade and restart the job tracker node first.
Procedure
1. On each node ensure that the DataStax repository is listed in the /etc/apt/sources.list:
$ deb http://username:[email protected]/enterprise stable main
where username and password are the DataStax account credentials from your registration
confirmation email.
2. If necessary, add the DataStax repository key to your aptitude trusted keys.
$ curl -L http://debian.datastax.com/debian/repo_key | sudo apt-key add 3. On each node, run the following command:
$ sudo apt-get update
$ sudo apt-get install dse-full
4. Compare the new and old version of the cassandra.yaml file and other property files that may have
changed in /etc/dse directory.
19
Upgrading DataStax Enterprise
After installing the upgrade, a backup of the cassandra.yaml is created in the /etc/dse/
cassandra directory. Use this copy to compare the two configurations and make appropriate changes.
a) Diff the following configuration files:
• The cassandra.yaml from the old installation
• The new DSE 3.0 cassandra.yaml
b) Merge the versions by hand from the old cassandra.yaml into the new DSE 3.0
cassandra.yaml:
Don't add snitch settings from the old file to the new file. The new default snitch in the
cassandra.yaml is com.datastax.bdp.snitch.DseDelegateSnitch. In previous versions,
the default snitch was com.datastax.bdp.snitch.DseSimpleSnitch.
5.
6.
7.
8.
Don't copy property files from the prior release and overwrite files in the new release. Users who
have attempted this have reported problems.
Configure the snitch setting as described in Converting snitches.
If necessary, upgrade any CQL drivers and client libraries, such as python-cql, Hector, or Pycassa that
are incompatible with the new DSE version. You can download CQL drivers and client libraries from the
DataStax download page.
Run nodetool drain to flush the commit log.
Restart the node:
$ sudo service dse restart
9. Restart client applications.
Rolling back an upgrade
This section describes how to revert DSE to a previous version.
Revert to a previous version from a package install
How to revert your DSE installation to a previous version from a package install.
Procedure
1. Uninstall all DSE packages.
•
Debian and Ubuntu
•
# apt-get remove dse-full
RHEL and CentOS
# yum remove dse-full
2. Restore the snapshot taken before the upgrade by copying the SSTable files from the snapshot
directory to the data directory of each column family. If you have multiple snapshots, look at the
timestamp to find the most recent one.
In the following example, the snapshot directory is
data_directory_location/keyspace_name/table_name/snapshots/snapshot_name and
the data directory is /data.
# cd data_directory_location/keyspace_name/table_name/
snapshots/snapshot_name
# cp -R * data_directory_location/keyspace_name/table_name
3. Reinstall the old version as described in the documentation for that release of DSE.
4. If you are using Solr, rebuild the index as described in Re-indexing in full.
20
Upgrading DataStax Enterprise
Revert to a previous version from a tarball installation
How to revert to a previous version of DSE from a tarball installation.
Procedure
1. Rename the current installation directory.
# mv dse4.0 dse4.0.bak
2. Restore the snapshot taken before the upgrade by copying the SSTable files from the snapshot
directory to the data directory of each column family. If you have multiple snapshots, look at the
timestamp to find the most recent one.
In the following example, the snapshot directory is
data_directory_location/keyspace_name/table_name/snapshots/snapshot_name and
the data directory is /data.
# cd data_directory_location/keyspace_name/table_name/
snapshots/snapshot_name
# cp -R * data_directory_location/keyspace_name/table_name
3. Copy the old cassandra.yaml file from the old install directory to the new one.
# cp dse4.0.bak/resources/cassandra/config/conf/cassandra.yaml
<new_install_dir>/resources/cassandra/config/conf/
4. Reinstall the old version as described in the documentation for that release of DSE.
5. If you are using Solr, rebuild the index as described in Re-indexing in full.
21
Upgrading from Datastax Community to DataStax Enterprise
Upgrading from Datastax Community to DataStax
Enterprise
Before you begin
Before upgrading from DataStax Community to DataStax Enterprise, ensure that the version of DSC you
are currently operating on can be upgraded directly to the version of Cassandra used by DSE. Check with
CHANGES.txt for details on upgrading. We strongly recommend using a version of DSE with the exact
same version of Cassandra as your version of DSC. Consider upgrading to a version of DSC appropriate
to your target version of DSE before upgrading to DSE.
About this task
Before upgrading to DataStax Enterprise from any DataStax Community version you must follow these
steps on each node in your cluster.
Procedure
1. Before stopping the node, run nodetool drain to flush the commit log of the old installation.
$ nodetool drain –h hostname
2. Stop the node.
3. Back up your configuration files.
Depending on how you install the product, these files may be overwritten with default values during the
installation.
4. Uninstall DataStax Community
If you installed the DataStax Community Debian or RPM packages, you must remove DataStax
Community after backing up your configuration files and before setting up and installing from the
appropriate repository.
•
For Debian packages:
$ sudo apt-get remove "dsc*" "cassandra*" "apache-cassandra*"
$ sudo apt-get autoremove
•
This action also shuts down Cassandra on the node if you haven't done so already.
For RPM packages:
$ sudo yum remove "dsc*" "cassandra*" "apache-cassandra*"
The old Cassandra configuration file is renamed to cassandra.yaml.rpmsave:
warning: /etc/cassandra/default.conf/cassandra.yaml
saved as /etc/cassandra/default.conf/cassandra.yaml.rpmsave
5. Install the new product.
• Binary tarball installs
• Debian-based installs
• RHEL-based installs
• GUI installer.
• Text installer.
• Unattended installer.
6. Configure the new product.
22
Upgrading from Datastax Community to DataStax Enterprise
Using the backups you made of your configuration files, merge any modifications you have previously
made into the new configuration files for the new version. Configuration options change often, so
be sure to double check the Version specific upgrade instructions for additional steps and changes
regarding configuration.
7. Converting snitches
The snitch is set in the dse.yaml file instead of cassandra.yaml.
The following table describes how to convert these properties:
endpoint_snitch URL
Upgrade task
org.apache.cassandra.locator.SimpleSnitch
Leave the DseDelegateSnitch as set in the
cassandra.yaml file and leave the default
delegated_snitch in the new dse.yaml file
unchanged.
org.apache.cassandra.locator.PropertyFileSnitch
Copy/paste the cassandratopology.properties file from the
old installation to install_location/
resources/cassandra/conf,
overwriting the new properties file. Set the
delegated_snitch setting in the new dse.yaml file
to:org.apache.cassandra.locator.PropertyFileSnitc
Any other snitch URL
Change the default delegated_snitch in the new
dse.yaml file to your current snitch setting.
The default delegated_snitch (com.datastax.bdp.snitch.DseSimpleSnitch) is specified in the
new dse.yaml file.
8. Start the node.
Follow the steps appropriate for your installation type:
• For packaged installs (Debian and RHEL), start DataStax Enterprise as a service.
• For binary tarball installs, start DataStax Enterprise as a stand-alone process.
9. If you are upgrading over a minor release of Cassandra (for example, from DataStax Enterprise 3.2 to
4.0, or Cassandra 1.1 to 1.2) upgrade the sstables on each node.
$ nodetool upgradesstables
10.Check the logs for warnings, errors and exceptions.
Many times warnings, errors and exceptions will be found in the logs on starting up an upgraded
node. Some of these are informational and will help you execute specific upgrade related steps. Be
sure to check the Version specific upgrade instructions to identify which of these is expected, and for
instructions on using these warnings and errors to complete your upgrade. If you find any unexpected
warnings, errors or exceptions, contact Support.
11.Repeat these steps on each node on the cluster.
23
Upgrading Cassandra
Upgrading Cassandra
This section describes how to upgrade to the latest version of Cassandra.
Version restrictions
Cassandra 2.0.x restrictions
After downloading DataStax Community, upgrade to Cassandra directly from Cassandra 1.2.9 or later.
Cassandra 2.0 is not network- or SSTable-compatible with versions older than 1.2.9. If your version of
Cassandra is earlier than 1.2.9 and you want to perform a rolling restart, first upgrade the entire cluster to
1.2.9, and then to Cassandra 2.0.
Cassandra 2.1.x restrictions
Upgrade to Cassandra 2.1 from Cassandra 2.0.7 or later.
Cassandra 2.1 is not compatible with Cassandra 1.x SSTables. First upgrade the nodes to Cassandra
2.0.7 or later, start the cluster, upgrade the SSTables, stop the cluster, and then upgrade to Cassandra
2.1.
Best practices
General upgrade procedures
1. Take a snapshot of all keyspaces before the upgrade.
You can rollback to the previous version if necessary. Cassandra is able to read data files created by
the previous version, but the inverse is not always true. Taking a snapshot is fast, especially if you have
JNA installed, and takes effectively zero disk space until you start compacting the live data files again.
2. Make sure any client drivers, such as Hector or Pycassa clients, are compatible with the new version.
3. Check the Upgrading section of NEWS.txt for information about upgrading.
4. Familiarize yourself with changes and fixes in this release.
5.
6.
7.
8.
9.
A complete list is available in CHANGES.txt, and general upgrade advice for different features is
available in NEWS.txt.
Run nodetool drain before shutting down the existing Cassandra service. This prevents overcounts of
counter data, and will also speed up restart post-upgrade.
Follow the instructions in the Upgrading procedure details.
Monitor the log files for any issues.
After upgrading and restarting all Cassandra processes, restart client applications.
After upgrading all nodes in the cluster, consider upgrading existing nodes to vnodes.
Upgrading to vnodes is optional but has a number of important advantages. See Enabling virtual nodes
on an existing production cluster.
Upgrading procedure details
About this task
This section describes the procedure for upgrading nodes in a cluster.
24
Upgrading Cassandra
Before you begin
•
•
The latest version of the Java SE Runtime Environment (JRE) 7 is required for Cassandra 2.x.
All dead nodes must be removed.
•
Do not upgrade if nodes in the cluster are down. Use the nodetool removenode command, which was
called nodetool removetoken in earlier releases, to remove dead nodes.
In the old cassandra.yaml, check the value of index_interval and change it if you want a different
default value applied to tables during the upgrade. In Cassandra 2.0 and later, index_interval has
been moved out of the cassandra.yaml and is now a table property.
•
During the upgrade, the value defined in the old cassandra.yaml is applied as the default property to
your upgraded tables. You can alter this property after the upgrade using CQL.
If your cluster does not use vnodes, in each new cassandra.yaml, disable vnodes before doing the
rolling restart.
In Cassandra 2.0.x, virtual nodes (vnodes) are enabled by default. Disable vnodes in the 2.0.x version
before upgrading.
1. In the cassandra.yaml file, set num_tokens to 1.
2. Uncomment the initial_token property and set it to 1 or to the value of a generated token for a
multi-node cluster.
Procedure
1. Stop the node.
2. Back up your configuration files.
Depending on how you install the product, these files may be overwritten with default values during
the installation. After backing up your configuration, follow the appropriate installation instructions
depending on your current installation type.
3. Install the new version of Cassandra.
• Debian or Ubuntu
• RHEL or CentOS
• Tarball
4. Configure the new product.
Using the backups you made of your configuration files, merge any modifications you have previously
made into the new configuration files for the new version. Configuration options change often, so be
sure to double check the version restrictions for additional steps and changes regarding configuration.
5. Start the node
6. If you are upgrading from a major version (for example, from 1.2 to 2.0) or a major point release (for
example, from Cassandra 2.0 to 2.1), upgrade the sstables on each node.
$ nodetool upgradesstables
7. Check the logs for warnings, errors and exceptions.
8. Repeat on each node in the cluster.
General limitations while cluster is in a partially upgraded state:
•
•
•
Do not run nodetool repair.
Do not use new features.
Do not issue these types of queries during a rolling restart: DDL, TRUNCATE
25
Upgrading Cassandra
Debian or Ubuntu
About this task
Follow these steps to get the new version, merge your customizations of the old cassandra.yaml file to
the new one, and then complete the upgrade.
Procedure
1. Save the cassandra.yaml file from the old installation to a safe place.
2. On each of your Cassandra nodes, install the new version.
$ sudo apt-get install dsc21
3. Open the old and new cassandra.yaml files and diff them.
4. Merge the diffs by hand, including the partitioner setting, from the old file into the new one.
Do not use the default partitioner setting in the new cassandra.yaml because it has changed in this
release to the Murmur3Partitioner. The Murmur3Partitioner can be used only for new clusters.
After data has been added to the cluster, you cannot change the partitioner without reworking tables,
which is not practical. Use your old partitioner setting in the new cassandra.yaml file.
5. Save the file as cassandra.yaml.
RHEL or CentOS
About this task
Follow these steps to remove the old installation, merge your customizations of the old cassandra.yaml
file to the new one, and then complete the upgrade.
Procedure
1. On each Cassandra node, remove the old installation. For example:
$ sudo yum remove dsc20
2. Install the new version.
$ sudo yum install dsc21
The installer creates the file cassandra.yaml.rpmnew in /etc/cassandra/default.conf/.
3. Open the old and new cassandra.yaml files and diff them.
4. Merge the diffs by hand, including the partitioner setting, from the old file into the new one.
Unless your old release uses the Murmur3Partitioner, do not use the default partitioner setting in
the new cassandra.yaml, Murmur3Partitioner. The Murmur3Partitioner can be used only
for new clusters. After data has been added to the cluster, you cannot change the partitioner without
reworking tables, which is not practical. Use your old partitioner setting in the new cassandra.yaml
file.
5. Save the file as cassandra.yaml.
Tarball
About this task
Follow these steps to download and unpack the binary tarball, merge your customizations of the old
cassandra.yaml file into the new one, and then complete the upgrade.
26
Upgrading Cassandra
Procedure
1. Save the cassandra.yaml file from the old installation to a safe place.
2. On each node, download and unpack the binary tarball package from the downloads section of the
Cassandra website.
3. In the new installation, open the cassandra.yaml for writing.
4. In the old installation, open the cassandra.yaml.
5. Diff the new and old cassandra.yaml files.
6. Merge the diffs, including the partitioner setting, by hand from the old file into the new one.
Do not use the default partitioner setting in the new cassandra.yaml because it has changed in this
release to the Murmur3Partitioner. The Murmur3Partitioner can be used only for new clusters.
After data has been added to the cluster, you cannot change the partitioner without reworking tables,
which is not practical. Use your old partitioner setting in the new cassandra.yaml file.
7. On RHEL or CentOS 5 platforms only, replace the snappy-java-1.5.0.jar with version 1.4.1.1 of
Snappy available here.
$ rm lib/snappy-java-1.0.5.jar
$ cd lib
$ curl -OL https://snappy-java.googlecode.com/files/snappy-java-1.0.4.1.jar
Changes impacting upgrade
Changes that can affect upgrading to Cassandra 2.1.x are:
•
•
•
•
CAS and new features in CQL such as DROP COLUMN assume that cell timestamps are microsecondssince-epoch.
Do not use these features if you are using client-specified timestamps with some other source.
Unknown keyspace replication options are no longer accepted.
Cassandra 2.0 and above has a new version of CQL (and cqlsh) based on the CQL specification
3.1.0.
Use lowercase property map keys in ALTER and CREATE statements.
In earlier releases, CQL property map keys used in ALTER and CREATE statements were caseinsensitive. For example, CLASS or class and REPLICATION_FACTOR or replication_factor
were permitted. The case-sensitivity of the property map keys was inconsistent with the treatment of
other string literals and incompatible with formatting of NetworkTopologyStrategy property maps,
which have case-sensitive data center names. In this release property map keys, such as class and
replication_factor are case-sensitive. Lowercase property map keys are shown in this example:
•
•
•
•
•
CREATE KEYSPACE test WITH replication =
{ 'class' : 'SimpleStrategy', 'replication_factor' : '1' };
You might need to fix queries having loose type validation of CQL constants that now have strong
validation.
Using BLOBs as string constants is deprecated in favor of blob constants.
vnodes are enabled by default in the 2.0 and later cassandra.yaml. Disable vnodes before upgrading
clusters that do not use vnodes.
auto_bootstrap of a single-token node with no initial_token now picks a random token instead
of bisecting an existing token range.
Using vnodes is recommended after completing the upgrade; otherwise, specify an initial token.
reduce_cache_sizes_at, reduce_cache_capacity_to, and flush_largest_memtables_at
options have been removed from cassandra.yaml.
CacheServiceMBean.reduceCacheSizes() has been removed. Use
CacheServiceMBean.set{Key,Row}CacheCapacityInMB() instead.
27
Upgrading Cassandra
•
•
•
28
authority option in cassandra.yaml has been deprecated since 1.2.0, but it has been completely
removed starting in 2.0. Use the authorizer option.
index_interval is now a CQL table property. You can change the value of index_interval after
upgrading using ALTER TABLE.
During the upgrade, Cassandra uses the value defined in old cassanda.yaml as the default for
upgraded tables.
The deprecated native_transport_min_threads option has been removed in cassandra.yaml.
Upgrading OpsCenter
Upgrading OpsCenter
Before upgrading, check that the Cassandra or DataStax Enterprise version is compatible with the
upgraded OpsCenter version.
OpsCenter version
Cassandra version
DataStax Enterprise version
5.1
1.2, 2.0
3.1.x, 3.2.x, 4.0.x, 4.5.x, 4.6.x
5.0.2
1.2, 2.0
3.1.x, 3.2.x, 4.0.x, 4.5.x, 4.6.x
5.0
1.2, 2.0
3.1.x, 3.2.x, 4.0.x, 4.5.x
4.1
1.1, 1.2, 2.0
3.0.x, 3.1.x. 3.2.x, 4.0.x
4.0
1.1, 1.2, 2.0
3.0.x, 3.1.x. 3.2.x
3.2
1.1, 1.2
2.x, 3.0.x, 3.1.x
3.1
1.0, 1.1, 1.2
1.0, 2.x, 3.0.x
3.0
1.0, 1.1, 1.2
1.0, 2.x, 3.0
2.1
0.8, 1.0, 1.1
1.0, 2.0
2.0
0.8, 1.0, 1.1
1.0, 2.0
1.4.x
0.7, 0.8, 1.0, 1.1
1.0, 2.0
Use the information in this section to upgrade to OpsCenter 5.1 from earlier versions.
Upgrading package installations
Describes installing the new OpsCenter 5.1 package and restarting the opscenterd daemon.
About this task
To upgrade to OpsCenter 5.1:
Procedure
1. On the OpsCenter daemon host, run the appropriate command to update the packages:
•
Debian or Ubuntu
•
# apt-get update
RHEL or CentOS
# yum clean all
2. Install the upgraded OpsCenter package:
•
Debian or Ubuntu:
•
# apt-get install opscenter
RHEL or CentOS:
# yum install opscenter
3. If the package manager prompts you for options regarding opscenterd.conf, choose to keep your
currently installed version.
29
Upgrading OpsCenter
4. Restart the OpsCenter daemon.
# service opscenterd restart
5. On RHEL or CentOS, if you encounter an error in pyOpenSSL when starting OpsCenter after
upgrading, uninstall OpsCenter, delete the /usr/share/opscenter/lib directory, and re-install.
a) Uninstall OpsCenter.
Debian or Ubuntu
# apt-get remove opscenter
RHEL or CentOS
# yum uninstall opscenter
b) Delete the /usr/share/opscenter/lib directory.
# rm -rf /usr/share/opscenter/lib
c) Reinstall OpsCenter.
Debian or Ubuntu
# apt-get install opscenter
RHEL or CentOs
# yum install opscenter
Upgrading tarball installations
About this task
Procedure
1. Download and extract the new tarball.
2. Copy the following files and directories from the old tarball installation directory to the new one.
conf/clusters/*
conf/event-plugins/*
conf/install_id
conf/log4j.properties
conf/opscenterd.conf
conf/ssl.conf
ssl/*
3. Stop the opscenterd instance (if it is running) and start it from the new tarball installation directory.
4. Upgrade the agents either through the GUI or by manually installing from the new tarballs.
Upgrading agents
About this task
If DataStax agents require upgrading for the new release, you are prompted to do by a Fix link located near
the top of the OpsCenter console.
30
Upgrading OpsCenter
Procedure
For information about installing the upgraded agents, see Installing OpsCenter agents.
From tarballs
If the agents will be upgraded manually with tarballs, copy the new agent.tar.gz to all nodes, extract it, and
copy the following files from the old agent tarball directories to the new ones:
conf/*
ssl/*
31
Tips for using DataStax documentation
Tips for using DataStax documentation
Navigating the documents
To navigate, use the table of contents or search in the left navigation bar. Additional controls are:
Hide or display the left navigation.
Go back or forward through the topics as listed in
the table of contents.
Toggle highlighting of search terms.
Print page.
See doc tweets and provide feedback.
Grab to adjust the size of the navigation pane.
Appears on headings for bookmarking. Right-click
the ¶ to get the link.
Toggles the legend for CQL statements and
nodetool options.
Other resources
You can find more information and help at:
•
•
•
•
•
•
32
Documentation home page
Datasheets
Webinars
Whitepapers
Developer blogs
Support
Back pressure
Back pressure
Pausing or blocking the buffering of incoming requests after reaching the threshold until the internal
processing of buffered requests catches up.
33
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement