3.4. Sqoop 2 Development Environment Setup

This document describes you how to setup development environment for Sqoop 2.

3.4.1. System Requirement Java

Sqoop has been developped and test only with JDK from Oracle and we require at least version 7 (we’re not supporting JDK 1.6 and older releases). Maven

Sqoop uses Maven 3 for building the project. Download Maven and its Installation instructions given in link.

3.4.2. Eclipse Setup

Steps for downloading source code are given in Building Sqoop2 from source code.

Sqoop 2 project has multiple modules where one module is depend on another module for e.g. sqoop 2 client module has sqoop 2 common module dependency. Follow below step for creating eclipse’s project and classpath for each module.

//Install all package into local maven repository
mvn clean install -DskipTests

//Adding M2_REPO variable to eclipse workspace
mvn eclipse:configure-workspace -Declipse.workspace=<path-to-eclipse-workspace-dir-for-sqoop-2>

//Eclipse project creation with optional parameters
mvn eclipse:eclipse -DdownloadSources=true -DdownloadJavadocs=true

Alternatively, for manually adding M2_REPO classpath variable as maven repository path in eclipse-> window-> Java ->Classpath Variables ->Click “New” ->In new dialog box, input Name as M2_REPO and Path as $HOME/.m2/repository ->click Ok.

On successful execution of above maven commands, Then import the sqoop project modules into eclipse-> File -> Import ->General ->Existing Projects into Workspace-> Click Next-> Browse Sqoop 2 directory ($HOME/git/sqoop2) ->Click Ok ->Import dialog shows multiple projects (sqoop-client, sqoop-common, etc.) -> Select all modules -> click Finish.