diqiu50 commented on code in PR #5835:
URL: https://github.com/apache/gravitino/pull/5835#discussion_r1886088375
##########
clients/filesystem-fuse/src/filesystem.rs:
##########
@@ -32,33 +32,33 @@ pub(crate) type Result<T> = std::result::Result<T, Errno>;
#[async_trait]
pub(crate) trait RawFileSystem: Send + Sync {
/// Init the file system
- async fn init(&self);
+ async fn init(&self) -> Result<()>;
- /// Get the file path by file id
+ /// Get the file path by file id, if the file id is valid, return the file
path
async fn get_file_path(&self, file_id: u64) -> String;
- /// Validate the file id and file handle, if the file id or file handle is
invalid, return error
+ /// Validate the file id and file handle, if the file id and file handle
is valid, return success
async fn valid_file_id(&self, file_id: u64, fh: u64) -> Result<()>;
- /// Get the file stat by file id
+ /// Get the file stat by file id. if the file id is valid, return the file
stat
async fn stat(&self, file_id: u64) -> Result<FileStat>;
- /// Get the file stat by parent file id and file name
+ /// Lookup the file by parent file id and file name, if the file is exist,
return the file stat
async fn lookup(&self, parent_file_id: u64, name: &str) ->
Result<FileStat>;
- /// Read the directory by file id
+ /// Read the directory by file id, if the file id is a valid directory,
return the file stat list
async fn read_dir(&self, dir_file_id: u64) -> Result<Vec<FileStat>>;
- /// Open the file by file id and flags
+ /// Open the file by file id and flags, if the file id is a valid file,
return the file handle
async fn open_file(&self, file_id: u64, flags: u32) -> Result<FileHandle>;
- /// Open the directory by file id and flags
+ /// Open the directory by file id and flags, if successful, return the
file handle
async fn open_dir(&self, file_id: u64, flags: u32) -> Result<FileHandle>;
- /// Create the file by parent file id and file name and flags
+ /// Create the file by parent file id and file name and flags, if
successful, return the file handle
async fn create_file(&self, parent_file_id: u64, name: &str, flags: u32)
-> Result<FileHandle>;
- /// Create the directory by parent file id and file name
+ /// Create the directory by parent file id and file name, if successful,
return the file id
Review Comment:
use u64 is ok. It shouldn't be necessary.
--
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]