Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#6012] feat (gvfs-fuse): Support Gravitino S3 fileset filesystem operation in gvfs fuse #6013

Open
wants to merge 83 commits into
base: branch-gvfs-fuse-dev
Choose a base branch
from

Conversation

diqiu50
Copy link
Contributor

@diqiu50 diqiu50 commented Dec 26, 2024

What changes were proposed in this pull request?

Support a Gravitino S3 fileset filesystem operation in gvfs fuse, implemented by OpenDal

Why are the changes needed?

Fix: #6012

Does this PR introduce any user-facing change?

No

How was this patch tested?

Manually test

@diqiu50 diqiu50 changed the title [#6012] feat (gvfs-fuse): Support a Gravitino S3 fileset filesystem operation in gvfs fuse [#6012] feat (gvfs-fuse): Support Gravitino S3 fileset filesystem operation in gvfs fuse Dec 26, 2024
@diqiu50 diqiu50 self-assigned this Dec 26, 2024
clients/filesystem-fuse/conf/gvfs_fuse.toml Outdated Show resolved Hide resolved
clients/filesystem-fuse/conf/gvfs_fuse.toml Outdated Show resolved Hide resolved
clients/filesystem-fuse/conf/gvfs_fuse.toml Outdated Show resolved Hide resolved
0o700,
);

const FUSE_FS_TYPE: ConfigEntity<&'static str> = ConfigEntity::new(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For naming conventions, I'd suggest we remove FUSE_ from the constant names and add DEFAULT_ to all default values for clarity.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's config entity. the default value is a member data. so the entity name use default is not good

clients/filesystem-fuse/src/config.rs Outdated Show resolved Hide resolved
clients/filesystem-fuse/src/gvfs_creator.rs Outdated Show resolved Hide resolved
clients/filesystem-fuse/src/gvfs_fuse.rs Outdated Show resolved Hide resolved
clients/filesystem-fuse/src/gvfs_fuse.rs Outdated Show resolved Hide resolved
use tokio::signal;

#[tokio::main]
async fn main() -> fuse3::Result<()> {
tracing_subscriber::fmt().init();
tokio::spawn(async { gvfs_mount("gvfs").await });

let config = AppConfig::from_file(Some("conf/gvfs_fuse.toml)"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can we ensure this relative path is always correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not implemented. we need to read config file path from app arguments.

}

async fn read_dir(&self, path: &Path) -> Result<Vec<FileStat>> {
let file_name = path.to_string_lossy().to_string();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

path might be something other than a directory?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That‘s impossible.
Actually, It is impossible to distinguish a file from a directory based on the path alone. If the wrong type is passed, an error will occur later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants