From: <tho...@us...> - 2013-11-22 15:49:56
|
Revision: 7582 http://bigdata.svn.sourceforge.net/bigdata/?rev=7582&view=rev Author: thompsonbry Date: 2013-11-22 15:49:49 +0000 (Fri, 22 Nov 2013) Log Message: ----------- Added ability to set the river locators and groups and the zookeeper servers from the environment outside of the startHAServices script. Modified Paths: -------------- branches/BIGDATA_RELEASE_1_3_0/src/resources/HAJournal/HAJournal.config branches/BIGDATA_RELEASE_1_3_0/src/resources/bin/startHAServices Modified: branches/BIGDATA_RELEASE_1_3_0/src/resources/HAJournal/HAJournal.config =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/src/resources/HAJournal/HAJournal.config 2013-11-22 15:43:38 UTC (rev 7581) +++ branches/BIGDATA_RELEASE_1_3_0/src/resources/HAJournal/HAJournal.config 2013-11-22 15:49:49 UTC (rev 7582) @@ -116,7 +116,7 @@ //static private groups = LookupDiscovery.ALL_GROUPS; // unicast discovery or multiple setups, MUST specify groups. - static private groups = new String[]{bigdata.fedname}; + static private groups = ConfigMath.getGroups(System.getProperty("GROUPS",bigdata.fedname)); /** * One or more unicast URIs of the form <code>jini://host/</code> @@ -126,15 +126,8 @@ * discovery <strong>and</strong> you have specified the groups as * LookupDiscovery.ALL_GROUPS (a <code>null</code>). */ - static private locators = new LookupLocator[] { - - // runs jini on one or more hosts using unicast locators. - new LookupLocator("jini://bigdata15/"), - new LookupLocator("jini://bigdata16/"), - new LookupLocator("jini://bigdata17/"), - - }; - + static private locators = ConfigMath.getLocators(System.getProperty("LOCATORS","jini://bigdata15/,jini://bigdata16/,jini://bigdata17/")); + /** * A common point to set the Zookeeper client's requested * sessionTimeout and the jini lease timeout. The default lease Modified: branches/BIGDATA_RELEASE_1_3_0/src/resources/bin/startHAServices =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/src/resources/bin/startHAServices 2013-11-22 15:43:38 UTC (rev 7581) +++ branches/BIGDATA_RELEASE_1_3_0/src/resources/bin/startHAServices 2013-11-22 15:49:49 UTC (rev 7582) @@ -31,6 +31,13 @@ ## export JVM_OPTS="-server -Xmx4G -XX:MaxDirectMemorySize=3000m" +# Apache River +export GROUPS="$FEDNAME" +export LOCATORS="jini://bigdata15/,jini://bigdata16/,jini://bigdata17/" + +# Apache Zookeeper +export ZK_SERVERS="bigdata15:2081,bigdata16:2081,bigdata17:2081"; + ## # HAJournalServer configuration parameter overrides (see HAJournal.config). # @@ -43,12 +50,23 @@ # Note: Many of these properties have defaults. ## -export FEDNAME=installTest -export LOGICAL_SERVICE_ID=HAJournalServer-1 -export FED_DIR=$INSTALL_DIR -export REPLICATION_FACTOR=3 -export HA_PORT=9090 -export NSS_PORT=8080 +# Conditional defaults for required properties. These can (and should) be +# overridden from the environment outside of this script. The defaults are +# not suitable for deployment. +if [ -z "${FEDNAME}" ]; then + export FEDNAME=installTest +fi +if [ -z "${LOGICAL_SERVICE_ID}" ]; then + export LOGICAL_SERVICE_ID=HAJournalServer-1 +fi +if [ -z "${FED_DIR}" ]; then + export FED_DIR=$INSTALL_DIR +fi + +# All of these have defaults. +#export REPLICATION_FACTOR=3 +#export HA_PORT=9090 +#export NSS_PORT=8080 #export QUERY_THREAD_POOL_SIZE= #export COLLECT_QUEUE_STATISTICS= #export COLLECT_PLATFORM_STATISTICS= @@ -56,11 +74,6 @@ #export GANGLIA_LISTENER= #export SYSSTAT_DIR= -#export GROUPS= -#export LOCATORS= - -export ZK_SERVERS="bigdata15:2081,bigdata16:2081,bigdata17:2081"; - export HAOPTS="\ -DFEDNAME=${FEDNAME}\ -DLOGICAL_SERVICE_ID=${LOGICAL_SERVICE_ID}\ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |