forked from mindspore-Ecosystem/mindspore
fixed cluster state
This commit is contained in:
parent
430c03f3c9
commit
7f66682742
|
@ -475,7 +475,9 @@ void AbstractNode::ProcessSendMetadata(std::shared_ptr<TcpConnection> conn, std:
|
|||
send_meta_message.ParseFromArray(data, size);
|
||||
worker_num_ = send_meta_message.worker_num();
|
||||
server_num_ = send_meta_message.server_num();
|
||||
MS_LOG(WARNING) << "The send metadata worker num:" << worker_num_ << ", server num:" << server_num_;
|
||||
current_cluster_state_ = send_meta_message.cluster_state();
|
||||
MS_LOG(INFO) << "The send metadata worker num:" << worker_num_ << ", server num:" << server_num_
|
||||
<< ", cluster state is:" << current_cluster_state_;
|
||||
|
||||
nodes_address_.clear();
|
||||
for (const auto &it : send_meta_message.servers_meta()) {
|
||||
|
|
|
@ -119,6 +119,8 @@ message SendMetadataMessage {
|
|||
int32 worker_num = 2;
|
||||
// the current server number.
|
||||
int32 server_num = 3;
|
||||
// the current cluster state.
|
||||
ClusterState cluster_state = 4;
|
||||
}
|
||||
|
||||
message FinishMessage {
|
||||
|
|
|
@ -239,6 +239,7 @@ void SchedulerNode::SendMetadata(const std::shared_ptr<TcpClient> &client) {
|
|||
std::vector<ServersMeta> servers_meta_list = node_manager_.FetchServersMeta();
|
||||
send_metadata_message.set_worker_num(node_manager_.worker_num());
|
||||
send_metadata_message.set_server_num(node_manager_.server_num());
|
||||
send_metadata_message.set_cluster_state(node_manager_.GetClusterState());
|
||||
|
||||
*send_metadata_message.mutable_servers_meta() = {servers_meta_list.begin(), servers_meta_list.end()};
|
||||
|
||||
|
|
Loading…
Reference in New Issue