Skip to content

Commit

Permalink
fix: make error msgs of TaskManager more explicit (#2092)
Browse files Browse the repository at this point in the history
  • Loading branch information
hezean authored Jul 6, 2022
1 parent a022f68 commit 964a9b9
Showing 1 changed file with 10 additions and 10 deletions.
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

0 comments on commit 964a9b9

Please sign in to comment.