Details
-
Improvement
-
Status: Open
-
Critical
-
Resolution: Unresolved
-
3.5.7
-
None
Description
ZooKeeper's launch scripts use `-cp` to pass the class path to Java when launching. This creates insanely large command-lines which are completely unnecessary.
Java respects the CLASSPATH environment variable, and this is how the class path should be passed to Java when the process launches.
So, instead of doing java -cp $CLASSPATH ..., the scripts should be doing export CLASSPATH; java ....
The long command-lines make it difficult to troubleshoot, or view running process lists in tools like top, htop, ps, but also make it impossible to search and manage using tools like pgrep and pkill, which can only search for the first 4096 characters in the command-line. (See https://github.com/apache/fluo-uno/issues/243#issuecomment-601553260 for a specific issue involving this limit caused by ZK's scripts.)
Attachments
Issue Links
- links to