Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make error msgs of TaskManager more explicit #2092

Merged
merged 1 commit into from
Jul 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/client/taskmanager_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ ::openmldb::base::Status TaskManagerClient::ShowJobs(const bool only_unfinished,
}
return {response.code(), response.msg()};
} else {
return {-1, "Fail to request TaskManager server"};
return {-1, "RPC request (to TaskManager) failed"};
}
}

Expand All @@ -63,7 +63,7 @@ ::openmldb::base::Status TaskManagerClient::ShowJob(const int id, ::openmldb::ta
}
return {response.code(), response.msg()};
} else {
return {-1, "Fail to request TaskManager server"};
return {-1, "RPC request (to TaskManager) failed"};
}
}

Expand All @@ -84,7 +84,7 @@ ::openmldb::base::Status TaskManagerClient::StopJob(const int id, ::openmldb::ta
}
return {response.code(), response.msg()};
} else {
return {-1, "Fail to request TaskManager server"};
return {-1, "RPC request (to TaskManager) failed"};
}
}

Expand All @@ -110,7 +110,7 @@ ::openmldb::base::Status TaskManagerClient::RunBatchSql(const std::string& sql,
}
return ::openmldb::base::Status(response.code(), "");
} else {
return ::openmldb::base::Status(-1, "Fail to request TaskManager server");
return ::openmldb::base::Status(-1, "RPC request (to TaskManager) failed");
}
}

Expand Down Expand Up @@ -139,7 +139,7 @@ ::openmldb::base::Status TaskManagerClient::RunBatchAndShow(const std::string& s
}
return {response.code(), response.msg()};
} else {
return {-1, "Fail to request TaskManager server"};
return {-1, "RPC request (to TaskManager) failed"};
}
}

Expand Down Expand Up @@ -168,7 +168,7 @@ ::openmldb::base::Status TaskManagerClient::ImportOnlineData(const std::string&
}
return {response.code(), response.msg()};
} else {
return {-1, "Fail to request TaskManager server"};
return {-1, "RPC request (to TaskManager) failed"};
}
}

Expand Down Expand Up @@ -197,7 +197,7 @@ ::openmldb::base::Status TaskManagerClient::ImportOfflineData(const std::string&
}
return {response.code(), response.msg()};
} else {
return {-1, "Fail to request TaskManager server"};
return {-1, "RPC request (to TaskManager) failed"};
}
}

Expand Down Expand Up @@ -226,7 +226,7 @@ ::openmldb::base::Status TaskManagerClient::ExportOfflineData(const std::string&
}
return {response.code(), response.msg()};
} else {
return {-1, "Fail to request TaskManager server"};
return {-1, "RPC request (to TaskManager) failed"};
}
}

Expand All @@ -243,7 +243,7 @@ ::openmldb::base::Status TaskManagerClient::DropOfflineTable(const std::string&
if (ok) {
return {response.code(), response.msg()};
} else {
return {-1, "Fail to request TaskManager server"};
return {-1, "RPC request (to TaskManager) failed"};
}
}

Expand All @@ -266,7 +266,7 @@ std::string TaskManagerClient::GetJobLog(const int id, ::openmldb::base::Status*
}
}
status->code = -1;
status->msg = "Fail to request TaskManager server";
status->msg = "RPC request (to TaskManager) failed";
return "";
}

Expand Down