diff --git a/core/services/webhdfs/src/core.rs b/core/services/webhdfs/src/core.rs index 6e9a97907448..6cf6ddb51376 100644 --- a/core/services/webhdfs/src/core.rs +++ b/core/services/webhdfs/src/core.rs @@ -314,7 +314,7 @@ impl WebhdfsCore { percent_encode_path(&p), ); if !start_after.is_empty() { - url += format!("&startAfter={start_after}").as_str(); + url += format!("&startAfter={}", percent_encode_path(start_after)).as_str(); } if let Some(user) = &self.user_name { url += format!("&user.name={user}").as_str(); diff --git a/core/services/webhdfs/src/writer.rs b/core/services/webhdfs/src/writer.rs index ef6650531eaf..7336689228b7 100644 --- a/core/services/webhdfs/src/writer.rs +++ b/core/services/webhdfs/src/writer.rs @@ -135,10 +135,16 @@ impl oio::BlockWrite for WebhdfsWriter { } async fn abort_block(&self, block_ids: Vec) -> Result<()> { + let Some(ref atomic_write_dir) = self.core.atomic_write_dir else { + return Err(Error::new( + ErrorKind::Unsupported, + "write multi is not supported when atomic is not set", + )); + }; for block_id in block_ids { let resp = self .core - .webhdfs_delete(&self.ctx, &block_id.to_string()) + .webhdfs_delete(&self.ctx, &format!("{atomic_write_dir}{block_id}")) .await?; match resp.status() { StatusCode::OK => {}