Upgrade Sqoop2

About this task

To upgrade to the latest version of Sqoop2, execute the following commands as root or using sudo:
NOTE: If you installed Sqoop2 with the MapR Installer, use the latest version of the MapR Installer to perform the upgrade.

Procedure

  1. Update the list of available packages.
    On Ubuntu
    apt-get update
    On RedHat and CentOS
    yum clean all
  2. Stop each Sqoop2 server node.
    maprcli node services -name sqoop2 -action stop -nodes <space delimited list of nodes>
  3. As a precaution, back up the Sqoop2 repository. For example, you can copy the repository to the /tmp directory:
    cp -a /opt/mapr/sqoop/repository /tmp/
  4. To retain custom configurations, back up the sqoop.properties file (/opt/mapr/sqoop/sqoop-<version>/server/conf/sqoop.properties). For example, you can copy the file to a /tmp directory:
    cp /opt/mapr/sqoop/sqoop-<version>/server/conf/sqoop.properties /tmp/
  5. On each Sqoop2 server node, upgrade the mapr-sqoop2-server packages.
    On Ubuntu
    apt-get install mapr-sqoop2-server
    On RedHat and CentOS
    yum update mapr-sqoop2-server
  6. Perform one of the following steps:
    1. Manually update the sqoop.properties file with new options. On each Sqoop2 server node, set the following property in sqoop.properties file ( /opt/mapr/sqoop/sqoop-<version>/server/conf/sqoop.properties):
      org.apache.sqoop.repository.schema.immutable=false
      org.apache.sqoop.connector.autoupgrade=true
      org.apache.sqoop.driver.autoupgrade=true
    2. Use the upgrade utility to update the sqoop.properties file. On each Sqoop2 server node, run the upgrade utility. When the upgrade utiity completes successfully, the following message displays: Tool class org.apache.sqoop.tools.tool.UpgradeTool has finished correctly.
      /opt/mapr/sqoop/sqoop-<version>/bin/sqoop-tool upgrade
  7. Optionally, reconfigure any custom configurations from the sqoop.properties file associated with the sqoop version that you upgraded from.
  8. Start Sqoop2 server nodes.
    maprcli node services -name sqoop2 -action start -nodes <space delimited list of nodes>
  9. On each Sqoop2 client node, install mapr-sqoop2-client.
    On Ubuntu
    apt-get install mapr-sqoop2-client
    On RedHat / CentOS
    yum update mapr-sqoop2-client