falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shweth...@apache.org
Subject git commit: FALCON-374 Update with effective time in CLI. Contributed by Shwetha GS
Date Tue, 25 Mar 2014 07:36:35 GMT
Repository: incubator-falcon
Updated Branches:
  refs/heads/master 24142a1ff -> cf0512f91


FALCON-374 Update with effective time in CLI. Contributed by Shwetha GS


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

Branch: refs/heads/master
Commit: cf0512f91f87404c9002b9db0462ba3708637d83
Parents: 24142a1
Author: Shwetha GS <shwethags@gmail.com>
Authored: Tue Mar 25 13:06:27 2014 +0530
Committer: Shwetha GS <shwethags@gmail.com>
Committed: Tue Mar 25 13:06:27 2014 +0530

----------------------------------------------------------------------
 CHANGES.txt                                                     | 2 ++
 client/src/main/java/org/apache/falcon/cli/FalconCLI.java       | 2 ++
 client/src/main/java/org/apache/falcon/client/FalconClient.java | 2 +-
 webapp/src/test/java/org/apache/falcon/cli/FalconCLIIT.java     | 4 ++++
 4 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/cf0512f9/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 6106d56..18107b2 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -99,6 +99,8 @@ Trunk (Unreleased)
     FALCON-123 Improve build speeds in falcon. (Srikanth Sundarrajan via Shwetha GS)
 
   BUG FIXES
+    FALCON-374 Update with effective time in CLI. (Shwetha GS)
+
     FALCON-98 starting embedded hadoop fails sometimes. (Shwetha GS)
 
     FALCON-28 unable to submit/delete feed or process which had been attempted submit 

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/cf0512f9/client/src/main/java/org/apache/falcon/cli/FalconCLI.java
----------------------------------------------------------------------
diff --git a/client/src/main/java/org/apache/falcon/cli/FalconCLI.java b/client/src/main/java/org/apache/falcon/cli/FalconCLI.java
index 09550a8..33f52c4 100644
--- a/client/src/main/java/org/apache/falcon/cli/FalconCLI.java
+++ b/client/src/main/java/org/apache/falcon/cli/FalconCLI.java
@@ -477,6 +477,7 @@ public class FalconCLI {
         Option colo = new Option(COLO_OPT, true,
                 "Colo name");
         colo.setRequired(false);
+        Option effective = new Option(EFFECTIVE_OPT, true, "Effective time for update");
 
         entityOptions.addOption(url);
         entityOptions.addOptionGroup(group);
@@ -484,6 +485,7 @@ public class FalconCLI {
         entityOptions.addOption(entityName);
         entityOptions.addOption(filePath);
         entityOptions.addOption(colo);
+        entityOptions.addOption(effective);
 
         return entityOptions;
     }

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/cf0512f9/client/src/main/java/org/apache/falcon/client/FalconClient.java
----------------------------------------------------------------------
diff --git a/client/src/main/java/org/apache/falcon/client/FalconClient.java b/client/src/main/java/org/apache/falcon/client/FalconClient.java
index ff51fd3..5d9701f 100644
--- a/client/src/main/java/org/apache/falcon/client/FalconClient.java
+++ b/client/src/main/java/org/apache/falcon/client/FalconClient.java
@@ -264,7 +264,7 @@ public class FalconClient {
         Entities operation = Entities.UPDATE;
         WebResource resource = service.path(operation.path).path(entityType).path(entityName);
         if (effectiveTime != null) {
-            resource = resource.queryParam("time", SchemaHelper.formatDateUTC(effectiveTime));
+            resource = resource.queryParam("effective", SchemaHelper.formatDateUTC(effectiveTime));
         }
         ClientResponse clientResponse = resource
                 .header("Cookie", AUTH_COOKIE_EQ + authenticationToken)

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/cf0512f9/webapp/src/test/java/org/apache/falcon/cli/FalconCLIIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/cli/FalconCLIIT.java b/webapp/src/test/java/org/apache/falcon/cli/FalconCLIIT.java
index 83983a4..b6c5054 100644
--- a/webapp/src/test/java/org/apache/falcon/cli/FalconCLIIT.java
+++ b/webapp/src/test/java/org/apache/falcon/cli/FalconCLIIT.java
@@ -126,6 +126,10 @@ public class FalconCLIIT {
         Assert.assertEquals(0,
                 executeWithURL("entity -submitAndSchedule -type process -file "
                         + filePath));
+
+        Assert.assertEquals(0,
+            executeWithURL("entity -update -name " + overlay.get("processName") + " -type
process -file "
+                + filePath + " -effective 2025-04-20T00:00Z"));
     }
 
     public void testValidateValidCommands() throws Exception {


Mime
View raw message