From 438967543b97b971a07c36d29f3734b73fa08369 Mon Sep 17 00:00:00 2001 From: vkorukanti Date: Mon, 18 Apr 2016 07:02:51 -0700 Subject: [PATCH] DRILL-4613: Skip the plugin if it throws errors when registering schemas --- .../drill/exec/store/StoragePluginRegistryImpl.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 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 ad3858671d0..8745460e002 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 @@ -361,8 +361,13 @@ public void registerSchemas(SchemaConfig schemaConfig, SchemaPlus parent) throws } // finally register schemas with the refreshed plugins - for (StoragePlugin plugin : plugins.plugins()) { - plugin.registerSchemas(schemaConfig, parent); + for (Entry pluginEntry : plugins) { + try { + pluginEntry.getValue().registerSchemas(schemaConfig, parent); + } catch (final Exception e) { + logger.error("Failed to register schemas in plugin [ " + pluginEntry.getKey() +" ]. " + + "Continuing without the schemas in plugin.", e); + } } } catch (ExecutionSetupException e) { throw new DrillRuntimeException("Failure while updating storage plugins", e);