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
03165717
Unverified
Commit
03165717
authored
Mar 04, 2024
by
Zzm0809
Committed by
GitHub
Mar 04, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Optimization] optimize startup scripts (#3230)
parent
24cdda47
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
auto.sh
script/bin/auto.sh
+15
-7
No files found.
script/bin/auto.sh
View file @
03165717
#!/bin/bash
#!/bin/bash
FLINK_VERSION
=
${
2
:-
1
.16
}
FLINK_VERSION
=
${
2
}
JAR_NAME
=
"dinky-admin"
if
[
-z
"
${
FLINK_VERSION
}
"
]
;
then
echo
"please specify the flink version, for example: sh auto.sh start 1.16"
exit
1
fi
APP_HOME
=
"
$(
cd
`
dirname
$0
`
;
pwd
)
"
APP_HOME
=
"
$(
cd
`
dirname
$0
`
;
pwd
)
"
EXTENDS_HOME
=
"
${
APP_HOME
}
/extends"
JAR_NAME
=
"dinky-admin"
# Use FLINK_HOME:
# Use FLINK_HOME:
CLASS_PATH
=
"
${
APP_HOME
}
:
${
APP_HOME
}
/lib/*:
${
APP_HOME
}
/config:
${
APP_HOME
}
/extends/*:
${
APP_HOME
}
/plugins/*:
${
APP_HOME
}
/customJar/*:
${
APP_HOME
}
/plugins/flink
${
FLINK_VERSION
}
/dinky/*:
${
APP_HOME
}
/plugins/flink
${
FLINK_VERSION
}
/*:
${
APP_HOME
}
/extends/flink
${
FLINK_VERSION
}
/dinky/*:
${
APP_HOME
}
/extends/flink
${
FLINK_VERSION
}
/*:
$FLINK_HOME
/lib
/*"
CLASS_PATH
=
"
${
APP_HOME
}
:
${
APP_HOME
}
/lib/*:
${
APP_HOME
}
/config:
${
EXTENDS_HOME
}
/*:
${
EXTENDS_HOME
}
/flink
${
FLINK_VERSION
}
/dinky/*:
${
EXTENDS_HOME
}
/flink
${
FLINK_VERSION
}
/*"
PID_FILE
=
"dinky.pid"
PID_FILE
=
"dinky.pid"
# JMX path
# JMX path
...
@@ -44,7 +53,7 @@ updatePid() {
...
@@ -44,7 +53,7 @@ updatePid() {
start
()
{
start
()
{
updatePid
updatePid
if
[
-z
"
$pid
"
]
;
then
if
[
-z
"
$pid
"
]
;
then
nohup
java
-Ddruid
.mysql.usePingMethod
=
false
-Dlog4j2
.isThreadContextMapInheritable
=
true
-Xms512M
-Xmx2048M
-XX
:PermSize
=
512M
-XX
:MaxPermSize
=
1024M
-XX
:+HeapDumpOnOutOfMemoryError
-Xverify
:none
-cp
"
${
CLASS_PATH
}
"
org.dinky.Dinky &
nohup
java
-Ddruid
.mysql.usePingMethod
=
false
-Dlog4j2
.isThreadContextMapInheritable
=
true
-Xms512M
-Xmx2048M
-XX
:PermSize
=
512M
-XX
:MaxPermSize
=
1024M
-XX
:+HeapDumpOnOutOfMemoryError
-Xverify
:none
-cp
"
${
CLASS_PATH
}
"
org.dinky.Dinky
>
/dev/null 2>&1
&
echo
$!
>
"
${
PID_PATH
}
"
/
${
PID_FILE
}
echo
$!
>
"
${
PID_PATH
}
"
/
${
PID_FILE
}
echo
"FLINK VERSION :
$FLINK_VERSION
"
echo
"FLINK VERSION :
$FLINK_VERSION
"
echo
"........................................Start Dinky Successfully........................................"
echo
"........................................Start Dinky Successfully........................................"
...
@@ -57,7 +66,6 @@ startOnPending() {
...
@@ -57,7 +66,6 @@ startOnPending() {
updatePid
updatePid
if
[
-z
"
$pid
"
]
;
then
if
[
-z
"
$pid
"
]
;
then
java
-Ddruid
.mysql.usePingMethod
=
false
-Xms512M
-Xmx2048M
-XX
:PermSize
=
512M
-XX
:MaxPermSize
=
1024M
-XX
:+HeapDumpOnOutOfMemoryError
-Xverify
:none
-cp
"
${
CLASS_PATH
}
"
org.dinky.Dinky
java
-Ddruid
.mysql.usePingMethod
=
false
-Xms512M
-Xmx2048M
-XX
:PermSize
=
512M
-XX
:MaxPermSize
=
1024M
-XX
:+HeapDumpOnOutOfMemoryError
-Xverify
:none
-cp
"
${
CLASS_PATH
}
"
org.dinky.Dinky
echo
"FLINK VERSION :
$FLINK_VERSION
"
echo
"........................................Start Dinky Successfully........................................"
echo
"........................................Start Dinky Successfully........................................"
else
else
echo
"Dinky pid
$pid
is in
${
PID_PATH
}
/
${
PID_FILE
}
, Please stop first !!!"
echo
"Dinky pid
$pid
is in
${
PID_PATH
}
/
${
PID_FILE
}
, Please stop first !!!"
...
@@ -67,7 +75,7 @@ startOnPending() {
...
@@ -67,7 +75,7 @@ startOnPending() {
startWithJmx
()
{
startWithJmx
()
{
updatePid
updatePid
if
[
-z
"
$pid
"
]
;
then
if
[
-z
"
$pid
"
]
;
then
nohup
java
-Ddruid
.mysql.usePingMethod
=
false
-Xms512M
-Xmx2048M
-XX
:PermSize
=
512M
-XX
:MaxPermSize
=
1024M
-XX
:+HeapDumpOnOutOfMemoryError
-Xverify
:none
"
${
JMX
}
"
-cp
"
${
CLASS_PATH
}
"
org.dinky.Dinky &
nohup
java
-Ddruid
.mysql.usePingMethod
=
false
-Xms512M
-Xmx2048M
-XX
:PermSize
=
512M
-XX
:MaxPermSize
=
1024M
-XX
:+HeapDumpOnOutOfMemoryError
-Xverify
:none
"
${
JMX
}
"
-cp
"
${
CLASS_PATH
}
"
org.dinky.Dinky
>
/dev/null 2>&1
&
# echo $! >"${PID_PATH}"/${PID_FILE}
# echo $! >"${PID_PATH}"/${PID_FILE}
updatePid
updatePid
echo
"........................................Start Dinky with Jmx Successfully.....................................
echo
"........................................Start Dinky with Jmx Successfully.....................................
...
@@ -81,7 +89,7 @@ stop() {
...
@@ -81,7 +89,7 @@ stop() {
updatePid
updatePid
pid
=
$(
cat
"
${
PID_PATH
}
"
/
${
PID_FILE
})
pid
=
$(
cat
"
${
PID_PATH
}
"
/
${
PID_FILE
})
if
[
-z
$pid
]
;
then
if
[
-z
$pid
]
;
then
echo
"Dinky pid is not exist in
${
PID_PATH
}
/
${
PID_FILE
}
"
echo
"Dinky pid is not exist in
${
PID_PATH
}
/
${
PID_FILE
}
,skip stop.
"
else
else
kill
-9
$pid
kill
-9
$pid
sleep
1
sleep
1
...
...
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