Sfoglia il codice sorgente

HUE-8345 [s3] Remove log error message when S3 / ADLS not configured

jdesjean 7 anni fa
parent
commit
c374b6e052
1 ha cambiato i file con 5 aggiunte e 4 eliminazioni
  1. 5 4
      desktop/core/src/desktop/lib/fsmanager.py

+ 5 - 4
desktop/core/src/desktop/lib/fsmanager.py

@@ -33,11 +33,12 @@ FS_CACHE = {}
 DEFAULT_SCHEMA = 'hdfs'
 
 FS_GETTERS = {
-  "hdfs": cluster.get_hdfs,
-  "s3a": aws.get_s3fs if is_s3_enabled() else None,
-  "adl": azure.client.get_client if is_adls_enabled() else None
+  'hdfs': cluster.get_hdfs,
 }
-
+if is_s3_enabled():
+  FS_GETTERS['s3a'] = aws.get_s3fs
+if is_adls_enabled():
+  FS_GETTERS['adl'] = azure.client.get_client
 
 def get_filesystem(name='default'):
   """