This is an automated email from the ASF dual-hosted git repository.

xuanwo pushed a commit to branch poll-write
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git


The following commit(s) were added to refs/heads/poll-write by this push:
     new 9d98930d7 Fix build
9d98930d7 is described below

commit 9d98930d7a1a7cc8dfaab7b521d2223289f32d14
Author: Xuanwo <[email protected]>
AuthorDate: Mon Sep 11 17:33:47 2023 +0800

    Fix build
    
    Signed-off-by: Xuanwo <[email protected]>
---
 core/src/services/hdfs/writer.rs | 5 ++++-
 core/src/services/sftp/writer.rs | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/core/src/services/hdfs/writer.rs b/core/src/services/hdfs/writer.rs
index f2725813c..536b264ad 100644
--- a/core/src/services/hdfs/writer.rs
+++ b/core/src/services/hdfs/writer.rs
@@ -45,7 +45,10 @@ impl oio::Write for HdfsWriter<hdrs::AsyncFile> {
     }
 
     fn poll_abort(&mut self, _: &mut Context<'_>) -> Poll<Result<()>> {
-        Poll::Ready(Ok(()))
+        Poll::Ready(Err(Error::new(
+            ErrorKind::Unsupported,
+            "HdfsWriter doesn't support abort",
+        )))
     }
 
     fn poll_close(&mut self, cx: &mut Context<'_>) -> Poll<Result<()>> {
diff --git a/core/src/services/sftp/writer.rs b/core/src/services/sftp/writer.rs
index 157c2cfa4..e2faf80e2 100644
--- a/core/src/services/sftp/writer.rs
+++ b/core/src/services/sftp/writer.rs
@@ -51,7 +51,10 @@ impl oio::Write for SftpWriter {
     }
 
     fn poll_abort(&mut self, _: &mut Context<'_>) -> Poll<Result<()>> {
-        Poll::Ready(Ok(()))
+        Poll::Ready(Err(Error::new(
+            ErrorKind::Unsupported,
+            "HdfsWriter doesn't support abort",
+        )))
     }
 }
 

Reply via email to