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

mikexue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-eventmesh.git


The following commit(s) were added to refs/heads/master by this push:
     new 8d6c6fd2c [ISSUE #3434]Fix Can't load the StorageResourceService plugin
     new b930bd4b8 Merge pull request #3435 from mxsm/eventmesh-bug-3434
8d6c6fd2c is described below

commit 8d6c6fd2c190ceef1d67fec4225f4e2fdd06c526
Author: mxsm <[email protected]>
AuthorDate: Sun Mar 12 21:49:09 2023 +0800

    [ISSUE #3434]Fix Can't load the StorageResourceService plugin
---
 build.gradle                                               |  3 ++-
 eventmesh-runtime/build.gradle                             |  1 +
 .../apache/eventmesh/runtime/storage/StorageResource.java  | 14 +++++++-------
 3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/build.gradle b/build.gradle
index bc2503977..498d21e5a 100644
--- a/build.gradle
+++ b/build.gradle
@@ -268,6 +268,7 @@ subprojects {
                                    "eventmesh-admin-rocketmq",
                                    "eventmesh-common",
                                    "eventmesh-connector-api",
+                                   "eventmesh-storage-api",
                                    "eventmesh-metrics-api",
                                    "eventmesh-registry-api",
                                    "eventmesh-trace-api",
@@ -509,7 +510,7 @@ subprojects {
             dependency 'org.apache.curator:curator-framework:4.0.1'
             dependency 'org.apache.curator:curator-recipes:4.0.1'
             dependency 'org.apache.curator:curator-test:2.12.0'
-            
+
             dependency "org.projectlombok:lombok:1.18.22"
             dependency "com.github.seancfoley:ipaddress:5.3.3"
             dependency "javax.annotation:javax.annotation-api:1.3.2"
diff --git a/eventmesh-runtime/build.gradle b/eventmesh-runtime/build.gradle
index c6102a100..f4ef76095 100644
--- a/eventmesh-runtime/build.gradle
+++ b/eventmesh-runtime/build.gradle
@@ -38,6 +38,7 @@ dependencies {
     implementation project(":eventmesh-common")
     implementation project(":eventmesh-spi")
     implementation project(":eventmesh-storage:eventmesh-storage-api")
+    implementation project(":eventmesh-storage:eventmesh-storage-standalone")
     implementation 
project(":eventmesh-connector-plugin:eventmesh-connector-standalone")
     implementation project(":eventmesh-security-plugin:eventmesh-security-api")
     implementation project(":eventmesh-security-plugin:eventmesh-security-acl")
diff --git 
a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/storage/StorageResource.java
 
b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/storage/StorageResource.java
index 5dd8720e6..e84b03b07 100644
--- 
a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/storage/StorageResource.java
+++ 
b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/storage/StorageResource.java
@@ -42,19 +42,19 @@ public class StorageResource {
     }
 
     public static StorageResource getInstance(String 
storageResourcePluginType) {
-        return 
STORAGE_RESOURCE_CACHE.computeIfAbsent(storageResourcePluginType, 
StorageResource::connectorResourceBuilder);
+        return 
STORAGE_RESOURCE_CACHE.computeIfAbsent(storageResourcePluginType, 
StorageResource::storageResourceBuilder);
     }
 
-    private static StorageResource connectorResourceBuilder(String 
connectorResourcePluginType) {
-        StorageResourceService connectorResourceServiceExt = 
EventMeshExtensionFactory.getExtension(StorageResourceService.class,
-            connectorResourcePluginType);
-        if (connectorResourceServiceExt == null) {
-            String errorMsg = "can't load the connectorResourceService plugin, 
please check.";
+    private static StorageResource storageResourceBuilder(String 
storageResourcePluginType) {
+        StorageResourceService storageResourceServiceExt = 
EventMeshExtensionFactory.getExtension(StorageResourceService.class,
+            storageResourcePluginType);
+        if (storageResourceServiceExt == null) {
+            String errorMsg = "can't load the StorageResourceService plugin, 
please check.";
             log.error(errorMsg);
             throw new RuntimeException(errorMsg);
         }
         StorageResource storageResource = new StorageResource();
-        storageResource.storageResourceService = connectorResourceServiceExt;
+        storageResource.storageResourceService = storageResourceServiceExt;
         return storageResource;
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to