sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jar...@apache.org
Subject git commit: SQOOP-1012: Sqoop2: Generic JDBC Connector should have one static instance of validator
Date Fri, 03 May 2013 05:37:38 GMT
Updated Branches:
  refs/heads/sqoop2 01ffb2f42 -> dd3bfa398


SQOOP-1012: Sqoop2: Generic JDBC Connector should have one static instance of validator

(Vasanth kumar RJ via Jarek Jarcec Cecho)


Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/dd3bfa39
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/dd3bfa39
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/dd3bfa39

Branch: refs/heads/sqoop2
Commit: dd3bfa3981e4496a450f59fe8e2dfef903ca65a8
Parents: 01ffb2f
Author: Jarek Jarcec Cecho <jarcec@cloudera.com>
Authored: Thu May 2 22:37:02 2013 -0700
Committer: Jarek Jarcec Cecho <jarcec@cloudera.com>
Committed: Thu May 2 22:37:02 2013 -0700

----------------------------------------------------------------------
 .../sqoop/connector/jdbc/GenericJdbcConnector.java |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/dd3bfa39/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcConnector.java
----------------------------------------------------------------------
diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcConnector.java
b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcConnector.java
index 11c10de..e0da80f 100644
--- a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcConnector.java
+++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcConnector.java
@@ -33,6 +33,8 @@ import org.apache.sqoop.validation.Validator;
 
 public class GenericJdbcConnector extends SqoopConnector {
 
+  private static GenericJdbcValidator genericJdbcValidator = new GenericJdbcValidator();
+
   private static final Importer IMPORTER = new Importer(
       GenericJdbcImportInitializer.class,
       GenericJdbcImportPartitioner.class,
@@ -91,8 +93,7 @@ public class GenericJdbcConnector extends SqoopConnector {
 
   @Override
   public Validator getValidator() {
-    // TODO(jarcec): Cache this object eventually
-    return new GenericJdbcValidator();
+    return genericJdbcValidator;
   }
 
   @Override


Mime
View raw message