Skip to content

Commit

Permalink
[apache#1407] fix(rust): return error when getting data from hdfs by …
Browse files Browse the repository at this point in the history
…client side
  • Loading branch information
zuston committed Feb 5, 2024
1 parent 576a925 commit 06d4efd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions rust/experimental/server/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ pub enum WorkerError {

#[error("Hdfs native client not found for app: {0}")]
HDFS_NATIVE_CLIENT_NOT_FOUND(String),

#[error("Data should be read from hdfs in client side instead of from server side")]
READ_HDFS_DATA_NOT_FROM_SERVER,
}

impl From<AcquireError> for WorkerError {
Expand Down
4 changes: 2 additions & 2 deletions rust/experimental/server/src/store/hdfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,14 @@ impl Store for HdfsStore {
}

async fn get(&self, _ctx: ReadingViewContext) -> Result<ResponseData, WorkerError> {
todo!()
Err(WorkerError::READ_HDFS_DATA_NOT_FROM_SERVER)
}

async fn get_index(
&self,
_ctx: ReadingIndexViewContext,
) -> Result<ResponseDataIndex, WorkerError> {
todo!()
Err(WorkerError::READ_HDFS_DATA_NOT_FROM_SERVER)
}

async fn require_buffer(
Expand Down

0 comments on commit 06d4efd

Please sign in to comment.