made port value configurable
diff --git a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/driver/InstallerUtil.java b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/driver/InstallerUtil.java
index 2b884ef..5014ff7 100644
--- a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/driver/InstallerUtil.java
+++ b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/driver/InstallerUtil.java
@@ -104,12 +104,16 @@
}
}
clusterProperties.add(new Property("ASTERIX_HOME", cluster.getWorkingDir().getDir() + File.separator
- + "asterix"));
+ + "asterix"));
clusterProperties.add(new Property("CLUSTER_NET_IP", cluster.getMasterNode().getClusterIp()));
+ clusterProperties.add(new Property("CLUSTER_NET_PORT", cluster.getPorts().getClusterPort()));
clusterProperties.add(new Property("CLIENT_NET_IP", cluster.getMasterNode().getClientIp()));
+ clusterProperties.add(new Property("CLIENT_NET_PORT", cluster.getPorts().getClientPort()));
clusterProperties.add(new Property("LOG_DIR", cluster.getLogDir()));
clusterProperties.add(new Property("JAVA_HOME", cluster.getJavaHome()));
clusterProperties.add(new Property("WORKING_DIR", cluster.getWorkingDir().getDir()));
+ clusterProperties.add(new Property("HTTP_PORT", cluster.getPorts().getHttpPort()));
+
cluster.setEnv(new Env(clusterProperties));
}
diff --git a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/model/AsterixInstance.java b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/model/AsterixInstance.java
index 9839b90..e074fad 100644
--- a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/model/AsterixInstance.java
+++ b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/model/AsterixInstance.java
@@ -19,6 +19,7 @@
import java.util.Date;
import java.util.List;
+import edu.uci.ics.asterix.common.config.AsterixExternalProperties;
import edu.uci.ics.asterix.common.configuration.AsterixConfiguration;
import edu.uci.ics.asterix.common.configuration.Property;
import edu.uci.ics.asterix.event.schema.cluster.Cluster;
@@ -28,7 +29,6 @@
private static final long serialVersionUID = 2874439550187520449L;
-
public enum State {
ACTIVE,
INACTIVE,
@@ -60,7 +60,13 @@
this.asterixVersion = asterixVersion;
this.createdTimestamp = new Date();
this.backupInfo = new ArrayList<BackupInfo>();
- this.webInterfaceUrl = "http://" + cluster.getMasterNode().getClientIp() + ":" + 19001;
+ int webPort = 19001;
+ for (Property p : asterixConfiguration.getProperty()) {
+ if (p.getName().equalsIgnoreCase("web.port")) {
+ webPort = Integer.parseInt(p.getValue());
+ }
+ }
+ this.webInterfaceUrl = "http://" + cluster.getMasterNode().getClientIp() + ":" + webPort;
}
public Date getModifiedTimestamp() {
diff --git a/asterix-installer/src/main/resources/clusters/local/local.xml b/asterix-installer/src/main/resources/clusters/local/local.xml
index 0af8dfc..ef06822 100644
--- a/asterix-installer/src/main/resources/clusters/local/local.xml
+++ b/asterix-installer/src/main/resources/clusters/local/local.xml
@@ -6,6 +6,9 @@
</working_dir>
<log_dir>/tmp/asterix/logs</log_dir>
<txn_log_dir>/tmp/asterix/logs</txn_log_dir>
+ <cluster_port>1099</cluster_port>
+ <client_port>1098</client_port>
+ <http_port>8888</http_port>
<iodevices>/tmp</iodevices>
<store>asterix/storage</store>
<java_home></java_home>