sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jar...@apache.org
Subject sqoop git commit: SQOOP-1724: Sqoop2: Support old config types for backward compatibility in connector data upgrade
Date Thu, 13 Nov 2014 20:22:16 GMT
Repository: sqoop
Updated Branches:
  refs/heads/branch-1.99.4 59ff6aeac -> fbdd940eb


SQOOP-1724: Sqoop2: Support old config types for backward compatibility in connector data
upgrade

(Veena Basavaraj 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/fbdd940e
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/fbdd940e
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/fbdd940e

Branch: refs/heads/branch-1.99.4
Commit: fbdd940eb38b2401119abc5426c8c5f6cc0f63f7
Parents: 59ff6ae
Author: Jarek Jarcec Cecho <jarcec@apache.org>
Authored: Thu Nov 13 12:21:47 2014 -0800
Committer: Jarek Jarcec Cecho <jarcec@apache.org>
Committed: Thu Nov 13 12:21:47 2014 -0800

----------------------------------------------------------------------
 common/src/main/java/org/apache/sqoop/model/MConfigType.java   | 4 ++++
 .../apache/sqoop/repository/derby/DerbyRepositoryHandler.java  | 6 ++++++
 2 files changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/fbdd940e/common/src/main/java/org/apache/sqoop/model/MConfigType.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/sqoop/model/MConfigType.java b/common/src/main/java/org/apache/sqoop/model/MConfigType.java
index de05332..f2984e3 100644
--- a/common/src/main/java/org/apache/sqoop/model/MConfigType.java
+++ b/common/src/main/java/org/apache/sqoop/model/MConfigType.java
@@ -25,6 +25,10 @@ public enum MConfigType {
   /** Unknown config type */
   OTHER,
 
+  @Deprecated
+  // exists for the connector upgrade path only
+  CONNECTION,
+
   /** link config type */
   LINK,
 

http://git-wip-us.apache.org/repos/asf/sqoop/blob/fbdd940e/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java
----------------------------------------------------------------------
diff --git a/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java
b/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java
index dcdc7a2..37766bf 100644
--- a/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java
+++ b/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java
@@ -2609,6 +2609,10 @@ public class DerbyRepositoryHandler extends JdbcRepositoryHandler {
         }
         driverConfig.add(mDriverConfig);
         break;
+      //added for connector upgrade path
+      case CONNECTION:
+        // do nothing since we do not support it
+        break;
       default:
         throw new SqoopException(DerbyRepoError.DERBYREPO_0007,
             "connector-" + fromConnectorId + ":" + configType);
@@ -2737,6 +2741,8 @@ public class DerbyRepositoryHandler extends JdbcRepositoryHandler {
 
       MConfigType mConfigType = MConfigType.valueOf(configType);
       switch (mConfigType) {
+        //added for connector upgrade path
+        case CONNECTION:
         case LINK:
           if (linkConfig.size() != configIndex) {
             throw new SqoopException(DerbyRepoError.DERBYREPO_0010,


Mime
View raw message