You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by asdf2014 <gi...@git.apache.org> on 2017/07/04 11:56:44 UTC

[GitHub] zookeeper pull request #302: ZOOKEEPER-2837: Add a special START_SERVER_JVMF...

GitHub user asdf2014 opened a pull request:

    https://github.com/apache/zookeeper/pull/302

    ZOOKEEPER-2837: Add a special START_SERVER_JVMFLAGS option only for `start` command to distinguish JVMFLAGS and SERVER_JVMFLAGS

    Add a special START_SERVER_JVMFLAGS option only for `start` command to distinguish JVMFLAGS and SERVER_JVMFLAGS. If we use the normal way to add JVM options with `JVMFLAGS` in `conf/java.env`, then it will effect almost all shell scripts under `bin` directory. Even if using `SERVER_JVMFLAGS` will effect some commands like `zkServer.sh status`, include four-letters commands.
    For example, if the JVMFLAGS is 
    ```bash
    export JVMFLAGS="-Xms3G -Xmx3G -Xmn1G -XX:+AlwaysPreTouch -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+PrintGCDetails -XX:-PrintGCTimeStamps -Xloggc:/home/zookeeper/logs/zookeeper_`date '+%Y%m%d%H%M%S'`.gc -XX:-UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=64M"
    ```
    then we will get too many GC log files due to using the `mntr` four-letters commands in some monitor situation.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/asdf2014/zookeeper start_server_jvmflags

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zookeeper/pull/302.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #302
    
----
commit 3feae662eeced118b780f9c8e1d7710466030229
Author: asdf2014 <15...@qq.com>
Date:   2017-07-04T11:45:43Z

    Add a special START_SERVER_JVMFLAGS option only for `start` command to distinguish JVMFLAGS and SERVER_JVMFLAGS

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zookeeper issue #302: ZOOKEEPER-2837: Add a special START_SERVER_JVMFLAGS op...

Posted by asdf2014 <gi...@git.apache.org>.
Github user asdf2014 commented on the issue:

    https://github.com/apache/zookeeper/pull/302
  
    Even if had been fixed the issues by adding the `START_SERVER_JVMFLAGS` option, but i still don't understand why the execution of `mntr` 4lw command would use the `JVMFLAGS` option. I list the process call links about executing command, but still cannot figure out.
    
    ```java
    org.apache.zookeeper.server.WorkerService.ScheduledWorkRequest#run
    org.apache.zookeeper.server.NIOServerCnxnFactory.IOWorkRequest#doWork
    org.apache.zookeeper.server.NIOServerCnxn#doIO
    org.apache.zookeeper.server.NIOServerCnxn#checkFourLetterWord
    org.apache.zookeeper.server.command.CommandExecutor#getCommand
    org.apache.zookeeper.server.command.AbstractFourLetterCommand#start
    org.apache.zookeeper.server.command.MonitorCommand#commandRun
    ```
    
    @hanm @shralex @afine PTAL.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---