jorgehermo9 commented on code in PR #6113:
URL: https://github.com/apache/opendal/pull/6113#discussion_r2062667641


##########
core/src/services/webhdfs/core.rs:
##########
@@ -161,37 +188,13 @@ impl WebhdfsCore {
         }
     }
 
-    pub async fn webhdfs_rename_object(&self, from: &str, to: &str) -> 
Result<Response<Buffer>> {
-        let from = build_abs_path(&self.root, from);
-        let to = build_rooted_abs_path(&self.root, to);
-
-        let mut url = format!(
-            "{}/webhdfs/v1/{}?op=RENAME&destination={}",
-            self.endpoint,
-            percent_encode_path(&from),
-            percent_encode_path(&to)
-        );
-        if let Some(user) = &self.user_name {
-            url += format!("&user.name={user}").as_str();
-        }
-        if let Some(auth) = &self.auth {
-            url += &format!("&{auth}");
-        }
-
-        let req = Request::put(&url)
-            .body(Buffer::new())
-            .map_err(new_request_build_error)?;
-
-        self.info.http_client().send(req).await
-    }
-
-    pub fn webhdfs_append_request(
+    pub async fn webhdfs_append(
         &self,
-        location: &str,
+        path: &str,
         size: u64,
         body: Buffer,
-    ) -> Result<Request<Buffer>> {
-        let mut url = location.to_string();
+    ) -> Result<Response<Buffer>> {
+        let mut url = self.webhdfs_init_append(path).await?;

Review Comment:
   as `webhdfs_init_append` was only called just before `webhdfs_append` once, 
I moved it to be inside the `webhdfs_append` function 
   
![image](https://github.com/user-attachments/assets/cb12da82-e365-4fa6-8f91-f1f3043e84ed)
   



-- 
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]

Reply via email to