|
|
-
How to set the class path and java heap size
David Nickerson 2012-08-29, 21:15
I'm starting a ZooKeeper server on Linux by running the following script:
#!/bin/bash export CLASSPATH="~/zookeeper-3.3.6/conf/log4j.properties" export JVMFLAGS="-Xmx1500m" ~/zookeeper-3.3.6/bin/zkServer.sh start
It seems to work fine, but is this properly adding the log4j.properties file to the classpath and setting the java heap size?
-
Re: How to set the class path and java heap size
Jordan Zimmerman 2012-08-29, 21:17
Add a file named "java.env" to the "conf" directory. But your Java settings there.
On Aug 29, 2012, at 4:15 PM, David Nickerson <[EMAIL PROTECTED]> wrote:
> I'm starting a ZooKeeper server on Linux by running the following script: > > #!/bin/bash > export CLASSPATH="~/zookeeper-3.3.6/conf/log4j.properties" > export JVMFLAGS="-Xmx1500m" > ~/zookeeper-3.3.6/bin/zkServer.sh start > > It seems to work fine, but is this properly adding the log4j.properties > file to the classpath and setting the java heap size?
-
Re: How to set the class path and java heap size
David Nickerson 2012-08-30, 14:35
This "java.env" configuration seems to be non-standard and ZooKeeper-specific. I also can't find it anywhere in the ZooKeeper documentation. Would "java.env" look like this?
export CLASSPATH="~/zookeeper-3.3.6/conf/log4j.properties" export JVMFLAGS="-Xmx1500m"
On Wed, Aug 29, 2012 at 5:17 PM, Jordan Zimmerman < [EMAIL PROTECTED]> wrote:
> Add a file named "java.env" to the "conf" directory. But your Java > settings there. > > On Aug 29, 2012, at 4:15 PM, David Nickerson < > [EMAIL PROTECTED]> wrote: > > > I'm starting a ZooKeeper server on Linux by running the following script: > > > > #!/bin/bash > > export CLASSPATH="~/zookeeper-3.3.6/conf/log4j.properties" > > export JVMFLAGS="-Xmx1500m" > > ~/zookeeper-3.3.6/bin/zkServer.sh start > > > > It seems to work fine, but is this properly adding the log4j.properties > > file to the classpath and setting the java heap size? > >
-
Re: How to set the class path and java heap size
Jordan Zimmerman 2012-08-30, 15:56
i.e.
-Xmx1G -Xms500m
===================Jordan Zimmerman
On Aug 30, 2012, at 9:36 AM, "David Nickerson" <[EMAIL PROTECTED]> wrote:
> This "java.env" configuration seems to be non-standard > and ZooKeeper-specific. I also can't find it anywhere in the ZooKeeper > documentation. Would "java.env" look like this? > > export CLASSPATH="~/zookeeper-3.3.6/conf/log4j.properties" > export JVMFLAGS="-Xmx1500m" > > On Wed, Aug 29, 2012 at 5:17 PM, Jordan Zimmerman < > [EMAIL PROTECTED]> wrote: > >> Add a file named "java.env" to the "conf" directory. But your Java >> settings there. >> >> On Aug 29, 2012, at 4:15 PM, David Nickerson < >> [EMAIL PROTECTED]> wrote: >> >>> I'm starting a ZooKeeper server on Linux by running the following script: >>> >>> #!/bin/bash >>> export CLASSPATH="~/zookeeper-3.3.6/conf/log4j.properties" >>> export JVMFLAGS="-Xmx1500m" >>> ~/zookeeper-3.3.6/bin/zkServer.sh start >>> >>> It seems to work fine, but is this properly adding the log4j.properties >>> file to the classpath and setting the java heap size? >> >>
-
Re: How to set the class path and java heap size
Jordan Zimmerman 2012-08-30, 15:56
It's just for the java options
===================Jordan Zimmerman
On Aug 30, 2012, at 9:36 AM, "David Nickerson" <[EMAIL PROTECTED]> wrote:
> This "java.env" configuration seems to be non-standard > and ZooKeeper-specific. I also can't find it anywhere in the ZooKeeper > documentation. Would "java.env" look like this? > > export CLASSPATH="~/zookeeper-3.3.6/conf/log4j.properties" > export JVMFLAGS="-Xmx1500m" > > On Wed, Aug 29, 2012 at 5:17 PM, Jordan Zimmerman < > [EMAIL PROTECTED]> wrote: > >> Add a file named "java.env" to the "conf" directory. But your Java >> settings there. >> >> On Aug 29, 2012, at 4:15 PM, David Nickerson < >> [EMAIL PROTECTED]> wrote: >> >>> I'm starting a ZooKeeper server on Linux by running the following script: >>> >>> #!/bin/bash >>> export CLASSPATH="~/zookeeper-3.3.6/conf/log4j.properties" >>> export JVMFLAGS="-Xmx1500m" >>> ~/zookeeper-3.3.6/bin/zkServer.sh start >>> >>> It seems to work fine, but is this properly adding the log4j.properties >>> file to the classpath and setting the java heap size? >> >>
-
Re: How to set the class path and java heap size
David Nickerson 2012-08-30, 17:24
zkEnv.sh has the following lines:
if [ -e "$ZOOCFGDIR/java.env" ] then . "$ZOOCFGDIR/java.env" fi
It is my understanding that this says, "If java.env exists in the conf directory, then execute it". If this is so, then java.env needs to be an executable shell script.
On Thu, Aug 30, 2012 at 11:56 AM, Jordan Zimmerman <[EMAIL PROTECTED]>wrote:
> i.e. > > -Xmx1G -Xms500m > > ===================> Jordan Zimmerman > > On Aug 30, 2012, at 9:36 AM, "David Nickerson" < > [EMAIL PROTECTED]> wrote: > > > This "java.env" configuration seems to be non-standard > > and ZooKeeper-specific. I also can't find it anywhere in the ZooKeeper > > documentation. Would "java.env" look like this? > > > > export CLASSPATH="~/zookeeper-3.3.6/conf/log4j.properties" > > export JVMFLAGS="-Xmx1500m" > > > > On Wed, Aug 29, 2012 at 5:17 PM, Jordan Zimmerman < > > [EMAIL PROTECTED]> wrote: > > > >> Add a file named "java.env" to the "conf" directory. But your Java > >> settings there. > >> > >> On Aug 29, 2012, at 4:15 PM, David Nickerson < > >> [EMAIL PROTECTED]> wrote: > >> > >>> I'm starting a ZooKeeper server on Linux by running the following > script: > >>> > >>> #!/bin/bash > >>> export CLASSPATH="~/zookeeper-3.3.6/conf/log4j.properties" > >>> export JVMFLAGS="-Xmx1500m" > >>> ~/zookeeper-3.3.6/bin/zkServer.sh start > >>> > >>> It seems to work fine, but is this properly adding the log4j.properties > >>> file to the classpath and setting the java heap size? > >> > >> >
-
Re: How to set the class path and java heap size
Jordan Zimmerman 2012-08-30, 18:10
OK - you're correct - I was thinking of something else. I apologize for the misinformation.
On Aug 30, 2012, at 12:24 PM, David Nickerson <[EMAIL PROTECTED]> wrote:
> zkEnv.sh has the following lines: > > if [ -e "$ZOOCFGDIR/java.env" ] > then > . "$ZOOCFGDIR/java.env" > fi > > It is my understanding that this says, "If java.env exists in the conf > directory, then execute it". If this is so, then java.env needs to be an > executable shell script. > > On Thu, Aug 30, 2012 at 11:56 AM, Jordan Zimmerman > <[EMAIL PROTECTED]>wrote: > >> i.e. >> >> -Xmx1G -Xms500m >> >> ===================>> Jordan Zimmerman >> >> On Aug 30, 2012, at 9:36 AM, "David Nickerson" < >> [EMAIL PROTECTED]> wrote: >> >>> This "java.env" configuration seems to be non-standard >>> and ZooKeeper-specific. I also can't find it anywhere in the ZooKeeper >>> documentation. Would "java.env" look like this? >>> >>> export CLASSPATH="~/zookeeper-3.3.6/conf/log4j.properties" >>> export JVMFLAGS="-Xmx1500m" >>> >>> On Wed, Aug 29, 2012 at 5:17 PM, Jordan Zimmerman < >>> [EMAIL PROTECTED]> wrote: >>> >>>> Add a file named "java.env" to the "conf" directory. But your Java >>>> settings there. >>>> >>>> On Aug 29, 2012, at 4:15 PM, David Nickerson < >>>> [EMAIL PROTECTED]> wrote: >>>> >>>>> I'm starting a ZooKeeper server on Linux by running the following >> script: >>>>> >>>>> #!/bin/bash >>>>> export CLASSPATH="~/zookeeper-3.3.6/conf/log4j.properties" >>>>> export JVMFLAGS="-Xmx1500m" >>>>> ~/zookeeper-3.3.6/bin/zkServer.sh start >>>>> >>>>> It seems to work fine, but is this properly adding the log4j.properties >>>>> file to the classpath and setting the java heap size? >>>> >>>> >>
|
|