falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pall...@apache.org
Subject falcon git commit: FALCON-2286 Falcon upgradation fails to update schema
Date Fri, 10 Mar 2017 03:21:59 GMT
Repository: falcon
Updated Branches:
  refs/heads/0.11 017b0676f -> 51f1ec9c3


FALCON-2286 Falcon upgradation fails to update schema

PracheerAgarwal : Has made the changes initially, As he is on vacation and this is pending
for a release I am raising this pull request.

Author: sandeep <sandysmdl@gmail.com>

Reviewers: @pallavi-rao

Closes #376 from sandeepSamudrala/FALCON-2286 and squashes the following commits:

7f7d7c2 [sandeep] FALCON-2286 Falcon upgradation fails to update schema
85750dd [sandeep] Merge branch 'master' of https://github.com/apache/falcon
432a03a [sandeep] Merge branch 'master' of https://github.com/apache/falcon
0780363 [sandeep] Merge branch 'master' of https://github.com/apache/falcon
a3bd0e9 [sandeep] Merge branch 'master' of https://github.com/apache/falcon
db425c5 [sandeep] Merge branch 'master' of https://github.com/apache/falcon
3f67fed [sandeep] Merge branch 'master' of https://github.com/apache/falcon
cb2b00d [sandeep] Merge branch 'master' of https://github.com/apache/falcon
79e8d64 [sandeep] Merge branch 'master' of https://github.com/apache/falcon
7de7798 [sandeep] go -b FALCON-2263Merge branch 'master' of https://github.com/apache/falcon
c5da0a2 [sandeep] Merge branch 'master' of https://github.com/apache/falcon
7e16263 [sandeep] Merge branch 'master' of https://github.com/apache/falcon
a234d94 [sandeep] FALCON-2231 Incoporated review comments and small fixes for duplicate submission
and colo addition to schedule command
26e3350 [sandeep] Merge branch 'master' of https://github.com/apache/falcon
73fbf75 [sandeep] Merge branch 'master' of https://github.com/apache/falcon
cc28658 [sandeep] Merge branch 'master' of https://github.com/apache/falcon
089b10d [sandeep] Merge branch 'master' of https://github.com/apache/falcon
456d4ee [sandeep] Merge branch 'master' of https://github.com/apache/falcon
0cf9af6 [sandeep] Merge branch 'master' of https://github.com/apache/falcon
4a2e23e [sandeep] Merge branch 'master' of https://github.com/apache/falcon
b1546ed [sandeep] Merge branch 'master' of https://github.com/apache/falcon
0a433fb [sandeep] Merge branch 'master' of https://github.com/apache/falcon
194f36a [sandeep] Merge branch 'master' of https://github.com/apache/falcon
e0ad358 [sandeep] Merge branch 'master' of https://github.com/apache/falcon
f96a084 [sandeep] Merge branch 'master' of https://github.com/apache/falcon
9cf36e9 [sandeep] Merge branch 'master' of https://github.com/apache/falcon
bbca081 [sandeep] Merge branch 'master' of https://github.com/apache/falcon
48f6afa [sandeep] Merge branch 'master' of https://github.com/apache/falcon
250cc46 [sandeep] Merge branch 'master' of https://github.com/apache/falcon
d0393e9 [sandeep] Merge branch 'master' of https://github.com/apache/falcon
a178805 [sandeep] Merge branch 'master' of https://github.com/apache/falcon
d6dc8bf [sandeep] Merge branch 'master' of https://github.com/apache/falcon
1bb8d3c [sandeep] Merge branch 'master' of https://github.com/apache/falcon
c065566 [sandeep] reverting last line changes made
1a4dcd2 [sandeep] rebased and resolved the conflicts from master
271318b [sandeep] FALCON-2097. Adding UT to the new method for getting next instance time
with Delay.
a94d4fe [sandeep] rebasing from master
9e68a57 [sandeep] FALCON-298. Feed update with replication delay creates holes

(cherry picked from commit c215234e642aaac263248cec722514dc780751bf)
Signed-off-by: Pallavi Rao <pallavi.rao@inmobi.com>


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

Branch: refs/heads/0.11
Commit: 51f1ec9c347603be348bb14875946ac2992125e7
Parents: 017b067
Author: sandeep <sandysmdl@gmail.com>
Authored: Fri Mar 10 08:51:21 2017 +0530
Committer: Pallavi Rao <pallavi.rao@inmobi.com>
Committed: Fri Mar 10 08:51:39 2017 +0530

----------------------------------------------------------------------
 .../org/apache/falcon/tools/FalconStateStoreDBCLI.java  | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/51f1ec9c/common/src/main/java/org/apache/falcon/tools/FalconStateStoreDBCLI.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/falcon/tools/FalconStateStoreDBCLI.java b/common/src/main/java/org/apache/falcon/tools/FalconStateStoreDBCLI.java
index cb8c816..8ab0d9a 100644
--- a/common/src/main/java/org/apache/falcon/tools/FalconStateStoreDBCLI.java
+++ b/common/src/main/java/org/apache/falcon/tools/FalconStateStoreDBCLI.java
@@ -220,11 +220,15 @@ public class FalconStateStoreDBCLI {
         return jdbcConf;
     }
 
-    private String[] createMappingToolArguments(String sqlFile) throws Exception {
+    private String[] createMappingToolArguments(String sqlFile, boolean create) throws Exception
{
         Map<String, String> conf = getJdbcConf();
         List<String> args = new ArrayList<String>();
         args.add("-schemaAction");
-        args.add("add");
+        if (create) {
+            args.add("add");
+        } else {
+            args.add("refresh");
+        }
         args.add("-p");
         args.add("persistence.xml#falcon-" + conf.get("dbtype"));
         args.add("-connectionDriverName");
@@ -392,10 +396,10 @@ public class FalconStateStoreDBCLI {
 
     private void createUpgradeDB(String sqlFile, boolean run, boolean create) throws Exception
{
         System.out.println((create) ? "Create SQL schema" : "Upgrade SQL schema");
-        String[] args = createMappingToolArguments(sqlFile);
+        String[] args = createMappingToolArguments(sqlFile, create);
         org.apache.openjpa.jdbc.meta.MappingTool.main(args);
         if (run) {
-            args = createMappingToolArguments(null);
+            args = createMappingToolArguments(null, create);
             org.apache.openjpa.jdbc.meta.MappingTool.main(args);
         }
         System.out.println("DONE");


Mime
View raw message