xloya commented on code in PR #5209:
URL: https://github.com/apache/gravitino/pull/5209#discussion_r1812500015
##########
clients/client-python/gravitino/filesystem/gvfs.py:
##########
@@ -348,11 +356,17 @@ def rm(self, path, recursive=False, maxdepth=None):
)
actual_path = context_pair.actual_file_location()
storage_type = self._recognize_storage_type(actual_path)
- context_pair.filesystem().rm(
- self._strip_storage_protocol(storage_type, actual_path),
- recursive,
- maxdepth,
- )
+ fs = context_pair.filesystem()
+
+ # S3FileSystem doesn't support maxdepth
+ if isinstance(fs, self.lazy_load_class("s3fs", "S3FileSystem")):
Review Comment:
In the latest doc, s3fs seems supports the max depth
param(https://s3fs.readthedocs.io/en/latest/api.html#s3fs.core.S3FileSystem.rm),
is there something wrong?
##########
clients/client-python/gravitino/filesystem/gvfs.py:
##########
@@ -590,7 +606,8 @@ def _convert_actual_info(
"name": path,
"size": entry["size"],
"type": entry["type"],
- "mtime": entry["mtime"],
+ # Some file systems may not support the `mtime` field.
Review Comment:
It's better to specify which file systems are not supported.
##########
clients/client-python/tests/integration/test_gvfs_with_gcs.py:
##########
@@ -129,9 +131,17 @@ def _init_test_entities(cls):
properties=cls.fileset_properties,
)
- os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = cls.key_file
- arrow_gcs_fs = GcsFileSystem()
- cls.fs = ArrowFSWrapper(arrow_gcs_fs)
+ cls.fs = GCSFileSystem(token=cls.key_file)
+
+ # Object storage like GCS does not support making directory and can only
create
Review Comment:
I saw gcsfs / s3fs supports `mkdir` according to the doc, maybe you can test
them in their expected situations:
https://gcsfs.readthedocs.io/en/latest/api.html#gcsfs.core.GCSFileSystem.mkdir,
https://s3fs.readthedocs.io/en/latest/api.html#s3fs.core.S3FileSystem.mkdir.
--
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]