Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dinky
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangpeng
dinky
Commits
ee5d367b
Unverified
Commit
ee5d367b
authored
May 15, 2024
by
gaoyan
Committed by
GitHub
May 15, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bug]Fix jdk11 GC Bug (#3497)
Signed-off-by:
Zzm0809
<
934230207@qq.com
>
Co-authored-by:
Zzm0809
<
934230207@qq.com
>
parent
adfb6750
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
7 deletions
+19
-7
auto.sh
script/bin/auto.sh
+19
-7
No files found.
script/bin/auto.sh
View file @
ee5d367b
#!/bin/bash
# debug mode
#set -x
FLINK_VERSION
=
${
2
}
DINKY_HOME
=
${
DINKY_HOME
:-$(
cd
`
dirname
$0
`
;
pwd
)}
JAVA_VERSION
=
$(
java
-version
2>&1 |
sed
'1!d'
|
sed
-e
's/"//g'
|
awk
'{print $3}'
|
awk
-F
'.'
'{print $1"."$2}'
)
APP_HOME
=
"
${
DINKY_HOME
}
"
DINKY_LOG_PATH
=
"
${
APP_HOME
}
/logs
/
"
DINKY_LOG_PATH
=
"
${
APP_HOME
}
/logs"
if
[
!
-d
"
${
DINKY_LOG_PATH
}
"
]
;
then
mkdir
-p
"
${
DINKY_LOG_PATH
}
"
fi
...
...
@@ -30,6 +34,8 @@ if [ -z "${FLINK_VERSION}" ]; then
fi
fi
echo
"DINKY_HOME :
${
DINKY_HOME
}
, JAVA_VERSION :
${
JAVA_VERSION
}
, FLINK_VERSION :
${
FLINK_VERSION
}
"
# Check whether the flink version is specified
assertIsInputVersion
()
{
# If FLINK_VERSION is still empty, prompt the user to enter the Flink version
...
...
@@ -45,8 +51,14 @@ PID_FILE="dinky.pid"
# Log configuration file path
LOG_CONFIG
=
${
APP_HOME
}
/config/log4j2.xml
# JVM options G1GC and OOM dump ; Note: Do not set the DisableExplicitGC parameter. Because there is a call to System. gc() in the code.
GC_OPT
=
"-XX:+UseG1GC -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintHeapAtGC -XX:+PrintGCCause -Xloggc:
${
APP_HOME
}
/logs/gc-%t.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=20M"
if
[
${
JAVA_VERSION
}
==
"1.8"
]
;
then
# JVM options G1GC and OOM dump ; Note: Do not set the DisableExplicitGC parameter. Because there is a call to System. gc() in the code.
GC_OPT
=
"-XX:+UseG1GC -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintHeapAtGC -XX:+PrintGCCause -Xloggc:
${
APP_HOME
}
/logs/gc-%t.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=20M"
else
GC_OPT
=
"-XX:+UseG1GC -XX:+PrintGCDetails -Xloggc:
${
APP_HOME
}
/logs/gc-%t.log"
fi
# OOM dump path
OOM_OPT
=
"-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=
${
APP_HOME
}
/logs/heapdump.hprof"
# JVM parameters and log path
...
...
@@ -90,10 +102,10 @@ start() {
assertIsInputVersion
updatePid
if
[
-z
"
$pid
"
]
;
then
nohup
java
${
PARAMS_OPT
}
${
JVM_OPTS
}
${
OOM_OPT
}
${
GC_OPT
}
${
PARAMS_OPT
}
-Xverify
:none
-cp
"
${
CLASS_PATH
}
"
org.dinky.Dinky
${
JAR_PARAMS_OPT
}
>
/dev/null
2>&1 &
nohup
java
${
PARAMS_OPT
}
${
JVM_OPTS
}
${
OOM_OPT
}
${
GC_OPT
}
${
PARAMS_OPT
}
-Xverify
:none
-cp
"
${
CLASS_PATH
}
"
org.dinky.Dinky
${
JAR_PARAMS_OPT
}
>
${
DINKY_LOG_PATH
}
/dinky-start.log
2>&1 &
echo
$!
>
"
${
PID_PATH
}
"
/
${
PID_FILE
}
echo
"
FLINK VERSION :
$FLINK_VERSION
"
echo
"
........................................Start Dinky Successfully........................................
"
echo
"
........................................Start Dinky Done........................................
"
echo
"
current log path :
${
DINKY_LOG_PATH
}
/dinky-start.log , you can execute tail -fn1000
${
DINKY_LOG_PATH
}
/dinky-start.log to watch the log
"
else
echo
"Dinky pid
$pid
is in
${
PID_PATH
}
/
${
PID_FILE
}
, Please stop first !!!"
fi
...
...
@@ -114,7 +126,7 @@ startWithJmx() {
assertIsInputVersion
updatePid
if
[
-z
"
$pid
"
]
;
then
nohup
java
${
PARAMS_OPT
}
${
JVM_OPTS
}
${
OOM_OPT
}
${
GC_OPT
}
${
PARAMS_OPT
}
-Xverify
:none
"
${
JMX
}
"
-cp
"
${
CLASS_PATH
}
"
org.dinky.Dinky
${
JAR_PARAMS_OPT
}
>
/dev/null
2>&1 &
nohup
java
${
PARAMS_OPT
}
${
JVM_OPTS
}
${
OOM_OPT
}
${
GC_OPT
}
${
PARAMS_OPT
}
-Xverify
:none
"
${
JMX
}
"
-cp
"
${
CLASS_PATH
}
"
org.dinky.Dinky
${
JAR_PARAMS_OPT
}
>
${
DINKY_LOG_PATH
}
/dinky-start.log
2>&1 &
# echo $! >"${PID_PATH}"/${PID_FILE}
updatePid
echo
"........................................Start Dinky with Jmx Successfully.....................................
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment