diff --git a/clients/filesystem-fuse/src/gravitino_fileset_filesystem.rs b/clients/filesystem-fuse/src/gravitino_fileset_filesystem.rs index ae703cd6a0a..79b098cd8ae 100644 --- a/clients/filesystem-fuse/src/gravitino_fileset_filesystem.rs +++ b/clients/filesystem-fuse/src/gravitino_fileset_filesystem.rs @@ -30,6 +30,8 @@ use std::path::{Path, PathBuf}; pub(crate) struct GravitinoFilesetFileSystem { physical_fs: Box, client: GravitinoClient, + // target_path is a absolute path in the physical filesystem that is associated with the fileset. + // e.g. fileset location : s3://bucket/path/to/file the target_path is /path/to/file target_path: PathBuf, } diff --git a/clients/filesystem-fuse/src/gvfs_creator.rs b/clients/filesystem-fuse/src/gvfs_creator.rs index 4367b47e5de..aac88ad9d08 100644 --- a/clients/filesystem-fuse/src/gvfs_creator.rs +++ b/clients/filesystem-fuse/src/gvfs_creator.rs @@ -146,6 +146,7 @@ pub fn extract_filesystem_scheme(path: &str) -> GvfsResult { #[cfg(test)] mod tests { use crate::gvfs_creator::extract_fileset; + use crate::gvfs_fuse::FileSystemSchema; #[test] fn test_extract_fileset() { @@ -155,4 +156,11 @@ mod tests { assert_eq!(schema, "s1"); assert_eq!(fileset, "fileset1"); } + + #[test] + fn test_extract_schema() { + let location = "s3://bucket/path/to/file"; + let schema = super::extract_filesystem_scheme(location).unwrap(); + assert_eq!(schema, FileSystemSchema::S3); + } } diff --git a/clients/filesystem-fuse/src/gvfs_fuse.rs b/clients/filesystem-fuse/src/gvfs_fuse.rs index fa0e9f56487..88079e99b91 100644 --- a/clients/filesystem-fuse/src/gvfs_fuse.rs +++ b/clients/filesystem-fuse/src/gvfs_fuse.rs @@ -41,6 +41,7 @@ pub(crate) enum CreateFileSystemResult { None, } +#[derive(Debug, PartialEq)] pub enum FileSystemSchema { S3, }