HDB 2.1.x to HDB 2.1.y Upgrade
The HDB 2.1.x to HDB 2.1.y upgrade procedure is described below. This procedure applies a maintenance update to an existing HDB 2.1 installation, upgrading the Ambari HAWQ Plug-in, HDB, and PXF components to supported versions. For example, use this procedure to upgrade from HDB 2.1.0 to HDB 2.1.1, or to any later maintenance release version. This procedure uses HDB 2.1.x to refer to your currently-installed HDB version, and HDB 2.1.y to refer to the maintenance release to which you are upgrading.
Pre- and post- upgrade component versions are identified in the table below.
|Component||Pre-Upgrade Version||Post-Upgrade Version|
|Ambari HAWQ Plug-in||2.1.0||2.1.1|
This upgrade procedure must be performed in the exact order presented:
- Step 1: Add New HDB Software Repositories
- Step 2: Upgrade Ambari HAWQ Plug-in
- Step 3: Back up Existing HDB Installation
- Step 4: Upgrade HDB Software
- Step 5: Upgrade PXF
- Step 6: HDB 2.1.0 Post-Upgrade Actions
Follow the instructions in Setting up HDB Repositories to set up local
yum HDB repositories on the
repo-node you choose to host the HDB software. This system must be accessible to all nodes in your HAWQ cluster.
After you set up the repos, each HAWQ host can obtain the HDB software from the
repo-node HDB repositories.
If you use Ambari to manage your cluster, perform the following steps to upgrade the Ambari HAWQ plug-in software.
Note: The Ambari plug-in for HAWQ is included in the HDB software installation package.
Log in to the Ambari server system as the
$ ssh root@<ambari-server>
Install the HAWQ Ambari plug-in. The RPM package will be installed from the HDB repository set up on
repo-nodein the previous section.
root@ambari-server$ yum install hawq-ambari-plugin
Scripts and template files are installed to
Ensure that the Ambari server is running. If not, start it:
root@ambari-server$ /usr/sbin/ambari-server status root@ambari-server$ /usr/sbin/ambari-server start
add-hawq.pyAmbari HAWQ set-up script, providing the HDB repository URL (replace
xwith the appropriate HDB maintenance version number) and HDP stack version; you will be prompted for your Ambari admin credentials if you do not provide
root@ambari-server$ /var/lib/hawq/add-hawq.py -s HDP-2.5 --hawqrepo http://<repo-node>/hdb-2.1.y.0
--hawqrepooption is not required if you have set up the HDB repositories on your Ambari server host.
Restart the Ambari server:
root@ambari-server$ /usr/sbin/ambari-server restart
Stop the PXF and HAWQ services. First, click on the service in the left pane and then select the Stop action from the Service Action dropdown.
Unless directed to by these instructions, do not invoke any service actions in the Ambari management console until the upgrade procedure is complete.
Backing up your HDB installation before a maintenance upgrade is recommended.
Log in to the HDB 2.1.x HAWQ master node and set up the environment. For example:
$ ssh gpadmin@<master> gpadmin@master$ . /usr/local/hawq/greenplum_path.sh gpadmin@master$ hawq version HAWQ version 22.214.171.124 build 2490
(Optional) Clean out old server log files from your master and segment data directories. Cleaning out old log files is not required, but will reduce the size of the HAWQ files that are backed up.
Follow the instructions in Backing Up and Restoring HAWQ to back up your existing databases.
Backing up the HDB 2.1.x binary installation is not necessary; HDB version 2.0.1 and newer support upgrade in place.
Stop the PXF Agent on each node if you have not done this from the Ambari UI in a previous step:
hawq-node$ sudo service pxf-service stop
Stop the HAWQ cluster if you have not done this from the Ambari UI in a previous step:
gpadmin@master$ hawq stop cluster
Back up data directories on the HAWQ master, standby master, and all segment nodes. You can determine the location of the data directories by examining the
hawq_segment_directoryconfiguration values in
For example, to copy the master node data directory to the local system:
master$ mkdir -p /save/hawq-backup/data master$ cp -r /data/hawq/master /save/hawq-backup/data/
On a segment node:
segment$ cp -r /data/hawq/segment /save/hawq-backup/data/
Copy or preserve any additional folders or files (such as backup folders) that you have added in the HAWQ data directories.
Perform the following steps on the HAWQ master, HAWQ standby master, and on each HAWQ segment node. You may choose to update your cluster in parallel using your choice of tool such as
Log in to the HAWQ node as the
$ ssh root@<hawq-node>
Install the HDB software on the node:
root@hawq-node$ yum upgrade hawq
The HAWQ software is installed to
ywith the appropriate HDB maintenance version number).
Create a symbolic link to the new HAWQ installation directory:
root@hawq-node$ ln -s /usr/local/hawq_2_1_y_0 /usr/local/hawq
If you do not use Ambari to manage your HAWQ cluster, copy the HDB 2.1.x
etc/configuration directory to the new HDB 2.1.y installation:
hawq-node$ cp -rf /usr/local/hawq_2_1_x_0/etc /usr/local/hawq/ hawq-node$ chown -R gpadmin:gpadmin /usr/local/hawq
Perform steps 1-4. above on the HAWQ masters and each segment node in your HAWQ cluster.
Restart the HAWQ cluster:
a. If you use Ambari to manage your cluster, start the HAWQ service from the Ambari console.
b. If you do not use Ambari, log in to the HAWQ master node and restart the HAWQ cluster:
$ ssh gpadmin@<master> gpadmin@master$ . /usr/local/hawq/greenplum_path.sh gpadmin@master$ hawq start cluster
Display the HAWQ version to verify the HDB software upgrade. For example:
gpadmin@master$ hawq version HAWQ version 2.1.y.0 build NNNN
Perform the following steps on each PXF node in your HAWQ cluster to upgrade the PXF software:
Log in to the PXF node as the
$ ssh root@<pxf-node>
Stop the PXF service on each node if you have not done this from the Ambari UI in a previous step:
root@pxf-node$ service pxf-service stop
Back up the PXF 3.1.x configuration files found in the
/etc/pxf/conf/directory. For example:
root@pxf-node$ mkdir -p /save/pxf31x-conf root@pxf-node$ cp /etc/pxf/conf/* /save/pxf31x-conf/
Uninstall the PXF 3.1.x RPMs:
root@pxf-node$ yum erase -y pxf*
Remove the PXF service instance:
root@pxf-node$ rm -rf /var/pxf /etc/pxf*
Upgrade the PXF software to version 3.1.y:
root@pxf-node$ yum install -y pxf
This command installs the PXF agent software and all PXF plug-ins: HDFS, Hive, HBase, JSON. The PXF software is installed to
/etc/pxf-3.1.y, with links created from
Copy the (saved) PXF environment file to the new PXF 3.1.y installation:
root@pxf-node$ cp /save/pxf31x-conf/pxf-env.sh /etc/pxf/conf/
If you updated any PXF configuration files in your original installation, propagate these changes to the new PXF installation. Specifically, manual changes to
pxf-public.classpathfiles will need to be ported over.
Initialize the PXF service:
root@pxf-node$ service pxf-service init
After upgrading PXF on each node, start the PXF service:
a. If you use Ambari to manage your cluster, start the PXF service via the Ambari console.
b. If you do not use Ambari, start the PXF service from the command line on each node:
root@pxf-node$ service pxf-service start
After you have verified your HDB 2.1.y installation was upgraded successfully and your HAWQ cluster has been running without issues, uninstall HDB 2.1.x by performing the following operation on each node in your HAWQ cluster:
root@hawq-node$ yum erase hawq_2_1_x_0