Upgrade Pig

Complete the following steps to upgrade Pig in the MapR Converged Data Platform.

Before you upgrade, make sure that the version of the MapR core software on your cluster supports the version of Pig you want to upgrade to. See the Interoperability Matrix.

NOTE: If you installed Pig with the MapR Installer, use the latest version of the MapR Installer to perform the upgrade.

1. Update Repositories

MapR's rpm and deb repositories always contain the Pig version recommended for the release of the MapR core associated with that repository. You can connect to an internet repository or prepare a local repository with any version of Pig you need. You can also manually download packages.

If you plan to install from a repository, complete the following steps each node where Pig is installed:

  1. Verify that the repository is configured correctly. See Preparing Packages and Repositories for information about setting up your ecosystem repository.
  2. Update the repository cache.
    On RedHat and CentOS
    yum clean all
    On Ubuntu
    apt-get update

2. Backup Configuration Files

If you have changed configuration properties on your current installation of Pig, you probably want to apply those changes to the updated version. Configuration properties are located in /opt/mapr/pig/pig-<version>/conf/. Before you upgrade the packages, create a backup of the configuration files on all nodes where Pig is installed.

3. Upgrade the Software

Use one of the following methods to upgrade the Pig component:

To upgrade with a package manager

After configuring repositories so that the version you want to install is available, you can use a package manager to install from the repository.
On RedHat and CentOS
yum upgrade mapr-pig
On Ubuntu
apt-get install mapr-pig

To keep a prior version and install a newer version (manual installation)

Pig installs into a directory named after the version, such as /opt/mapr/pig/pig-<version>/, so the files for multiple versions can co-exist.

To keep the prior version when installing a new version, you must manually install the package file for the new version.
On RedHat and CentOS
  1. Download the RPM package file for mapr-pig version from http://package.mapr.com/releases/ecosystem-all/.
  2. Install the package with rpm.
    rpm -i --force mapr-pig-<version>.noarch.rpm
On Ubuntu
This process is not supported on Ubuntu, because apt-get and dpkg cannot manage multiple versions of a package with the same name.

4. Migrate Custom Configurations (optional)

To apply custom configurations to the new version, migrate any custom configuration settings into the new default files in the conf directory (/opt/mapr/pig/pig-<version>/conf/).