Upgrading Replicated Clusters
Consider a scenario where CDAP is running on the master cluster with data getting replicated on the slave cluster. To upgrade the replicated clusters, follow these steps:
Update the CDAP repository definition on the slave cluster by running either of these methods:
On RPM using Yum:
$ sudo curl -o /etc/yum.repos.d/cask.repo https://repository.cdap.io/centos/6/x86_64/cdap/6.2/cask.repo
This will create the file /etc/yum.repos.d/cask.repo
 with:
[cask]
name=Cask Packages
baseurl=https://repository.cdap.io/centos/6/x86_64/cdap/6.2
enabled=1
gpgcheck=1
Add the Cask Public GPG Key to your repository:
$ sudo rpm --import https://repository.cdap.io/centos/6/x86_64/cdap/6.2/pubkey.gpg
Update your Yum cache:
On Debian using APT:
This will create the file /etc/apt/sources.list.d/cask.list
 with:
Add the Cask Public GPG Key to your repository:
Update your APT-cache:
Update the CDAP packages on the slave cluster by running either of these methods:
On RPM using Yum:
On Debian using APT:
Generate the coprocessor jar on the slave cluster corresponding to the newly downloaded CDAP version:
The coprocessor jar will be stored on the HDFS and path to the jar will be printed on console.
Copy the coprocessor jar to the same HDFS location on the master cluster.
Stop all CDAP services on the master cluster.
Make sure that all HBase and HDFS data is replicated on the slave cluster.
Run the upgrade tool on the slave cluster.:
Since replication is enabled and HBaseDDLExecutor is in place, HBase tables on the master cluster will also get upgraded.
New version of the CDAP can be started on the slave cluster now.
Download and install the new CDAP packages on the master cluster using the steps mentioned above for slave. This is to keep the master ready when there is a failover from slave. Note that there is no need to run the upgrade tool on the master since HBase tables on master were already upgraded when the upgrade tool was executed on the slave.
Created in 2020 by Google Inc.