You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by si...@apache.org on 2018/09/01 07:11:36 UTC

[incubator-pulsar] branch branch-2.1 updated: Fixed the issue 2481 by not to take PULSAR_MEM from env. (#2484)

This is an automated email from the ASF dual-hosted git repository.

sijie pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 588f6f2  Fixed the issue 2481 by not to take PULSAR_MEM from env. (#2484)
588f6f2 is described below

commit 588f6f2c5d32288e7404bbbbeb5049ac03dc0697
Author: Victor <vl...@hotmail.com>
AuthorDate: Sat Sep 1 00:09:30 2018 -0700

    Fixed the issue 2481 by not to take PULSAR_MEM from env. (#2484)
    
     ### Motivation
    
    Command `./bin/pulsar-admin clusters list` failed with `Error: Could not find or load main class "` in my k8s deployment by using helm charts.
    
     ### Modifications
    
    With helm deployment the env var PULSAR_MEM is quoted with `"`, taking it for `pulsar-admin` will make the exec command to be:
    
    ```exec /docker-java-home/bin/java -cp '/pulsar/conf:::/pulsar/lib/*:' -Dlog4j.configurationFile=log4j2.yaml -Djava.net.preferIPv4Stack=true '"' -Xms1g -Xmx1g '-XX:MaxDirectMemorySize=1g"' -client -Dio.netty.leakDetectionLevel=disabled ... org.apache.pulsar.admin.cli.PulsarAdminTool /pulsar/conf/client.conf clusters list```
    
    The fix is to take out the use of env var PULSAR_MEM in `conf/pulsar_tools_env.sh`.
    
     ### Result
    
    `pulsar-admin` works as expected.
    
    Fixes #2481
---
 conf/pulsar_tools_env.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/conf/pulsar_tools_env.sh b/conf/pulsar_tools_env.sh
index 7ad022f..1a701fe 100755
--- a/conf/pulsar_tools_env.sh
+++ b/conf/pulsar_tools_env.sh
@@ -42,7 +42,7 @@
 # PULSAR_GLOBAL_ZK_CONF=
 
 # Extra options to be passed to the jvm
-PULSAR_MEM=${PULSAR_MEM:-"-Xmx256m -XX:MaxDirectMemorySize=256m"}
+PULSAR_MEM="-Xmx128m -XX:MaxDirectMemorySize=128m"
 
 # Garbage collection options
 PULSAR_GC=" -client "