falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shweth...@apache.org
Subject git commit: FALCON-302 Issues with distributed package properties. Contributed by Shwetha GS
Date Thu, 06 Mar 2014 06:55:07 GMT
Repository: incubator-falcon
Updated Branches:
  refs/heads/master 7debf4513 -> 5445e109b


FALCON-302 Issues with distributed package properties. 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/5445e109
Tree: http://git-wip-us.apache.org/repos/asf/incubator-falcon/tree/5445e109
Diff: http://git-wip-us.apache.org/repos/asf/incubator-falcon/diff/5445e109

Branch: refs/heads/master
Commit: 5445e109bc7fbfea9295f3411a994485b65d1477
Parents: 7debf45
Author: Shwetha GS <shwethags@gmail.com>
Authored: Thu Mar 6 12:24:58 2014 +0530
Committer: Shwetha GS <shwethags@gmail.com>
Committed: Thu Mar 6 12:24:58 2014 +0530

----------------------------------------------------------------------
 CHANGES.txt                                             |  2 ++
 .../org/apache/falcon/util/ApplicationProperties.java   | 12 ++++++++----
 src/bin/falcon                                          |  8 +++++++-
 src/bin/prism-start                                     |  2 +-
 src/conf/runtime.properties                             |  7 +++++--
 src/conf/startup.properties                             |  5 ++---
 6 files changed, 25 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/5445e109/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index fdb9490..b17437b 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -70,6 +70,8 @@ Trunk (Unreleased)
     FALCON-123 Improve build speeds in falcon. (Srikanth Sundarrajan via Shwetha GS)
 
   BUG FIXES
+    FALCON-302 Issues with distributed package properties. (Shwetha GS)
+
     FALCON-331 Summary API returning NPE if only start is passed. (Shwetha GS)
 
     FALCON-323 Summary API deserialization fails if array has only one element.

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/5445e109/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 70ab86b..d7fb10b 100644
--- a/common/src/main/java/org/apache/falcon/util/ApplicationProperties.java
+++ b/common/src/main/java/org/apache/falcon/util/ApplicationProperties.java
@@ -135,16 +135,20 @@ public abstract class ApplicationProperties extends Properties {
             domain = origProps.getProperty("*.domain");
             if (domain == null) {
                 throw new FalconException("Domain is not set!");
+            } else {
+                domain = ExpressionHelper.substitute(domain);
             }
         }
 
-        LOG.info("Initializing properties with domain " + domain);
+        LOG.info("Initializing " + this.getClass().getName() + " properties with domain "
+ domain);
         Set<String> keys = getKeys(origProps.keySet());
         for (String key : keys) {
             String value = origProps.getProperty(domain + "." + key, origProps.getProperty("*."
+ key));
-            value = ExpressionHelper.substitute(value);
-            LOG.debug(key + "=" + value);
-            put(key, value);
+            if (value != null) {
+                value = ExpressionHelper.substitute(value);
+                LOG.debug(key + "=" + value);
+                put(key, value);
+            }
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/5445e109/src/bin/falcon
----------------------------------------------------------------------
diff --git a/src/bin/falcon b/src/bin/falcon
index 113c9a7..4708e1b 100755
--- a/src/bin/falcon
+++ b/src/bin/falcon
@@ -30,4 +30,10 @@ BASEDIR=`dirname ${PRG}`
 BASEDIR=`cd ${BASEDIR}/..;pwd`
 . ${BASEDIR}/bin/falcon-config.sh 'client'
 
-${JAVA_BIN} -cp ${FALCONCPPATH} -Dfalcon.log.dir=$HOME -Dfalcon.app.type=client org.apache.falcon.cli.FalconCLI
"${@}"
+JAVA_PROPERTIES="$FALCON_OPTS"
+while [[ ${1} =~ ^\-D ]]; do
+  JAVA_PROPERTIES="${JAVA_PROPERTIES} ${1}"
+  shift
+done
+
+${JAVA_BIN} ${JAVA_PROPERTIES} -cp ${FALCONCPPATH} -Dfalcon.log.dir=$HOME -Dfalcon.app.type=client
org.apache.falcon.cli.FalconCLI "${@}"

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/5445e109/src/bin/prism-start
----------------------------------------------------------------------
diff --git a/src/bin/prism-start b/src/bin/prism-start
index 6b56796..22f48d9 100755
--- a/src/bin/prism-start
+++ b/src/bin/prism-start
@@ -33,5 +33,5 @@ if [[ $* != *-port* ]]; then
   ARGS="-port 16000"
 fi
 
-export FALCON_PROPERTIES="-Dfalcon.embeddedmq=false -Dfalcon.domain=prism"
+export FALCON_PROPERTIES="-Dfalcon.embeddedmq=false"
 exec ${BASEDIR}/bin/service-start.sh prism $ARGS $*

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/5445e109/src/conf/runtime.properties
----------------------------------------------------------------------
diff --git a/src/conf/runtime.properties b/src/conf/runtime.properties
index 677e5e3..608aa46 100644
--- a/src/conf/runtime.properties
+++ b/src/conf/runtime.properties
@@ -28,6 +28,9 @@
 *.log.cleanup.frequency.months.retention=months(3)
 
 #### To configure falcon servers with prism ####
-#*.all.colos=<comma separated list of colos where falcon servers are installed>
-#*.falcon.<colo>.endpoint=<falcon server endpoint>
+#prism should have the following properties
+prism.all.colos=local
+prism.falcon.local.endpoint=http://localhost:16000/
+#falcon server should have the following properties
+falcon.current.colo=local
 

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/5445e109/src/conf/startup.properties
----------------------------------------------------------------------
diff --git a/src/conf/startup.properties b/src/conf/startup.properties
index 74f0d6b..f413019 100644
--- a/src/conf/startup.properties
+++ b/src/conf/startup.properties
@@ -57,11 +57,10 @@ prism.configstore.listeners=org.apache.falcon.entity.v0.EntityGraph,\
 ######### System startup parameters #########
 
 # Location to store user entity configurations
-*.config.store.uri=file://${falcon.home}/data/store
+*.config.store.uri=file://${falcon.home}/data/${falcon.app.type}-store
 
 # Location of libraries that is shipped to Hadoop
-*.system.lib.location=${falcon.home}/server/webapp/falcon/WEB-INF/lib
-prism.system.lib.location=${falcon.home}/server/webapp/prism/WEB-INF/lib
+*.system.lib.location=${falcon.home}/server/webapp/${falcon.app.type}/WEB-INF/lib
 
 *.retry.recorder.path=${falcon.log.dir}/retry
 


Mime
View raw message