summaryrefslogtreecommitdiffstats
path: root/sonar-application/src
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-08-07 00:49:53 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-08-07 00:51:14 +0200
commit81006aa4f9220de48ed20c9d678c3756c7bb7399 (patch)
tree991e88874f8f35bf0b30ba4685cb6fb7514cdeac /sonar-application/src
parent868917eb6c27fbbe552b9234a6c698ab10f5549f (diff)
downloadsonarqube-81006aa4f9220de48ed20c9d678c3756c7bb7399.tar.gz
sonarqube-81006aa4f9220de48ed20c9d678c3756c7bb7399.zip
Fix merge
Diffstat (limited to 'sonar-application/src')
-rw-r--r--sonar-application/src/main/java/org/sonar/application/App.java5
-rw-r--r--sonar-application/src/main/java/org/sonar/application/DefaultSettings.java8
2 files changed, 5 insertions, 8 deletions
diff --git a/sonar-application/src/main/java/org/sonar/application/App.java b/sonar-application/src/main/java/org/sonar/application/App.java
index 311ae0c15b2..3bdcf63a21d 100644
--- a/sonar-application/src/main/java/org/sonar/application/App.java
+++ b/sonar-application/src/main/java/org/sonar/application/App.java
@@ -35,6 +35,9 @@ import org.sonar.process.Props;
import java.io.File;
import java.util.Properties;
+/**
+ * Entry-point of process that starts and monitors elasticsearch and web servers
+ */
public class App implements ProcessMXBean {
private Monitor monitor = new Monitor();
@@ -61,7 +64,6 @@ public class App implements ProcessMXBean {
.addJavaOpts(String.format("-Djava.io.tmpdir=%s", tempDir))
.setClassName("org.sonar.search.SearchServer")
.addProperties(props.rawProperties())
- .addProperty(DefaultSettings.SONAR_NODE_NAME, props.of(DefaultSettings.SONAR_NODE_NAME, DefaultSettings.getNonSetNodeName()))
.addClasspath(starPath(homeDir, "lib/common"))
.addClasspath(starPath(homeDir, "lib/search"));
if (elasticsearch.execute()) {
@@ -80,7 +82,6 @@ public class App implements ProcessMXBean {
.addJavaOpts(String.format("-Dsonar.path.logs=%s", props.of("sonar.path.logs")))
.setClassName("org.sonar.server.app.WebServer")
.addProperties(props.rawProperties())
- .addProperty(DefaultSettings.SONAR_NODE_NAME, props.of(DefaultSettings.SONAR_NODE_NAME, DefaultSettings.getNonSetNodeName()))
.addClasspath(starPath(homeDir, "lib/common"))
.addClasspath(starPath(homeDir, "lib/server"));
String driverPath = props.of(JdbcSettings.PROPERTY_DRIVER_PATH);
diff --git a/sonar-application/src/main/java/org/sonar/application/DefaultSettings.java b/sonar-application/src/main/java/org/sonar/application/DefaultSettings.java
index 6780ae1ab94..e6d737487ac 100644
--- a/sonar-application/src/main/java/org/sonar/application/DefaultSettings.java
+++ b/sonar-application/src/main/java/org/sonar/application/DefaultSettings.java
@@ -33,7 +33,7 @@ class DefaultSettings {
static final String CLUSTER_MASTER = "sonar.cluster.master";
static final String CLUSTER_NAME = "sonar.cluster.name";
- static final String PATH_LOGS = "sonar.path.logs";
+ static final String CLUSTER_NODE_NAME = "sonar.node.name";
static final String SEARCH_PORT = "sonar.search.port";
static final String SEARCH_JMX_PORT = "sonar.search.jmxPort";
static final String SEARCH_JAVA_OPTS = "sonar.search.javaOpts";
@@ -42,11 +42,6 @@ class DefaultSettings {
static final String JDBC_URL = "sonar.jdbc.url";
static final String JDBC_LOGIN = "sonar.jdbc.username";
static final String JDBC_PASSWORD = "sonar.jdbc.password";
- static final String SONAR_NODE_NAME = "sonar.node.name";
-
- static String getNonSetNodeName() {
- return "sonar-" + System.currentTimeMillis();
- }
static void init(Props props) {
// forced property
@@ -77,6 +72,7 @@ class DefaultSettings {
defaults.put(SEARCH_JAVA_OPTS, "-Xmx256m -Xms256m -Xss256k -Djava.net.preferIPv4Stack=true " +
"-XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly " +
"-XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true");
+ defaults.put(CLUSTER_NODE_NAME, "sonar-" + System.currentTimeMillis());
defaults.put(WEB_JAVA_OPTS, "-Xmx768m -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError " +
"-Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false");
defaults.put(JDBC_URL, "jdbc:h2:tcp://localhost:9092/sonar");