Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
diqiu50 committed Dec 31, 2024
1 parent 1d46c07 commit 816573c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clients/filesystem-fuse/src/gravitino_fileset_filesystem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ use std::path::{Path, PathBuf};
pub(crate) struct GravitinoFilesetFileSystem {
physical_fs: Box<dyn PathFileSystem>,
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,
}

Expand Down
8 changes: 8 additions & 0 deletions clients/filesystem-fuse/src/gvfs_creator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ pub fn extract_filesystem_scheme(path: &str) -> GvfsResult<FileSystemSchema> {
#[cfg(test)]
mod tests {
use crate::gvfs_creator::extract_fileset;
use crate::gvfs_fuse::FileSystemSchema;

#[test]
fn test_extract_fileset() {
Expand All @@ -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);
}
}
1 change: 1 addition & 0 deletions clients/filesystem-fuse/src/gvfs_fuse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ pub(crate) enum CreateFileSystemResult {
None,
}

#[derive(Debug, PartialEq)]
pub enum FileSystemSchema {
S3,
}
Expand Down

0 comments on commit 816573c

Please sign in to comment.