You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@amoro.apache.org by ji...@apache.org on 2024/09/14 06:12:08 UTC

(amoro) branch master updated: [AMORO-3199] Avoid loading the same plugin repeatedly (#3200)

This is an automated email from the ASF dual-hosted git repository.

jinsongzhou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/amoro.git


The following commit(s) were added to refs/heads/master by this push:
     new 43ee3c9db [AMORO-3199] Avoid loading the same plugin repeatedly (#3200)
43ee3c9db is described below

commit 43ee3c9db2db1d36deb76c76a1d6ca425a8233e8
Author: Marig_Weizhi <ma...@foxmail.com>
AuthorDate: Sat Sep 14 14:12:04 2024 +0800

    [AMORO-3199] Avoid loading the same plugin repeatedly (#3200)
    
    * fix plugins load
    
    * Avoid loading the same plugin repeatedly
---
 .../java/org/apache/amoro/server/manager/AbstractPluginManager.java     | 2 +-
 dist/src/main/amoro-bin/conf/plugins/metric-reporters.yaml              | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/amoro-ams/src/main/java/org/apache/amoro/server/manager/AbstractPluginManager.java b/amoro-ams/src/main/java/org/apache/amoro/server/manager/AbstractPluginManager.java
index 3dd6b4a26..665d74d7a 100644
--- a/amoro-ams/src/main/java/org/apache/amoro/server/manager/AbstractPluginManager.java
+++ b/amoro-ams/src/main/java/org/apache/amoro/server/manager/AbstractPluginManager.java
@@ -287,7 +287,7 @@ public abstract class AbstractPluginManager<T extends ActivePlugin> implements P
     loader.forEach(
         plugin -> {
           T exists = foundedPlugins.putIfAbsent(plugin.name(), plugin);
-          if (exists != null) {
+          if (exists != null && !exists.getClass().equals(plugin.getClass())) {
             throw new IllegalStateException(
                 "Plugin name "
                     + plugin.name()
diff --git a/dist/src/main/amoro-bin/conf/plugins/metric-reporters.yaml b/dist/src/main/amoro-bin/conf/plugins/metric-reporters.yaml
index 52c8924f3..7ddc129f7 100644
--- a/dist/src/main/amoro-bin/conf/plugins/metric-reporters.yaml
+++ b/dist/src/main/amoro-bin/conf/plugins/metric-reporters.yaml
@@ -23,7 +23,7 @@ metric-reporters:
     enabled: true                         # if false, overview page will not fetch data
     properties:
       refresh-interval: 180000            # 3 min
-      max-history-records: 3360              # Keep 7 days history by default, 7 * 24 * 60 / 3 = 3360
+      max-history-records: 3360           # Keep 7 days history by default, 7 * 24 * 60 / 3 = 3360
 
 #  - name: prometheus-exporter            # configs for prometheus exporter
 #    enabled: false