Skip to content
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

cat支持异步线程监控 #2002

Open
wants to merge 7 commits into
base: master
from
Open

cat支持异步线程监控 #2002

wants to merge 7 commits into from

Conversation

@lhm343
Copy link
Contributor

@lhm343 lhm343 commented Jun 18, 2020

1、封装异步线程池,实现了ExecutorService。对原线程池的一层代理回调 业务逻辑仍在原线程池中
2、主线程生成消息上下文传递给子线程,子线程上报cat,并回调

lhm343 added 5 commits May 31, 2019
如果a和b是client,都部署在同一台机器上,同时调c(服务端)。domain、ip、hour都一样。index因为是不同的进程,就会重复。
所以加入进程pid因子。格式:domain-ip.pid-hour-index 保证唯一
This reverts commit bf174c3.
@youyong205
Copy link
Collaborator

@youyong205 youyong205 commented Jun 22, 2020

有一些冲突,你可以先pull master代码,fix下冲突

@lhm343
Copy link
Contributor Author

@lhm343 lhm343 commented Jun 22, 2020

@youyong205 我这边看没冲突,具体是哪几个文件呢,你看还有么

@lhm343 lhm343 closed this Jun 23, 2020
@lhm343 lhm343 reopened this Jun 23, 2020
return executorService.invokeAny(tasks, timeout, unit);
}

static class ExecutorCatContext implements Cat.Context {

This comment has been minimized.

@blackstorm

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);
        }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.