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:12:08 GMT
Repository: sqoop
Updated Branches:
  refs/heads/sqoop2 90ec25b2a -> 8c33cdd98


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

Branch: refs/heads/sqoop2
Commit: 8c33cdd983161b6e925ea58572c891a0e896d7a2
Parents: 90ec25b
Author: Jarek Jarcec Cecho <jarcec@apache.org>
Authored: Thu Nov 13 12:07:44 2014 -0800
Committer: Jarek Jarcec Cecho <jarcec@apache.org>
Committed: Thu Nov 13 12:08:43 2014 -0800

----------------------------------------------------------------------
 common/src/main/java/org/apache/sqoop/model/MConfigType.java     | 4 ++++
 .../apache/sqoop/repository/common/CommonRepositoryHandler.java  | 4 ++++
 2 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/8c33cdd9/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..a9f7dad 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
+  // NOTE: only exists to support the connector data upgrade path
+  CONNECTION,
+
   /** link config type */
   LINK,
 

http://git-wip-us.apache.org/repos/asf/sqoop/blob/8c33cdd9/repository/repository-common/src/main/java/org/apache/sqoop/repository/common/CommonRepositoryHandler.java
----------------------------------------------------------------------
diff --git a/repository/repository-common/src/main/java/org/apache/sqoop/repository/common/CommonRepositoryHandler.java
b/repository/repository-common/src/main/java/org/apache/sqoop/repository/common/CommonRepositoryHandler.java
index 42c40e6..0a4ed6b 100644
--- a/repository/repository-common/src/main/java/org/apache/sqoop/repository/common/CommonRepositoryHandler.java
+++ b/repository/repository-common/src/main/java/org/apache/sqoop/repository/common/CommonRepositoryHandler.java
@@ -1979,6 +1979,9 @@ public abstract class CommonRepositoryHandler extends JdbcRepositoryHandler
{
           }
           driverConfig.add(mDriverConfig);
           break;
+        case CONNECTION:
+          // do nothing
+           break;
         default:
           throw new SqoopException(CommonRepositoryError.COMMON_0004,
               "connector-" + fromConnectorId + ":" + configType);
@@ -2107,6 +2110,7 @@ public abstract class CommonRepositoryHandler extends JdbcRepositoryHandler
{
 
       MConfigType mConfigType = MConfigType.valueOf(configType);
       switch (mConfigType) {
+        case CONNECTION:
         case LINK:
           if (linkConfig.size() != configIndex) {
             throw new SqoopException(CommonRepositoryError.COMMON_0007,


Mime
View raw message