File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
src/databricks/labs/ucx/hive_metastore Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -544,13 +544,27 @@ def _all_databases(self) -> list[str]:
544544 return list (self ._iterator (self ._external_catalog .listDatabases ()))
545545 return self ._include_database
546546 except Exception as err : # pylint: disable=broad-exception-caught
547+ if "py4j.security.Py4JSecurityException" in str (err ):
548+ logger .error (
549+ "Failed to list databases due to Py4JSecurityException. "
550+ "Update or reinstall UCX to resolve this issue." ,
551+ exc_info = True ,
552+ )
553+ return []
547554 logger .error (f"failed-table-crawl: listing databases -> catalog : { err } " , exc_info = True )
548555 return []
549556
550557 def _list_tables (self , database : str ) -> list [str ]:
551558 try :
552559 return list (self ._iterator (self ._external_catalog .listTables (database )))
553560 except Exception as err : # pylint: disable=broad-exception-caught
561+ if "py4j.security.Py4JSecurityException" in str (err ):
562+ logger .error (
563+ "Failed to list databases due to Py4JSecurityException. "
564+ "Update or reinstall UCX to resolve this issue." ,
565+ exc_info = True ,
566+ )
567+ return []
554568 logger .warning (f"failed-table-crawl: listing tables from database -> { database } : { err } " , exc_info = True )
555569 return []
556570
You can’t perform that action at this time.
0 commit comments