From 60e69be133aeb2409acd03baa0a85ccac1e5e784 Mon Sep 17 00:00:00 2001 From: linDong <56677297@qq.com> Date: Sat, 27 Jul 2024 22:39:44 +0800 Subject: [PATCH 1/3] [doc] : add committer introduction doc --- home/blog/2024-07-27-new-committer.md | 36 ++++++++++++++++++ .../2024-07-27-new-committer.md | 37 +++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 home/blog/2024-07-27-new-committer.md create mode 100644 home/i18n/zh-cn/docusaurus-plugin-content-blog/2024-07-27-new-committer.md diff --git a/home/blog/2024-07-27-new-committer.md b/home/blog/2024-07-27-new-committer.md new file mode 100644 index 00000000000..26bfc69bba6 --- /dev/null +++ b/home/blog/2024-07-27-new-committer.md @@ -0,0 +1,36 @@ +--- +title: Welcome to HertzBeat Community Committer! +author: linDong +author_title: linDong +author_url: https://github.com/Yanshuming1 +author_image_url: https://avatars.githubusercontent.com/u/30208283?v=4 +tags: [opensource, practice] +keywords: [open source monitoring system, alerting system] +--- + +![hertzBeathertzBeat](/img/blog/new-committer.png) + +> It's an honor for me to become a Committer of Apache Hertzbeat +## Personal introduction + +I graduated in 2023 and am currently working as a Java developer in an Internet company. + +## First met Apache Hertzbeat + +After graduation and working for half a year, I had the idea of getting involved in open source. However, when searching for open source projects on GitHub, I found that many communities were not very active, and the official documentation was not complete, making it quite difficult to start with the projects. Therefore, I put the matter of open source on hold for the time being. + +One day, I saw a post by Senior Xiaobao on a certain platform and was immediately intrigued. I then privately messaged Xiaobao to consult about open source matters. Senior Xiaobao was extremely enthusiastic and meticulous in explaining many aspects of open source to me and recommended the Hertzbeat project. + +## My first PR + +I downloaded the source code of Hertzbeat and compiled and tested it according to the documentation. Then, when clicking on the functions on the page, I discovered a bug in the front-end pop-up window. So, I submitted my first issue and successfully claimed this issue, thus starting my first PR. + +## Keep active in community + +After submitting the first PR, I continuously followed the issues in the Hertzbeat community and attempted to solve the existing problems. I have successively completed tasks such as specifying @people on WeChat, integrating AI, adding a PrestoDB monitor, modifying bugs, and contributing to the official website documentation. + +## Reward +After several months of contributing to open source, I have reaped a lot. I have learned the business logic in the code, code norms, some technical frameworks that I have never used before, and some algorithms. It can be said that I have benefited greatly. + +## Conclusion +Becoming a Committer of Apache Hertzbeat is a very meaningful thing for me. In the future, I will continue to contribute to the Apache Hertzbeat community. I also hope that Apache Hertzbeat can successfully graduate from the incubator and that the community will become better and better. \ No newline at end of file diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2024-07-27-new-committer.md b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2024-07-27-new-committer.md new file mode 100644 index 00000000000..463a89d1a35 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2024-07-27-new-committer.md @@ -0,0 +1,37 @@ +--- +title: 热烈欢迎 HertzBeat 小伙伴新晋社区 Committer! +author: linDong +author_title: linDong +author_url: https://github.com/Yanshuming1 +author_image_url: https://avatars.githubusercontent.com/u/131688897?v=4 +tags: [opensource, practice] +keywords: [open source monitoring system, alerting system] +--- + +![hertzBeat](/img/blog/new-committer.png) + +> 非常荣幸能成为Apache Hertzbeat的Committer +## 个人介绍 + +本人是2023年毕业,目前在一家互联网公司担任java开发工程师。 + +## 初识 Apache Hertzbeat +毕业之后,工作了半年,萌生出接触开源的想法。然而,在 GitHub 上搜索开源项目时,发现诸多社区活跃度欠佳,官方文档也不完善,致使项目上手难度颇大,因此开源之事暂且搁置。 +某天,在某平台看到小宝大佬的一个帖子,我瞬间兴趣盎然,随即私聊小宝,咨询开源相关事宜。小宝大佬极其热情且细致地为我讲解了不少开源方面的情况,并向我推荐了 Hertzbeat 这个项目。 + +## 第一个PR + +我down了 Hertzbeat 的源码,并按照文档进行编译和测试,然后在页面点击功能的时候发现了一个前端弹窗的bug,所以我提交了自己的第一个issue,并且我成功认领了此issue +于是开启了我的第一个PR。 + +## 持续贡献 + +在提交第一个 PR 之后,我持续关注 Hertzbeat 社区的 issue ,且尝试去解决当中存在的问题。相继完成了微信指定艾特人、接入 AI 、添加 PrestoDB 监控器、Bug 修改以及官网文档贡献等工作。 + +## 收获 + +经过几个月对开源的贡献,我收获满满,学习到了代码中的业务逻辑、代码规范,一些此前未曾使用过的技术框架,还有一些算法,可谓是获益良多。 + +## 结语 + +成为Apache Hertzbeat的Committer于我而言是很有意义对事情,今后我也会持续对Apache Hertzbeat社区贡献下去,也希望Apache Hertzbeat能顺利从孵化器毕业,希望社区越来越好。 \ No newline at end of file From 9b626b9326514c4ce460b6229fd8a0eba59a48b3 Mon Sep 17 00:00:00 2001 From: linDong <56677297@qq.com> Date: Sun, 28 Jul 2024 14:20:09 +0800 Subject: [PATCH 2/3] [doc] : add committer introduction doc --- .../{2024-07-27-new-committer.md => 2024-07-28-new-committer.md} | 0 .../{2024-07-27-new-committer.md => 2024-07-28-new-committer.md} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename home/blog/{2024-07-27-new-committer.md => 2024-07-28-new-committer.md} (100%) rename home/i18n/zh-cn/docusaurus-plugin-content-blog/{2024-07-27-new-committer.md => 2024-07-28-new-committer.md} (100%) diff --git a/home/blog/2024-07-27-new-committer.md b/home/blog/2024-07-28-new-committer.md similarity index 100% rename from home/blog/2024-07-27-new-committer.md rename to home/blog/2024-07-28-new-committer.md diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2024-07-27-new-committer.md b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2024-07-28-new-committer.md similarity index 100% rename from home/i18n/zh-cn/docusaurus-plugin-content-blog/2024-07-27-new-committer.md rename to home/i18n/zh-cn/docusaurus-plugin-content-blog/2024-07-28-new-committer.md From aa4c9b87df4677f04cd58f9d00a3afe170a659a5 Mon Sep 17 00:00:00 2001 From: linDong <56677297@qq.com> Date: Mon, 23 Sep 2024 23:38:48 +0800 Subject: [PATCH 3/3] [improve]:improve plugin --- .../service/impl/PluginServiceImpl.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/manager/src/main/java/org/apache/hertzbeat/manager/service/impl/PluginServiceImpl.java b/manager/src/main/java/org/apache/hertzbeat/manager/service/impl/PluginServiceImpl.java index 28da149cf59..c1b52d2703f 100644 --- a/manager/src/main/java/org/apache/hertzbeat/manager/service/impl/PluginServiceImpl.java +++ b/manager/src/main/java/org/apache/hertzbeat/manager/service/impl/PluginServiceImpl.java @@ -123,6 +123,7 @@ public void deletePlugins(Set ids) { plugin.setEnableStatus(false); updateStatus(plugin); } + // reload classloader loadJarToClassLoader(); for (PluginMetadata plugin : plugins) { try { @@ -146,8 +147,7 @@ public void deletePlugins(Set ids) { } pluginParamDao.deletePluginParamsByPluginMetadataIdIn(ids); syncPluginStatus(); - // reload classloader - loadJarToClassLoader(); + } /** @@ -167,7 +167,7 @@ public void updateStatus(PluginMetadata plugin) { PluginMetadata metadata = pluginMetadata.get(); metadata.setEnableStatus(plugin.getEnableStatus()); metadataDao.save(metadata); - syncPluginStatus(); + syncSinglePluginStatus(metadata); } else { throw new IllegalArgumentException("The plugin is not existed"); } @@ -368,6 +368,18 @@ private void syncPluginStatus() { ITEM_TO_PLUGINMETADATAID_MAP.putAll(itemToPluginMetadataIdMap); } + private void syncSinglePluginStatus(PluginMetadata plugin) { + if (plugin == null || CollectionUtils.isEmpty(plugin.getItems())){ + return; + } + for (PluginItem item : plugin.getItems()) { + PLUGIN_ENABLE_STATUS.put(item.getClassIdentifier(), plugin.getEnableStatus()); + ITEM_TO_PLUGINMETADATAID_MAP.put(item.getClassIdentifier(), plugin.getId()); + } + + + } + @PostConstruct private void initParams() { try {