If you installed Pig with the MapR Installer, use the latest version of the MapR Installer to perform the upgrade.
Complete the following steps to upgrade Pig in the MapR distribution for Apache Hadoop:
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.
1. Update Repositories
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:
- Verify that the repository is configured correctly. See Preparing Packages and Repositories for information about setting up your ecosystem repository.
Update the repository cache.On RedHat and CentOS...
yum clean allOn Ubuntu...
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.
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.
- Download the RPM package file for
mapr-pigversion from http://package.mapr.com/releases/ecosystem-all/.
Install the package with
This process is not supported on Ubuntu, because
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/).