Skip to content

Commit a3d8bd1

Browse files
obdevob-robot
authored andcommitted
Fix improperty errcode for invalid hdfs path
1 parent 6038155 commit a3d8bd1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

deps/oblib/src/lib/restore/hdfs/ob_storage_hdfs_jni_base.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,8 @@ int ObStorageHdfsBase::get_hdfs_file_meta(const ObString &uri, ObStorageObjectMe
204204
hdfsFS hdfs_fs = hdfs_client_->get_hdfs_fs();
205205
hdfsFileInfo *file_info = obHdfsGetPathInfo(hdfs_fs, path_buf_);
206206
if (OB_ISNULL(file_info)) {
207-
meta.is_exist_ = false;
208-
meta.length_ = 0;
209-
meta.type_ = ObStorageObjectMetaType::OB_OBJ_INVALID;
210-
OB_LOG(TRACE, "file info does not exist", K(ret), K(uri), K_(path_buf));
207+
ret = OB_HDFS_PATH_NOT_FOUND;
208+
OB_LOG(WARN, "failed to get file info", K(ret), K(uri), K_(path_buf));
211209
} else {
212210
meta.is_exist_ = true;
213211
if (file_info->mKind == kObjectKindDirectory) {

0 commit comments

Comments
 (0)