yuqi1129 commented on code in PR #5997:
URL: https://github.com/apache/gravitino/pull/5997#discussion_r1905048644
##########
clients/client-python/gravitino/filesystem/gvfs.py:
##########
@@ -918,11 +992,41 @@ def _get_gcs_filesystem(self):
raise GravitinoRuntimeException(
"Service account key is not found in the options."
)
- return importlib.import_module("gcsfs").GCSFileSystem(
- token=service_account_key_path
+ return (
+ TIME_WITHOUT_EXPIRATION,
+ importlib.import_module("gcsfs").GCSFileSystem(
+ token=service_account_key_path
+ ),
)
- def _get_s3_filesystem(self):
+ def _get_s3_filesystem(self, fileset_catalog: Catalog, identifier:
NameIdentifier):
+ try:
+ fileset: GenericFileset =
fileset_catalog.as_fileset_catalog().load_fileset(
+ NameIdentifier.of(identifier.namespace().level(2),
identifier.name())
+ )
+ credentials = fileset.support_credentials().get_credentials()
+ except (NoSuchCredentialException, CatalogNotInUseException) as e:
+ logger.warning("Failed to get credentials from fileset: %s", e)
Review Comment:
Directly throw exception??? What if the fieldset has not set credentials for
old version?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]