falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ajayyad...@apache.org
Subject falcon git commit: FALCON-1708 params API does not take start as a mandatory option. Contributed by Praveen Adlakha.
Date Thu, 07 Jan 2016 13:14:27 GMT
Repository: falcon
Updated Branches:
  refs/heads/master 85fcbc318 -> 2355a52c4


FALCON-1708 params API does not take start as a mandatory option. Contributed by Praveen Adlakha.


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

Branch: refs/heads/master
Commit: 2355a52c466ea54e185d45304c4479501ed414ec
Parents: 85fcbc3
Author: Ajay Yadava <ajaynsit@gmail.com>
Authored: Thu Jan 7 16:46:14 2016 +0530
Committer: Ajay Yadava <ajaynsit@gmail.com>
Committed: Thu Jan 7 16:46:14 2016 +0530

----------------------------------------------------------------------
 CHANGES.txt                                                    | 2 ++
 .../src/main/java/org/apache/falcon/client/FalconClient.java   | 6 +++++-
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/2355a52c/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index ca67e35..76f4ad9 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -92,6 +92,8 @@ Proposed Release Version: 0.9
   OPTIMIZATIONS
 
   BUG FIXES
+    FALCON-1708  params API does not take start as a mandatory option(Praveen Adlakha via
Ajay Yadava)
+
     FALCON-1725 Falcon API shows results in ascending order in native scheduler (Pallavi
Rao)
 
     FALCON-1720 Rerun API does not rerun succeeded instances (Pavan Kolamuri via Pallavi
Rao)

http://git-wip-us.apache.org/repos/asf/falcon/blob/2355a52c/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 4a773c6..2188ba4 100644
--- a/client/src/main/java/org/apache/falcon/client/FalconClient.java
+++ b/client/src/main/java/org/apache/falcon/client/FalconClient.java
@@ -29,6 +29,7 @@ import org.apache.commons.net.util.TrustManagerUtils;
 import org.apache.falcon.LifeCycle;
 import org.apache.falcon.cli.FalconCLI;
 import org.apache.falcon.cli.FalconMetadataCLI;
+import org.apache.falcon.entity.v0.DateValidator;
 import org.apache.falcon.entity.v0.Entity;
 import org.apache.falcon.entity.v0.EntityType;
 import org.apache.falcon.recipe.RecipeTool;
@@ -591,7 +592,10 @@ public class FalconClient extends AbstractFalconClient {
                                       List<LifeCycle> lifeCycles,
                                       String doAsUser)
         throws FalconCLIException, UnsupportedEncodingException {
-
+        if (!DateValidator.validate(start)) {
+            throw new FalconCLIException("Start date is mandatory and should be"
+                    + " a valid date in  YYYY-MM-DDTHH:MMZ format.");
+        }
         return sendInstanceRequest(Instances.PARAMS, type, entity,
                 start, null, null, null, colo, lifeCycles, doAsUser);
     }


Mime
View raw message