Michael Blow has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/1301

Change subject: Omit Managix [nc|cc].java.opts From HTTP Api, Ini > Env
......................................................................

Omit Managix [nc|cc].java.opts From HTTP Api, Ini > Env

- Managix options for cc / nc java opts are not used for NC service
clustes, omit these from the cluster HTTP api.
- Ini jvm.args should take precedence over $JAVA_OPTS in environment
  when launching NCDriver

Change-Id: If52da9f5cc2a66b7c327f39a6e4ea51d4a8ccf89
---
M 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixExternalProperties.java
M 
hyracks-fullstack/hyracks/hyracks-control/hyracks-nc-service/src/main/java/org/apache/hyracks/control/nc/service/NCService.java
2 files changed, 11 insertions(+), 10 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/01/1301/1

diff --git 
a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixExternalProperties.java
 
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixExternalProperties.java
index 1a9096d..15a1f39 100644
--- 
a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixExternalProperties.java
+++ 
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixExternalProperties.java
@@ -92,13 +92,11 @@
                 PropertyInterpreters.getLevelPropertyInterpreter());
     }
 
-    @PropertyKey(EXTERNAL_NC_JAVA_OPTS_KEY)
     public String getNCJavaParams() {
         return accessor.getProperty(EXTERNAL_NC_JAVA_OPTS_KEY, 
EXTERNAL_NC_JAVA_OPTS_DEFAULT,
                 PropertyInterpreters.getStringPropertyInterpreter());
     }
 
-    @PropertyKey(EXTERNAL_CC_JAVA_OPTS_KEY)
     public String getCCJavaParams() {
         return accessor.getProperty(EXTERNAL_CC_JAVA_OPTS_KEY, 
EXTERNAL_CC_JAVA_OPTS_DEFAULT,
                 PropertyInterpreters.getStringPropertyInterpreter());
diff --git 
a/hyracks-fullstack/hyracks/hyracks-control/hyracks-nc-service/src/main/java/org/apache/hyracks/control/nc/service/NCService.java
 
b/hyracks-fullstack/hyracks/hyracks-control/hyracks-nc-service/src/main/java/org/apache/hyracks/control/nc/service/NCService.java
index 848bdd2..8ca61ad 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-control/hyracks-nc-service/src/main/java/org/apache/hyracks/control/nc/service/NCService.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-control/hyracks-nc-service/src/main/java/org/apache/hyracks/control/nc/service/NCService.java
@@ -105,17 +105,20 @@
     }
 
     private static void configEnvironment(Map<String,String> env) {
-        if (env.containsKey("JAVA_OPTS")) {
-            if (LOGGER.isLoggable(Level.INFO)) {
-                LOGGER.info("Keeping JAVA_OPTS from environment");
+        String jvmargs = IniUtils.getString(ini, nodeSection, "jvm.args", 
null);
+        if (jvmargs != null) {
+            LOGGER.info("Using JAVA_OPTS from conf file (jvm.args)");
+        } else {
+            jvmargs = env.get("JAVA_OPTS");
+            if (jvmargs != null) {
+                LOGGER.info("Using JAVA_OPTS from environment");
+            } else {
+                LOGGER.info("Using default JAVA_OPTS");
+                jvmargs = "-Xmx1536m";
             }
-            return;
         }
-        String jvmargs = IniUtils.getString(ini, nodeSection, "jvm.args", 
"-Xmx1536m");
         env.put("JAVA_OPTS", jvmargs);
-        if (LOGGER.isLoggable(Level.INFO)) {
-            LOGGER.info("Setting JAVA_OPTS to " + jvmargs);
-        }
+        LOGGER.info("Setting JAVA_OPTS to " + jvmargs);
     }
 
     /**

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1301
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If52da9f5cc2a66b7c327f39a6e4ea51d4a8ccf89
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow <mb...@apache.org>

Reply via email to