Return-Path: X-Original-To: apmail-falcon-commits-archive@minotaur.apache.org Delivered-To: apmail-falcon-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D5D0717B59 for ; Tue, 8 Sep 2015 14:37:29 +0000 (UTC) Received: (qmail 96999 invoked by uid 500); 8 Sep 2015 14:37:20 -0000 Delivered-To: apmail-falcon-commits-archive@falcon.apache.org Received: (qmail 96960 invoked by uid 500); 8 Sep 2015 14:37:20 -0000 Mailing-List: contact commits-help@falcon.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@falcon.apache.org Delivered-To: mailing list commits@falcon.apache.org Received: (qmail 96951 invoked by uid 99); 8 Sep 2015 14:37:20 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Sep 2015 14:37:20 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 1CD8CDFADB; Tue, 8 Sep 2015 14:37:20 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ajayyadava@apache.org To: commits@falcon.apache.org Message-Id: <9a375cfdbac74e898f8f1cc65de8780f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: falcon git commit: FALCON-1250 Throw error when keys in startup.properties do not start with "*." or domain+".". Contributed by Narayan Periwal. Date: Tue, 8 Sep 2015 14:37:20 +0000 (UTC) Repository: falcon Updated Branches: refs/heads/master 717b472eb -> 222cbbee8 FALCON-1250 Throw error when keys in startup.properties do not start with "*." or domain+".". Contributed by Narayan Periwal. Project: http://git-wip-us.apache.org/repos/asf/falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/falcon/commit/222cbbee Tree: http://git-wip-us.apache.org/repos/asf/falcon/tree/222cbbee Diff: http://git-wip-us.apache.org/repos/asf/falcon/diff/222cbbee Branch: refs/heads/master Commit: 222cbbee81321059091f9e0a2415f5ff65467fdd Parents: 717b472 Author: Ajay Yadava Authored: Tue Sep 8 18:27:39 2015 +0530 Committer: Ajay Yadava Committed: Tue Sep 8 18:27:39 2015 +0530 ---------------------------------------------------------------------- CHANGES.txt | 3 +++ .../org/apache/falcon/util/ApplicationProperties.java | 6 +++++- common/src/main/resources/startup.properties | 11 ----------- 3 files changed, 8 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/falcon/blob/222cbbee/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 4b47d5b..67999aa 100755 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,9 @@ Trunk (Unreleased) IMPROVEMENTS FALCON-1430 Exclude designer from source tarball(Ajay Yadava) + + FALCON-1250 Throw error when keys in startup.properties do not start with "*." or domain+"."(Narayan Periwal via Ajay Yadava) + OPTIMIZATIONS http://git-wip-us.apache.org/repos/asf/falcon/blob/222cbbee/common/src/main/java/org/apache/falcon/util/ApplicationProperties.java ---------------------------------------------------------------------- diff --git a/common/src/main/java/org/apache/falcon/util/ApplicationProperties.java b/common/src/main/java/org/apache/falcon/util/ApplicationProperties.java index 1d8cf49..5607119 100644 --- a/common/src/main/java/org/apache/falcon/util/ApplicationProperties.java +++ b/common/src/main/java/org/apache/falcon/util/ApplicationProperties.java @@ -154,10 +154,14 @@ public abstract class ApplicationProperties extends Properties { } } - private Set getKeys(Set keySet) { + private Set getKeys(Set keySet) throws FalconException { Set keys = new HashSet(); for (Object keyObj : keySet) { String key = (String) keyObj; + if (!key.startsWith("*.") && !key.startsWith(domain + ".")) { + LOG.error("Key: " + key + " does not start with '*.' or '" + domain + ".'"); + throw new FalconException("Key: " + key + " does not start with '*.' or '" + domain + ".'"); + } keys.add(key.substring(key.indexOf('.') + 1)); } return keys; http://git-wip-us.apache.org/repos/asf/falcon/blob/222cbbee/common/src/main/resources/startup.properties ---------------------------------------------------------------------- diff --git a/common/src/main/resources/startup.properties b/common/src/main/resources/startup.properties index c48188c..a22eca6 100644 --- a/common/src/main/resources/startup.properties +++ b/common/src/main/resources/startup.properties @@ -75,17 +75,6 @@ debug.libext.feed.retention.paths=${falcon.libext} debug.libext.feed.replication.paths=${falcon.libext} debug.libext.process.paths=${falcon.libext} -#Configurations used in ITs -it.config.store.uri=file://${user.dir}/target/store -it.config.oozie.conf.uri=${user.dir}/target/oozie -it.system.lib.location=${system.lib.location} -it.broker.url=tcp://localhost:61616 -it.retry.recorder.path=${user.dir}/target/retry -it.libext.feed.retention.paths=${falcon.libext} -it.libext.feed.replication.paths=${falcon.libext} -it.libext.process.paths=${falcon.libext} -it.workflow.execution.listeners=org.apache.falcon.catalog.CatalogPartitionHandler - *.falcon.cleanup.service.frequency=minutes(5)