Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
cat支持异步线程监控 #2002
cat支持异步线程监控 #2002
Conversation
如果a和b是client,都部署在同一台机器上,同时调c(服务端)。domain、ip、hour都一样。index因为是不同的进程,就会重复。 所以加入进程pid因子。格式:domain-ip.pid-hour-index 保证唯一
This reverts commit bf174c3.
|
有一些冲突,你可以先pull master代码,fix下冲突 |
|
@youyong205 我这边看没冲突,具体是哪几个文件呢,你看还有么 |
| return executorService.invokeAny(tasks, timeout, unit); | ||
| } | ||
|
|
||
| static class ExecutorCatContext implements Cat.Context { |
blackstorm
Aug 7, 2020
•
Contributor
请问此处是否可以 lazy 初始化?
static class ExecutorCatContext implements Cat.Context {
private Map<String, String> properties;
@Override
public void addProperty(String key, String value) {
if (properties == null) properties = new HashMap<>();
properties.put(key, value);
}
@Override
public String getProperty(String key) {
if (properties == null) return null;
return properties.get(key);
}
}
请问此处是否可以 lazy 初始化?
static class ExecutorCatContext implements Cat.Context {
private Map<String, String> properties;
@Override
public void addProperty(String key, String value) {
if (properties == null) properties = new HashMap<>();
properties.put(key, value);
}
@Override
public String getProperty(String key) {
if (properties == null) return null;
return properties.get(key);
}
}
1、封装异步线程池,实现了ExecutorService。对原线程池的一层代理回调 业务逻辑仍在原线程池中
2、主线程生成消息上下文传递给子线程,子线程上报cat,并回调