diqiu50 commented on code in PR #5905:
URL: https://github.com/apache/gravitino/pull/5905#discussion_r1918026613


##########
clients/filesystem-fuse/src/fuse_api_handle.rs:
##########
@@ -30,10 +30,174 @@ use fuse3::{Errno, FileType, Inode, SetAttr, Timestamp};
 use futures_util::stream;
 use futures_util::stream::BoxStream;
 use futures_util::StreamExt;
+use log::debug;
 use std::ffi::{OsStr, OsString};
 use std::num::NonZeroU32;
 use std::time::{Duration, SystemTime};
 
+pub(crate) struct FuseApiHandleDebug<T: RawFileSystem> {
+    inner: FuseApiHandle<T>,
+}
+
+impl<T: RawFileSystem> FuseApiHandleDebug<T> {
+    pub fn new(fs: T, context: FileSystemContext) -> Self {
+        Self {
+            inner: FuseApiHandle::new(fs, context),
+        }
+    }
+
+    pub async fn get_file_path(&self, file_id: u64) -> String {
+        debug!("get_file_path: file_id: {}", file_id);
+        let result = self.inner.get_file_path(file_id).await;
+        debug!("get_file_path result: {}", result);
+        result
+    }
+
+    async fn get_modified_file_stat(
+        &self,
+        file_id: u64,
+        size: Option<u64>,
+        atime: Option<Timestamp>,
+        mtime: Option<Timestamp>,
+    ) -> Result<FileStat, Errno> {
+        debug!("get_modified_file_stat: file_id: {}, size: {:?}, atime: {:?}, 
mtime: {:?}", file_id, size, atime, mtime);
+        let result = self.inner.get_modified_file_stat(file_id, size, atime, 
mtime).await;
+        debug!("get_modified_file_stat result: {:?}", result);
+        result
+    }
+}
+
+impl<T: RawFileSystem> Filesystem for FuseApiHandleDebug<T> {
+    async fn init(&self, req: Request) -> fuse3::Result<ReplyInit> {

Review Comment:
   Do you implement all the Filesystem interfaces?



-- 
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: commits-unsubscr...@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to