Review Board 1.7.22


SQOOP-682 Use templating in job.etl classes

Review Request #8750 - Created Dec. 23, 2012 and submitted

Jarek Cecho
SQOOP-682
Reviewers
Sqoop
sqoop-sqoop2
I've change the classes to use generics, so that we don't have to use "Object" and explicit retypes. I'm planning to clean up the ETL interface little bit more in near future, but I want to submit clean and easily understandable patches, so I'll do it in separate JIRA/patch.
* Unit tests are passing
* Briefly tested on real cluster
connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExportDestroyer.java
Revision 37149decddc3c8f2523d0067b50b4ac077e9b7cc New Change
[20] 16 lines
[+20]
17
 */
17
 */
18
package org.apache.sqoop.connector.jdbc;
18
package org.apache.sqoop.connector.jdbc;
19

    
   
19

   
20
import org.apache.log4j.Logger;
20
import org.apache.log4j.Logger;
21
import org.apache.sqoop.common.ImmutableContext;
21
import org.apache.sqoop.common.ImmutableContext;

    
   
22
import org.apache.sqoop.connector.jdbc.configuration.ConnectionConfiguration;

    
   
23
import org.apache.sqoop.connector.jdbc.configuration.ExportJobConfiguration;
22
import org.apache.sqoop.job.etl.Destroyer;
24
import org.apache.sqoop.job.etl.Destroyer;
23

    
   
25

   
24
public class GenericJdbcExportDestroyer extends Destroyer {
26
public class GenericJdbcExportDestroyer extends Destroyer<ConnectionConfiguration, ExportJobConfiguration> {
25

    
   
27

   
26
  private static final Logger LOG = Logger.getLogger(GenericJdbcExportDestroyer.class);
28
  private static final Logger LOG = Logger.getLogger(GenericJdbcExportDestroyer.class);
27

    
   
29

   
28
  @Override
30
  @Override
29
  public void destroy(boolean success, ImmutableContext context, Object connectionConfig, Object jobConfig) {
31
  public void destroy(boolean success, ImmutableContext context, ConnectionConfiguration connection, ExportJobConfiguration job) {
30
    LOG.info("Running generic JDBC connector destroyer");
32
    LOG.info("Running generic JDBC connector destroyer");
31
  }
33
  }
32
}
34
}
connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExportInitializer.java
Revision b56ca10db25428fc6ee4510b0f86e55a2ff999f3 New Change
 
connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExportLoader.java
Revision b2e59f75b1a8dc23f6f9c510371c4d5c45bc2863 New Change
 
connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportDestroyer.java
Revision e09b0c3fac358669cfbbb1e885efc45fb622533d New Change
 
connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportExtractor.java
Revision df78755fb51e49e5ece59f4ece9214ecb7a47cb5 New Change
 
connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportInitializer.java
Revision 3b697b6203030b5a7786070b186d225c361b4545 New Change
 
connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportPartitioner.java
Revision 0d9f0c022aa7df41a2bd97541429dc293047f8de New Change
 
spi/src/main/java/org/apache/sqoop/job/etl/Destroyer.java
Revision 528d55059b19522be45c16d8ae635e6397a46469 New Change
 
spi/src/main/java/org/apache/sqoop/job/etl/Extractor.java
Revision e824b98c46f1f94be67031ae7ef835bf21c507aa New Change
 
spi/src/main/java/org/apache/sqoop/job/etl/Initializer.java
Revision 685378fbb20ae2f3a5406db1750a1add8e12aef3 New Change
 
spi/src/main/java/org/apache/sqoop/job/etl/Loader.java
Revision 3148e496e00b6cb8272a5260cad656866963c561 New Change
 
spi/src/main/java/org/apache/sqoop/job/etl/Partitioner.java
Revision 9cd000cb948207063d588a16e5b0d75ccb9525d3 New Change
 
  1. connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExportDestroyer.java: Loading...
  2. connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExportInitializer.java: Loading...
  3. connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExportLoader.java: Loading...
  4. connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportDestroyer.java: Loading...
  5. connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportExtractor.java: Loading...
  6. connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportInitializer.java: Loading...
  7. connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportPartitioner.java: Loading...
  8. spi/src/main/java/org/apache/sqoop/job/etl/Destroyer.java: Loading...
  9. spi/src/main/java/org/apache/sqoop/job/etl/Extractor.java: Loading...
  10. spi/src/main/java/org/apache/sqoop/job/etl/Initializer.java: Loading...
  11. spi/src/main/java/org/apache/sqoop/job/etl/Loader.java: Loading...
  12. spi/src/main/java/org/apache/sqoop/job/etl/Partitioner.java: Loading...