-
Notifications
You must be signed in to change notification settings - Fork 26.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Dubbo-1330] Fix Support MetaspaceSize and MaxMetaspaceSize vm args in java8+ #1347
[Dubbo-1330] Fix Support MetaspaceSize and MaxMetaspaceSize vm args in java8+ #1347
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1347 +/- ##
==========================================
- Coverage 32.39% 32.37% -0.02%
==========================================
Files 691 691
Lines 34535 34535
Branches 6811 6811
==========================================
- Hits 11186 11181 -5
- Misses 21416 21421 +5
Partials 1933 1933
Continue to review full report at Codecov.
|
@@ -58,11 +60,18 @@ if [ "$1" = "jmx" ]; then | |||
JAVA_JMX_OPTS=" -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false " | |||
fi | |||
JAVA_MEM_OPTS="" | |||
#set jvm args by different java version | |||
JAVA_VERSION=`java -version 2>&1 | awk -F[\"\.] -v OFS=. 'NR==1{print $3}'` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JAVA_VERSION=java -version 2>&1 | grep -i 'java version' | awk -F[\"\.] -v OFS=. 'NR==1{print $3}'
@web1992, I put some comments on your code change, pls. check. |
MetaspaceSize
and MaxMetaspaceSize
vm args in java8+
@beiwei30 Sorry, what you mean? I don't understand, show I put some comments in |
@web1992 Your code for parsing java version is not robust, in fact it doesn't work in my environment :p. A better way to parse java version is |
@beiwei30 What is you java version and os ? Mac ,Linux or Windws ? java -version 2>&1 | awk -F[\"\.] -v OFS=. 'NR==1{print $3}'
# output is 0 |
@web1992 your shell is not work on my mac os. you can use this way:
It works on mac and linux. |
What is the purpose of the change
see #1330
MetaspaceSize
andMaxMetaspaceSize
in java8+Brief changelog
In linux and windows I use shell or batch to get java version by
java -fullversion
, you can see it in commit.In the commit ,you can find I use
JAVA_8_VERSION="180"
to compare java vesion. The reasion is that java version naming rule change in java 9.I find many
dos
symbol instart.sh
, if you runstart.sh
in linux, it may be a problem. I usedos2unix
cmd to format the file.Verifying this change
Test result in windows