sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kathl...@apache.org
Subject git commit: SQOOP-1041: Sqoop2: Framework upgrade in JdbcRepository returns the outdated value
Date Mon, 13 May 2013 04:46:47 GMT
Updated Branches:
  refs/heads/sqoop2 b3ebfdda6 -> c0a43d436


SQOOP-1041: Sqoop2: Framework upgrade in JdbcRepository returns the outdated value

(Jarek Jarcec Cecho via Kate Ting)


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

Branch: refs/heads/sqoop2
Commit: c0a43d436fdd9293bf10e4b874d1002441c056b1
Parents: b3ebfdd
Author: Kate Ting <kathleen@apache.org>
Authored: Mon May 13 00:46:06 2013 -0400
Committer: Kate Ting <kathleen@apache.org>
Committed: Mon May 13 00:46:06 2013 -0400

----------------------------------------------------------------------
 .../apache/sqoop/repository/JdbcRepository.java    |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/c0a43d43/core/src/main/java/org/apache/sqoop/repository/JdbcRepository.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/sqoop/repository/JdbcRepository.java b/core/src/main/java/org/apache/sqoop/repository/JdbcRepository.java
index bc6af37..d42e34a 100644
--- a/core/src/main/java/org/apache/sqoop/repository/JdbcRepository.java
+++ b/core/src/main/java/org/apache/sqoop/repository/JdbcRepository.java
@@ -183,7 +183,12 @@ public class JdbcRepository extends Repository {
           handler.registerFramework(mFramework, conn);
           return mFramework;
         } else {
-          upgradeFramework(mFramework);
+          // We're currently not serializing framework version into repository
+          // so let's just compare the structure to see if we need upgrade.
+          if(!mFramework.equals(result)) {
+            upgradeFramework(mFramework);
+            return mFramework;
+          }
           return result;
         }
       }


Mime
View raw message