arina-ielchiieva commented on a change in pull request #2005: DRILL-7477: Allow
passing table function parameters into ANALYZE statement
URL: https://github.com/apache/drill/pull/2005#discussion_r386106553
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/WorkspaceSchemaFactory.java
##########
@@ -721,6 +692,42 @@ private FormatMatcher findMatcher(FileStatus file) {
return null;
}
+ private void setMetadataProviderManager(DrillTable table, String
tableName) {
+ if (table != null) {
+ MetadataProviderManager providerManager = null;
+
+ if (schemaConfig.getOption(ExecConstants.METASTORE_ENABLED).bool_val) {
+ try {
+ MetastoreRegistry metastoreRegistry =
plugin.getContext().getMetastoreRegistry();
+ TableInfo tableInfo = TableInfo.builder()
+ .storagePlugin(plugin.getName())
+ .workspace(schemaName)
+ .name(tableName)
+ .build();
+
+ MetastoreTableInfo metastoreTableInfo = metastoreRegistry.get()
+ .tables()
+ .basicRequests()
+ .metastoreTableInfo(tableInfo);
+ if (metastoreTableInfo.isExists()) {
+ providerManager = new
MetastoreMetadataProviderManager(metastoreRegistry, tableInfo,
+ new
MetastoreMetadataProviderConfig(schemaConfig.getOption(ExecConstants.METASTORE_USE_SCHEMA_METADATA).bool_val,
+
schemaConfig.getOption(ExecConstants.METASTORE_USE_STATISTICS_METADATA).bool_val,
+
schemaConfig.getOption(ExecConstants.METASTORE_FALLBACK_TO_FILE_METADATA).bool_val));
+ }
+ } catch (MetastoreException e) {
+ logger.warn("Exception happened during obtaining Metastore
instance.", e);
Review comment:
I think besides indicating that this is Metastore error, you should write
what happens next, for example, ... will use file system metadata provider etc.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services