1. Install the Sqoop RPMs

Prerequisites

  1. You must have at least core Hadoop on your system. See Configure the Remote Repository for more information.

  2. Verify the HDP repositories are available:

    yum list sqoop

    The output should list at least one Sqoop package similar to the following:

    sqoop.noarch <version>

    If yum responds with "Error: No matching package to list" as shown below, yum cannot locate a matching RPM. This can happen if the repository hosting the HDP RPMs is unavailable, or has been disabled. Follow the instructions at Configure the Remote Repository to configure either a public or private repository before proceeding.

    Error: No matching package to list.

Installation

  1. Install Sqoop RPMs.

    On all nodes where you plan to use the Sqoop client, install the RPMs:

    • For RHEL/CentOS:

      yum install sqoop
    • For SLES:

      zypper install sqoop

  2. Optional: Download and add database connector.

    If you plan to migrate data from HDFS/Hive/HBase to database, you must have appropriate database connector (MySQL/Oracle/PostgreSQL) JAR file.

    • For MySQL:

      1. Execute the following command on the Sqoop host machine:

        • For RHEL/CentOS:

          yum install mysql-connector-java
        • For SLES:

          zypper install mysql-connector-java
      2. Copy the JAR file to $SQOOP_HOME/lib.

        $SQOOP_HOME is by default set to /usr/lib/sqoop/.

      3. Ensure that the JAR file has appropriate permissions.

    • For Oracle: Note that the following instructions are for OJDBC driver for Oracle 11g.

      1. Download the Oracle JDBC (OJDBC) driver from here.

      2. Copy the JAR file to $SQOOP_HOME/lib.

        $SQOOP_HOME is by default set to /usr/lib/sqoop/.

      3. Ensure that the JAR file has appropriate permissions.

    • For PostgreSQL:

      1. Execute the following command on the Sqoop host machine:

        • For RHEL/CentOS:

          yum install postgresql-jdbc
        • For SLES:

          zypper install postgresql-jdbc
      2. Copy the downloaded JAR file to $SQOOP_HOME/lib directory.

        $SQOOP_HOME is by default set to /usr/lib/sqoop/.

      3. Ensure that the JAR file has appropriate permissions.


loading table of contents...