Upgrading MapR Core Manually and Offline

An offline upgrade is performed as the root user or with sudo. This is applicable if you are upgrading from 3.x or higher. The offline, manual upgrade procedure is suitable for upgrading small clusters. On large clusters, these steps are commonly performed on all nodes in parallel using scripts and/or remote management tools.

This procedure assumes you have planned and prepared for the upgrade as described earlier, and the cluster meets prerequisites, including the correct JDK for the version you are upgrading to. See the JDK Support Matrix for more information.

At the end of this procedure, you use yum update or zypper update on RHEL/CentOS or SUSE to upgrade packages.Ignore any warnings that certain packages are not installed. Packages will be upgraded correctly and no additional packages will be installed.

  1. Notify stakeholders of the impending upgrade, and then stop accepting new jobs and applications. Terminate running jobs and applications by running maprcli commands on appropriate nodes in the cluster.
    • MapReduce jobs:
      # mapred job -list
      # mapred job -kill <job-id>
      # mapred job -kill-task <task-id>
    • YARN applications:
      # yarn application -list
      # yarn application -kill <ApplicationId>
  2. Disconnect NFS mounts. Unmount the MapR NFS share from all clients connected to it, including other nodes in the cluster. This allows all processes accessing the cluster via NFS to disconnect gracefully.
    For example, if the cluster is mounted at /mapr: # umount /mapr
  3. Display the services on each node in the cluster, and stop ecosystem component services on the nodes.
    # maprcli node list -columns hostname,csvc
    # maprcli node services -multi '[{ "name": "hue", "action": "stop"}, { "name": "oozie", "action": "stop"}, { "name": "hs2", "action": "stop"}]' -nodes <hostnames>
  4. Determine where CLDB and ZooKeeper services are installed.
  5. Stop Warden on CLDB nodes first, and then on all remaining nodes.
  6. Stop ZooKeeper on all nodes where it is installed.
  7. Upgrade MapR core packages by installing the appropriate MapR package key.
    • RHEL/CentOS: sudo rpm --import http://package.mapr.com/releases/pub/maprgpg.key
    • SUSE: No package key needed.
    • Ubuntu: wget -O - http://package.mapr.com/releases/pub/maprgpg.key | sudo apt-key add -
  8. Upgrade these MapR core component and MapR hadoop common packages on all nodes where packages exist.
    Components to upgrade are:
    • mapr-cldb
    • mapr-core
    • mapr-core-internal
    • mapr-fileserver
    • mapr-hadoop-core
    • mapr-historyserver
    • mapr-jobtracker
    • mapr-mapreduce1
    • mapr-mapreduce2
    • mapr-metrics
    • mapr-nfs
    • mapr-nodemanager
    • mapr-resourcemanager
    • mapr-tasktracker
    • mapr-webserver
    • mapr-zookeeper
    When using yum update or zypper update, do not use a wildcard such as "mapr-*" to upgrade all MapR packages, which could erroneously include Hadoop ecosystem components such as mapr-hive and mapr-pig.
    • RHEL/CentOS:
      yum update mapr-cldb mapr-core mapr-core-internal mapr-fileserver mapr-hadoop-core mapr-historyserver mapr-jobtracker mapr-mapreduce1 mapr-mapreduce2 mapr-metrics mapr-nfs mapr-nodemanager mapr-resourcemanager mapr-tasktracker mapr-webserver mapr-zookeeper mapr-zk-internal
    • SUSE:
      zypper update mapr-cldb mapr-compat-suse mapr-core mapr-core-internal mapr-fileserver mapr-hadoop-core mapr-historyserver mapr-jobtracker mapr-mapreduce1 mapr-mapreduce2 mapr-metrics mapr-nfs mapr-nodemanager mapr-resourcemanager mapr-tasktracker mapr-webserver mapr-zookeeper mapr-zk-internal
    • Ubuntu: First get a list of the MapR packages installed on the node, and then run apt-get install on the listed packages.
      dpkg --list | grep "mapr" | grep -P "^ii"| awk '{ print $2}'|tr "\n" " "
                                  apt-get install <package-list>
  9. Verify that packages were installed successfully on all nodes. Confirm that there were no errors during installation, and check that /opt/mapr/MapRBuildVersion contains the expected value.
    For example:
    # cat /opt/mapr/MapRBuildVersion
    5.1.0.xxxxx.GA