Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
matrix
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
mall
arch
matrix
Commits
5f09c068
Commit
5f09c068
authored
Jan 29, 2021
by
房斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开会评审的
parent
dc5ae692
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
2 deletions
+4
-2
DubboUpdata.java
matrix-gracefulshutdown/src/main/java/com/secoo/mall/dubbo/service/DubboUpdata.java
+1
-1
DubboCustomerDownHock.java
matrix-gracefulshutdown/src/main/java/com/secoo/mall/dubbo/service/impl/DubboCustomerDownHock.java
+1
-1
GracefullyShoutDown.java
matrix-gracefulshutdown/src/main/java/com/secoo/mall/dubbo/spring/boot/autoconfigure/GracefullyShoutDown.java
+2
-0
No files found.
matrix-gracefulshutdown/src/main/java/com/secoo/mall/dubbo/service/DubboUpdata.java
View file @
5f09c068
...
@@ -13,7 +13,7 @@ import org.slf4j.Logger;
...
@@ -13,7 +13,7 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
@Component
public
class
DubboUpdata
implements
UpDatas
<
ExecutorDetails
>
{
public
class
DubboUpdata
implements
UpDatas
<
ExecutorDetails
>
{
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
this
.
getClass
());
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
this
.
getClass
());
String
path
;
String
path
;
...
...
matrix-gracefulshutdown/src/main/java/com/secoo/mall/dubbo/service/impl/DubboCustomerDownHock.java
View file @
5f09c068
...
@@ -88,7 +88,7 @@ public class DubboCustomerDownHock extends AbstractStop {
...
@@ -88,7 +88,7 @@ public class DubboCustomerDownHock extends AbstractStop {
}
}
//step3 check检查
//step3 check检查
if
(
checks
!=
null
&&
checks
.
size
()>
0
)
{
if
(
checks
!=
null
&&
checks
.
size
()>
0
)
{
//
等待
//
TODO 监听hashmap的数据变化
CuratorZookeeperClient
client
=
(
CuratorZookeeperClient
)
getFieldValueByFieldName
(
"zkClient"
,
zookperRegster
);
CuratorZookeeperClient
client
=
(
CuratorZookeeperClient
)
getFieldValueByFieldName
(
"zkClient"
,
zookperRegster
);
int
sessionExpireMs
=
client
.
getUrl
().
getParameter
(
"zk.session.expire"
,
10000
);
int
sessionExpireMs
=
client
.
getUrl
().
getParameter
(
"zk.session.expire"
,
10000
);
Thread
.
sleep
(
sessionExpireMs
);
//zookper 目前最大超时时间
Thread
.
sleep
(
sessionExpireMs
);
//zookper 目前最大超时时间
...
...
matrix-gracefulshutdown/src/main/java/com/secoo/mall/dubbo/spring/boot/autoconfigure/GracefullyShoutDown.java
View file @
5f09c068
...
@@ -64,6 +64,7 @@ public class GracefullyShoutDown implements CommandLineRunner, ApplicationListen
...
@@ -64,6 +64,7 @@ public class GracefullyShoutDown implements CommandLineRunner, ApplicationListen
@Override
@Override
public
void
run
(
String
...
args
)
throws
Exception
{
public
void
run
(
String
...
args
)
throws
Exception
{
if
(
DubboShutdownHook
.
getDubboShutdownHook
()
!=
null
)
{
if
(
DubboShutdownHook
.
getDubboShutdownHook
()
!=
null
)
{
//TODO 判断是否dubbo组件,如果没有就不执行卸载和 shutDownhook
//hock卸载
//hock卸载
DubboShutdownHook
.
getDubboShutdownHook
().
unregister
();
DubboShutdownHook
.
getDubboShutdownHook
().
unregister
();
//listener 卸载
//listener 卸载
...
@@ -172,6 +173,7 @@ public class GracefullyShoutDown implements CommandLineRunner, ApplicationListen
...
@@ -172,6 +173,7 @@ public class GracefullyShoutDown implements CommandLineRunner, ApplicationListen
Iterator
<
StopService
>
it
=
ts
.
iterator
();
Iterator
<
StopService
>
it
=
ts
.
iterator
();
while
(
it
.
hasNext
())
{
while
(
it
.
hasNext
())
{
StopService
service
=
(
StopService
)
it
.
next
();
StopService
service
=
(
StopService
)
it
.
next
();
//TODO tomcator 的connector是否加载
ExecutorDetail
one
=
(
ExecutorDetail
)
service
.
stop
();
ExecutorDetail
one
=
(
ExecutorDetail
)
service
.
stop
();
if
(
one
!=
null
)
{
if
(
one
!=
null
)
{
details
.
add
(
one
);
details
.
add
(
one
);
...
...
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