|
From: <ble...@us...> - 2010-09-23 14:00:42
|
Revision: 3615
http://bigdata.svn.sourceforge.net/bigdata/?rev=3615&view=rev
Author: blevine218
Date: 2010-09-23 14:00:36 +0000 (Thu, 23 Sep 2010)
Log Message:
-----------
Allow federation.name to be overridden by settting -Dfederation.name=... when executing ANT script. Value of federation.name property is set to the empty string by default in which case the application code assigns a consistent default value.
Modified Paths:
--------------
branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/service/jini/util/LookupStarter.java
branches/maven_scaleout/bigdata-core/src/test/deploy/testing/test.xml
Modified: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/service/jini/util/LookupStarter.java
===================================================================
--- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/service/jini/util/LookupStarter.java 2010-09-22 23:37:50 UTC (rev 3614)
+++ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/service/jini/util/LookupStarter.java 2010-09-23 14:00:36 UTC (rev 3615)
@@ -71,21 +71,18 @@
private String jiniLib = System.getProperty("jini.lib");
private String jiniLibDl = System.getProperty("jini.lib.dl");
private String localPolicy = System.getProperty("java.security.policy");
-
+ private static String group = null;
private static String thisHost = null;
- private static String defaultGroup = null;
+
static {
try {
thisHost = NicUtil.getIpAddress("default.nic", "default", false);
- //defaultGroup = System.getProperty("federation.name","bigdata.test.group-"+thisHost);
- defaultGroup = ConfigDeployUtil.getFederationName();
-
+ group = ConfigDeployUtil.getFederationName();
} catch (Throwable t) { /* swallow */ }
}
+
private static String defaultCodebasePort = "23333";
- private static String group =
- System.getProperty("federation.name", defaultGroup);
private static String codebasePortStr =
System.getProperty("codebase.port", defaultCodebasePort);
private static int codebasePort = Integer.parseInt(codebasePortStr);
Modified: branches/maven_scaleout/bigdata-core/src/test/deploy/testing/test.xml
===================================================================
--- branches/maven_scaleout/bigdata-core/src/test/deploy/testing/test.xml 2010-09-22 23:37:50 UTC (rev 3614)
+++ branches/maven_scaleout/bigdata-core/src/test/deploy/testing/test.xml 2010-09-23 14:00:36 UTC (rev 3615)
@@ -32,7 +32,10 @@
<target name="setup" >
<exec executable="hostname" outputproperty="this.hostname" />
<property name="test.codebase" value="http://${this.hostname}:${test.codebase.port}/jsk-dl.jar" />
- <!-- <property name="federation.name" value="bigdata.test.group-${this.hostname}" /> -->
+
+ <!-- Set to the empty string to indicate "unset". Application code will determine correct
+ default value. -->
+ <property name="federation.name" value="" />
</target>
<target name="junit" description="starts http class server, lookup service, runs junit tests, stops lookup service, stops http class server."
@@ -100,9 +103,7 @@
<sysproperty key="log4j.configuration" value="${log4j.configuration}" />
<sysproperty key="codebase.port" value="${test.codebase.port}" />
<sysproperty key="java.net.preferIPv4Stack" value="${java.net.preferIPv4Stack}" />
- <!--
<sysproperty key="federation.name" value="${federation.name}" />
- -->
<sysproperty key="default.nic" value="${default.nic}" />
</java>
</target>
@@ -122,9 +123,9 @@
<sysproperty key="java.security.policy" value="${java.security.policy}" />
<sysproperty key="log4j.configuration" value="${log4j.configuration}" />
<sysproperty key="java.net.preferIPv4Stack" value="${java.net.preferIPv4Stack}" />
- <!--
+
<sysproperty key="federation.name" value="${federation.name}" />
- -->
+
<sysproperty key="default.nic" value="${default.nic}" />
<arg value="-stop" />
</java>
@@ -215,13 +216,11 @@
<sysproperty key="app.home" value="${app.home}" /> <!-- This is the deployment directory, easily accessed by the DataFinder class. -->
<sysproperty key="log4j.path" value="${log4j.configuration}" />
<sysproperty key="default.nic" value="${default.nic}" />
- <!-- Jini group name -->
- <!--
+
+ <!-- Jini group name -->
<sysproperty key="federation.name" value="${federation.name}" />
- -->
-
+
<sysproperty key="java.class.path" value="${junit.classpath.text}" />
-
<sysproperty key="classserver.jar" value="${deploy.lib}/classserver.jar" />
<sysproperty key="colt.jar" value="${deploy.lib}/colt.jar" />
<sysproperty key="ctc_utils.jar" value="${deploy.lib}/ctc_utils.jar" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|