minor cosmetic changes to cluster configuration xml schema
git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_stabilization_ioc@1371 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-events/src/main/java/edu/uci/ics/asterix/event/management/EventExecutor.java b/asterix-events/src/main/java/edu/uci/ics/asterix/event/management/EventExecutor.java
index 04c6333..0157f65 100644
--- a/asterix-events/src/main/java/edu/uci/ics/asterix/event/management/EventExecutor.java
+++ b/asterix-events/src/main/java/edu/uci/ics/asterix/event/management/EventExecutor.java
@@ -51,7 +51,8 @@
String val = node.getJavaHome() == null ? p.getValue() : node.getJavaHome();
envBuffer.append(p.getKey() + "=" + val + " ");
} else if (p.getKey().equals("JAVA_OPTS")) {
- String val = "\"" + "-Xmx" + (node.getRam() == null ? cluster.getRam() : node.getRam());
+ String val = "\"" + "-Xmx"
+ + (node.getJavaHeap() == null ? cluster.getJavaHeap() : node.getJavaHeap());
if (node.getDebug() != null) {
val = val + " " + "-Xdebug -Xrunjdwp:transport=dt_socket,address=" + node.getDebug().intValue()
+ "," + "server=y,suspend=n";
diff --git a/asterix-events/src/main/java/edu/uci/ics/asterix/event/management/EventUtil.java b/asterix-events/src/main/java/edu/uci/ics/asterix/event/management/EventUtil.java
index e3de560..bf31e9f 100644
--- a/asterix-events/src/main/java/edu/uci/ics/asterix/event/management/EventUtil.java
+++ b/asterix-events/src/main/java/edu/uci/ics/asterix/event/management/EventUtil.java
@@ -181,8 +181,8 @@
}
if (nodeid.equals(cluster.getMasterNode().getId())) {
- String ram = cluster.getMasterNode().getRam() == null ? cluster
- .getRam() : cluster.getMasterNode().getRam();
+ String ram = cluster.getMasterNode().getJavaHeap() == null ? cluster
+ .getJavaHeap() : cluster.getMasterNode().getJavaHeap();
String logDir = cluster.getMasterNode().getLogdir() == null ? cluster
.getLogdir() : cluster.getMasterNode().getLogdir();
String javaHome = cluster.getMasterNode().getJavaHome() == null ? cluster
diff --git a/asterix-events/src/main/resources/schema/cluster.xsd b/asterix-events/src/main/resources/schema/cluster.xsd
index eaf343d..38afda3 100644
--- a/asterix-events/src/main/resources/schema/cluster.xsd
+++ b/asterix-events/src/main/resources/schema/cluster.xsd
@@ -3,7 +3,7 @@
<!-- definition of simple types -->
<xs:element name="name" type="xs:string"/>
-<xs:element name="ram" type="xs:string"/>
+<xs:element name="java_heap" type="xs:string"/>
<xs:element name="logdir" type="xs:string"/>
<xs:element name="id" type="xs:string"/>
<xs:element name="ip" type="xs:string"/>
@@ -34,7 +34,7 @@
<xs:element ref="cl:ip"/>
<xs:element ref="cl:cluster-ip"/>
<xs:element ref="cl:java_home" minOccurs="0"/>
- <xs:element ref="cl:ram" minOccurs="0"/>
+ <xs:element ref="cl:java_heap" minOccurs="0"/>
<xs:element ref="cl:logdir" minOccurs="0"/>
<xs:element ref="cl:debug" minOccurs="0"/>
</xs:sequence>
@@ -63,7 +63,7 @@
<xs:sequence>
<xs:element ref="cl:id"/>
<xs:element ref="cl:ip"/>
- <xs:element ref="cl:ram" minOccurs="0"/>
+ <xs:element ref="cl:java_heap" minOccurs="0"/>
<xs:element ref="cl:java_home" minOccurs="0"/>
<xs:element ref="cl:logdir" minOccurs="0"/>
<xs:element ref="cl:store" minOccurs="0"/>
@@ -78,7 +78,7 @@
<xs:element ref="cl:name"/>
<xs:element ref="cl:username"/>
<xs:element ref="cl:env" minOccurs="0"/>
- <xs:element ref="cl:ram" minOccurs="0"/>
+ <xs:element ref="cl:java_heap" minOccurs="0"/>
<xs:element ref="cl:java_home" minOccurs="0"/>
<xs:element ref="cl:logdir" minOccurs="0"/>
<xs:element ref="cl:store" minOccurs="0"/>
diff --git a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/CreateCommand.java b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/CreateCommand.java
index 55e172b..5ddc9e9 100644
--- a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/CreateCommand.java
+++ b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/CreateCommand.java
@@ -70,7 +70,7 @@
clusterProperties.add(new Property("ASTERIX_HOME", cluster
.getWorkingDir().getDir() + File.separator + "asterix"));
clusterProperties.add(new Property("JAVA_OPTS", "-Xmx"
- + cluster.getRam()));
+ + cluster.getJavaHeap()));
clusterProperties.add(new Property("CLUSTER_NET_IP", cluster
.getMasterNode().getClusterIp()));
clusterProperties.add(new Property("CLIENT_NET_IP", cluster
diff --git a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/ValidateCommand.java b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/ValidateCommand.java
index dcdbe18..8d9804c 100644
--- a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/ValidateCommand.java
+++ b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/command/ValidateCommand.java
@@ -45,7 +45,7 @@
@Override
protected void execCommand() throws Exception {
ValidateConfig vConfig = (ValidateConfig) config;
- logValidationResult("Enviornment", validateEnvironment());
+ logValidationResult("Environment", validateEnvironment());
if (((ValidateConfig) config).cluster != null) {
logValidationResult("Cluster configuration",
validateCluster(vConfig.cluster));
@@ -73,9 +73,9 @@
return "\nValidate the installer's configuration or a cluster configuration"
+ "\nUsage"
+ "\nFor validating the installer configuration"
- + "\n use $ managix validate"
+ + "\nuse managix validate"
+ "\n\nFor validating a cluster configuration"
- + "\n$ use managix validate -c <path to the cluster configuration file>";
+ + "\nuse managix validate -c <path to the cluster configuration file>";
}
public boolean validateEnvironment() throws Exception {
@@ -116,7 +116,7 @@
MasterNode masterNode = cluster.getMasterNode();
Node master = new Node(masterNode.getId(), masterNode.getIp(),
- masterNode.getRam(), masterNode.getJavaHome(),
+ masterNode.getJavaHeap(), masterNode.getJavaHome(),
masterNode.getLogdir(), null, masterNode.getDebug());
valid = valid & validateNodeConfiguration(master, cluster);
@@ -197,10 +197,11 @@
}
}
- if (node.getRam() == null || node.getRam().length() == 0) {
- if (cluster.getRam() == null || cluster.getRam().length() == 0) {
+ if (node.getJavaHeap() == null || node.getJavaHeap().length() == 0) {
+ if (cluster.getJavaHeap() == null
+ || cluster.getJavaHeap().length() == 0) {
valid = false;
- LOGGER.fatal("ram not defined at cluster/node level for node: "
+ LOGGER.fatal("java heap size not defined at cluster/node level for node: "
+ node.getId() + ERROR);
}
}
diff --git a/asterix-installer/src/main/resources/clusters/local/local.xml b/asterix-installer/src/main/resources/clusters/local/local.xml
index 1413999..7a8e78f 100644
--- a/asterix-installer/src/main/resources/clusters/local/local.xml
+++ b/asterix-installer/src/main/resources/clusters/local/local.xml
@@ -7,7 +7,7 @@
<logdir>/tmp/asterix/logs</logdir>
<store>/tmp/asterix/storage</store>
<java_home></java_home>
- <ram>1024m</ram>
+ <java_heap>1024m</java_heap>
<master-node>
<id>master</id>
<ip>127.0.0.1</ip>