- Notifications
You must be signed in to change notification settings - Fork 44
update java version to 11 #170
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
Conversation
a2ea0f1
to 826956e
Compare Codecov Report
@@ Coverage Diff @@ ## master #170 +/- ## ============================================ - Coverage 87.34% 87.29% -0.06% - Complexity 3051 3136 +85 ============================================ Files 320 332 +12 Lines 11432 11741 +309 Branches 993 1038 +45 ============================================ + Hits 9985 10249 +264 - Misses 980 991 +11 - Partials 467 501 +34
Continue to review full report at Codecov.
|
826956e
to 58d6c95
Compare with: | ||
java-version: '8' | ||
distribution: 'adopt' | ||
distribution: 'zulu' |
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.
need to also update to java-version: '11'
?
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.
it is need to compile hugegraph-server
| ||
if (cpu != null) { | ||
EnvVar cpuLimit = new EnvVarBuilder() | ||
.withName(Constants.ENV_CPU_LIMIT) |
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.
align with new
| ||
if (memory != null) { | ||
EnvVar memoryLimit = new EnvVarBuilder() | ||
.withName(Constants.ENV_MEMORY_LIMIT) |
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.
ditto
# avoid `Runtime.getRuntime().availableProcessors()` always return 1 | ||
if [ "${DRIVE}" = "${K8S_DRIVE}" && -z "${CPU_LIMIT}"]; then | ||
CPU_COUNT="$(cat /proc/cpuinfo| grep "processor"| wc -l)" | ||
JAVA="${JAVA} -XX:ActiveProcessorCount=${CPU_COUNT}" |
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.
prefer to set to JAVA_OPTS
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.
ok
| ||
if (cpu != null) { | ||
EnvVar cpuLimit = new EnvVarBuilder() | ||
.withName(Constants.ENV_CPU_LIMIT) |
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.
add one more space
2bc6d2b
to b8f3ffa
Compare b8f3ffa
to b1b471a
Compare computer-dist/Dockerfile Outdated
FROM mcr.microsoft.com/java/jre:11-zulu-ubuntu | ||
LABEL maintainer="HugeGraph Docker Maintainers <hugegraph@googlegroups.com>" | ||
ENV JAVA_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:MaxRAMFraction=2 -XshowSettings:vm" | ||
ENV JAVA_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+UseParallelGC -XX:+UseContainerSupport -XX:MaxRAMPercentage=80" |
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.
can we add some comments why to choose ParallelGC instead of ZGC?
ded9077
to b9ad7fe
Compare computer-core/src/main/java/com/baidu/hugegraph/computer/core/config/ComputerOptions.java Outdated Show resolved Hide resolved
if [ ${CPU_COUNT} -gt ${MAX_CPU_COUNT} ]; then | ||
CPU_COUNT="$MAX_CPU_COUNT" | ||
PROCESSOR_COUNT="$(cat /proc/cpuinfo| grep "processor"| wc -l)" | ||
let MAX_PROCESSOR_COUNT=8 |
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.
the cpu number can't be greater than 8?
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.
cpu number is too more will lead to huge number of GC thread
better not more than 8, if not specify cpu limit
let MAX_CPU_COUNT=8 | ||
if [ ${CPU_COUNT} -gt ${MAX_CPU_COUNT} ]; then | ||
CPU_COUNT="$MAX_CPU_COUNT" | ||
PROCESSOR_COUNT="$(cat /proc/cpuinfo| grep "processor"| wc -l)" |
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.
expect a space before "|"
computer-dist/Dockerfile Outdated
FROM openjdk:11-jre | ||
LABEL maintainer="HugeGraph Docker Maintainers <hugegraph@googlegroups.com>" | ||
ENV JAVA_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:MaxRAMFraction=2 -XshowSettings:vm" | ||
# use ParallelGC is more friendly to olap system |
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.
use ParallelGC which is more friendly to olap system
Uh oh!
There was an error while loading. Please reload this page.