Review Board 1.7.22


SQOOP-909 Sqoop2 integration: Create Oracle and Microsoft SQL Server database providers

Review Request #9721 - Created March 3, 2013 and submitted

Jarek Cecho
SQOOP-909
Reviewers
Sqoop
sqoop-sqoop2
I've decided to use the standard way of dealing with dependencies in Maven. I've made both Oracle and Microsoft SQL Server JDBC drivers as dependencies in a special profiles that must be enabled on command line. This way the normal build will pass as they won't be included. If you user want to use them, he needs to install them into local maven cache first. I've provided instructions in pom file and I'll describe everything on Dev Guide once we will have it.
To use Oracle provider run:

mvn clean integration-test -Dsqoop.provider.class=org.apache.sqoop.test.db.OracleProvider -Djdbc.oracle -Dhadoop.profile=200 -Dsqoop.provider.oracle.jdbc=jdbc:oracle:thin:@//oracle/xe

To use Sql Server provider run:

mvn clean integration-test -Dsqoop.provider.class=org.apache.sqoop.test.db.SqlServerProvider -Djdbc.sqlserver -Dhadoop.profile=200 -Dsqoop.provider.sqlserver.jdbc="jdbc:sqlserver://sqlserver"
pom.xml
Revision 0620d086fdea73f5629f2fb86414573c5f54df17 New Change
[20] 105 lines
[+20]
106
    <tomcat.major.version>6</tomcat.major.version>
106
    <tomcat.major.version>6</tomcat.major.version>
107
    <tomcat.minor.version>0.36</tomcat.minor.version>
107
    <tomcat.minor.version>0.36</tomcat.minor.version>
108
    <tomcat.version>${tomcat.major.version}.${tomcat.minor.version}</tomcat.version>
108
    <tomcat.version>${tomcat.major.version}.${tomcat.minor.version}</tomcat.version>
109
    <jdbc.mysql.version>5.1.23</jdbc.mysql.version>
109
    <jdbc.mysql.version>5.1.23</jdbc.mysql.version>
110
    <jdbc.postgresql.version>9.1-901.jdbc4</jdbc.postgresql.version>
110
    <jdbc.postgresql.version>9.1-901.jdbc4</jdbc.postgresql.version>

    
   
111
    <jdbc.oracle.version>11.2.0.3</jdbc.oracle.version>

    
   
112
    <jdbc.sqlserver.version>4.0</jdbc.sqlserver.version>
111
  </properties>
113
  </properties>
112

    
   
114

   
113
  <dependencies>
115
  <dependencies>
114
    <dependency>
116
    <dependency>
115
      <groupId>log4j</groupId>
117
      <groupId>log4j</groupId>
[+20] [20] 244 lines
[+20]
360
      <dependency>
362
      <dependency>
361
        <groupId>postgresql</groupId>
363
        <groupId>postgresql</groupId>
362
        <artifactId>postgresql</artifactId>
364
        <artifactId>postgresql</artifactId>
363
        <version>${jdbc.postgresql.version}</version>
365
        <version>${jdbc.postgresql.version}</version>
364
      </dependency>
366
      </dependency>

    
   
367
      <dependency>

    
   
368
        <groupId>com.oracle</groupId>

    
   
369
        <artifactId>ojdbc14</artifactId>

    
   
370
        <version>${jdbc.oracle.version}</version>

    
   
371
      </dependency>

    
   
372
      <dependency>

    
   
373
        <groupId>com.microsoft</groupId>

    
   
374
        <artifactId>sqljdbc4</artifactId>

    
   
375
        <version>${jdbc.sqlserver.version}</version>

    
   
376
      </dependency>
365
   </dependencies>
377
   </dependencies>
366
  </dependencyManagement>
378
  </dependencyManagement>
367

    
   
379

   
368
  <modules>
380
  <modules>
369
    <module>common</module>
381
    <module>common</module>
[+20] [20] 250 lines
test/pom.xml
Revision 26aa556ca2cb486c92d7f03b801aa1e3532e6bdc New Change
 
test/src/main/java/org/apache/sqoop/test/db/OracleProvider.java
New File
 
test/src/main/java/org/apache/sqoop/test/db/SqlServerProvider.java
New File
 
test/src/main/java/org/apache/sqoop/test/minicluster/TomcatSqoopMiniCluster.java
Revision 567ddbcff598d3b281f15cb337da83fab901c867 New Change
 
  1. pom.xml: Loading...
  2. test/pom.xml: Loading...
  3. test/src/main/java/org/apache/sqoop/test/db/OracleProvider.java: Loading...
  4. test/src/main/java/org/apache/sqoop/test/db/SqlServerProvider.java: Loading...
  5. test/src/main/java/org/apache/sqoop/test/minicluster/TomcatSqoopMiniCluster.java: Loading...