jerryshao commented on code in PR #4592:
URL: https://github.com/apache/gravitino/pull/4592#discussion_r1728217630
##########
clients/filesystem-hadoop3/src/test/java/org/apache/gravitino/filesystem/hadoop/TestGvfsBase.java:
##########
@@ -607,4 +651,52 @@ public void testGetDefaultBlockSize() throws IOException {
assertEquals(32 * 1024 * 1024,
fs.getDefaultBlockSize(managedFilesetPath));
}
}
+
+ @Test
+ public void testConvertFileStatusPathPrefix() throws IOException {
+ try (GravitinoVirtualFileSystem fs =
+ (GravitinoVirtualFileSystem) managedFilesetPath.getFileSystem(conf)) {
+ FileStatus fileStatus =
+ new FileStatus(1024, false, 1, 32 * 1024 * 1024, 1024, new
Path("hdfs://hive:9000/test"));
+ // storage location end with "/"
+ String storageLocation = "hdfs://hive:9000/";
+ String virtualLocation = "gvfs://fileset/test_catalog/tmp/test_fileset";
Review Comment:
> the tailing slash will be truncated by Hadoop path class.
What if for the python code, do we have similar guarantees?
--
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]