xloya commented on code in PR #4592:
URL: https://github.com/apache/gravitino/pull/4592#discussion_r1726134292
##########
clients/filesystem-hadoop3/src/main/java/org/apache/gravitino/filesystem/hadoop/GravitinoVirtualFileSystem.java:
##########
@@ -294,7 +296,27 @@ private Path getActualPathByIdentifier(
return new Path(storageLocation);
} else {
- return new Path(virtualPath.replaceFirst(virtualLocation,
storageLocation));
+ // if the storage location ends with "/",
+ // we should handle the conversion specially
+ if (storageLocation.endsWith(SLASH)) {
+ String subPath = virtualPath.substring(virtualLocation.length());
+ // For example, if the virtual path is
`gvfs://fileset/catalog/schema/test_fileset/ttt`,
+ // and the storage location is `hdfs://cluster:8020/user/`,
+ // we should replace `gvfs://fileset/catalog/schema/test_fileset`
with
+ // `hdfs://localhost:8020/`.
Review Comment:
Fixed. It's `hdfs://localhost:8020/user` without the tailing slash, because
the virtual path `gvfs://fileset/catalog/schema/test_fileset/ttt` already has a
slash before the `ttt`.
--
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]