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

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


The following commit(s) were added to refs/heads/master by this push:
     new 9c591b4388 DRILL-8468: Drill doesn't perform 
drill.exec.storage.action_on_plugins_override_file action (#2859)
9c591b4388 is described below

commit 9c591b4388056e904f5fa1db93e9fd0b94e8862a
Author: Maksym Rymar <[email protected]>
AuthorDate: Wed Jan 3 06:13:34 2024 +0200

    DRILL-8468: Drill doesn't perform 
drill.exec.storage.action_on_plugins_override_file action (#2859)
---
 .../apache/drill/exec/store/StoragePluginRegistryImpl.java    | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git 
a/exec/java-exec/src/main/java/org/apache/drill/exec/store/StoragePluginRegistryImpl.java
 
b/exec/java-exec/src/main/java/org/apache/drill/exec/store/StoragePluginRegistryImpl.java
index 3105900583..f4afc0f478 100644
--- 
a/exec/java-exec/src/main/java/org/apache/drill/exec/store/StoragePluginRegistryImpl.java
+++ 
b/exec/java-exec/src/main/java/org/apache/drill/exec/store/StoragePluginRegistryImpl.java
@@ -291,16 +291,14 @@ public class StoragePluginRegistryImpl implements 
StoragePluginRegistry {
     try {
       for (ConnectorLocator locator : locators) {
         StoragePlugins locatorPlugins = locator.bootstrapPlugins();
-        if (locatorPlugins != null) {
-          bootstrapPlugins.putAll(locatorPlugins);
-        }
+        bootstrapPlugins.putAll(locatorPlugins);
       }
     } catch (IOException e) {
       throw new IllegalStateException(
           "Failure initializing the plugin store. Drillbit exiting.", e);
     }
     pluginStore.putAll(bootstrapPlugins);
-    locators.stream().forEach(loc -> loc.onUpgrade());
+    locators.forEach(ConnectorLocator::onUpgrade);
   }
 
   /**
@@ -311,9 +309,7 @@ public class StoragePluginRegistryImpl implements 
StoragePluginRegistry {
     StoragePlugins upgraded = new StoragePlugins();
     for (ConnectorLocator locator : locators) {
       StoragePlugins locatorPlugins = locator.updatedPlugins();
-      if (upgraded != null) {
-        upgraded.putAll(locatorPlugins);
-      }
+      upgraded.putAll(locatorPlugins);
     }
     if (upgraded.isEmpty()) {
       return;
@@ -325,6 +321,7 @@ public class StoragePluginRegistryImpl implements 
StoragePluginRegistry {
       }
       pluginStore.put(newPlugin.getKey(), newPlugin.getValue());
     }
+    locators.forEach(ConnectorLocator::onUpgrade);
   }
 
   /**

Reply via email to