mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00
Remove unused handler methods (#13394)
This commit is contained in:
parent
602c103eae
commit
062b7efc93
6 changed files with 0 additions and 134 deletions
|
@ -213,63 +213,6 @@ void GcsActorManager::HandleGetNamedActorInfo(
|
|||
GCS_RPC_SEND_REPLY(send_reply_callback, reply, status);
|
||||
++counts_[CountType::GET_NAMED_ACTOR_INFO_REQUEST];
|
||||
}
|
||||
void GcsActorManager::HandleRegisterActorInfo(
|
||||
const rpc::RegisterActorInfoRequest &request, rpc::RegisterActorInfoReply *reply,
|
||||
rpc::SendReplyCallback send_reply_callback) {
|
||||
ActorID actor_id = ActorID::FromBinary(request.actor_table_data().actor_id());
|
||||
RAY_LOG(DEBUG) << "Registering actor info, job id = " << actor_id.JobId()
|
||||
<< ", actor id = " << actor_id;
|
||||
const auto &actor_table_data = request.actor_table_data();
|
||||
auto on_done = [this, actor_id, actor_table_data, reply,
|
||||
send_reply_callback](const Status &status) {
|
||||
if (!status.ok()) {
|
||||
RAY_LOG(ERROR) << "Failed to register actor info: " << status.ToString()
|
||||
<< ", job id = " << actor_id.JobId() << ", actor id = " << actor_id;
|
||||
} else {
|
||||
RAY_CHECK_OK(gcs_pub_sub_->Publish(ACTOR_CHANNEL, actor_id.Hex(),
|
||||
actor_table_data.SerializeAsString(), nullptr));
|
||||
RAY_LOG(DEBUG) << "Finished registering actor info, job id = " << actor_id.JobId()
|
||||
<< ", actor id = " << actor_id;
|
||||
}
|
||||
GCS_RPC_SEND_REPLY(send_reply_callback, reply, status);
|
||||
};
|
||||
|
||||
Status status =
|
||||
gcs_table_storage_->ActorTable().Put(actor_id, actor_table_data, on_done);
|
||||
if (!status.ok()) {
|
||||
on_done(status);
|
||||
}
|
||||
++counts_[CountType::REGISTER_ACTOR_INFO_REQUEST];
|
||||
}
|
||||
|
||||
void GcsActorManager::HandleUpdateActorInfo(const rpc::UpdateActorInfoRequest &request,
|
||||
rpc::UpdateActorInfoReply *reply,
|
||||
rpc::SendReplyCallback send_reply_callback) {
|
||||
ActorID actor_id = ActorID::FromBinary(request.actor_id());
|
||||
RAY_LOG(DEBUG) << "Updating actor info, job id = " << actor_id.JobId()
|
||||
<< ", actor id = " << actor_id;
|
||||
const auto &actor_table_data = request.actor_table_data();
|
||||
auto on_done = [this, actor_id, actor_table_data, reply,
|
||||
send_reply_callback](const Status &status) {
|
||||
if (!status.ok()) {
|
||||
RAY_LOG(ERROR) << "Failed to update actor info: " << status.ToString()
|
||||
<< ", job id = " << actor_id.JobId() << ", actor id = " << actor_id;
|
||||
} else {
|
||||
RAY_CHECK_OK(gcs_pub_sub_->Publish(ACTOR_CHANNEL, actor_id.Hex(),
|
||||
actor_table_data.SerializeAsString(), nullptr));
|
||||
RAY_LOG(DEBUG) << "Finished updating actor info, job id = " << actor_id.JobId()
|
||||
<< ", actor id = " << actor_id;
|
||||
}
|
||||
GCS_RPC_SEND_REPLY(send_reply_callback, reply, status);
|
||||
};
|
||||
|
||||
Status status =
|
||||
gcs_table_storage_->ActorTable().Put(actor_id, actor_table_data, on_done);
|
||||
if (!status.ok()) {
|
||||
on_done(status);
|
||||
}
|
||||
++counts_[CountType::UPDATE_ACTOR_INFO_REQUEST];
|
||||
}
|
||||
|
||||
Status GcsActorManager::RegisterActor(const ray::rpc::RegisterActorRequest &request,
|
||||
RegisterActorCallback success_callback) {
|
||||
|
@ -1018,10 +961,6 @@ std::string GcsActorManager::DebugString() const {
|
|||
<< ", GetActorInfo request count: " << counts_[CountType::GET_ACTOR_INFO_REQUEST]
|
||||
<< ", GetNamedActorInfo request count: "
|
||||
<< counts_[CountType::GET_NAMED_ACTOR_INFO_REQUEST]
|
||||
<< ", RegisterActorInfo request count: "
|
||||
<< counts_[CountType::REGISTER_ACTOR_INFO_REQUEST]
|
||||
<< ", UpdateActorInfo request count: "
|
||||
<< counts_[CountType::UPDATE_ACTOR_INFO_REQUEST]
|
||||
<< ", Registered actors count: " << registered_actors_.size()
|
||||
<< ", Destroyed actors count: " << destroyed_actors_.size()
|
||||
<< ", Named actors count: " << named_actors_.size()
|
||||
|
|
|
@ -190,14 +190,6 @@ class GcsActorManager : public rpc::ActorInfoHandler {
|
|||
rpc::GetAllActorInfoReply *reply,
|
||||
rpc::SendReplyCallback send_reply_callback) override;
|
||||
|
||||
void HandleRegisterActorInfo(const rpc::RegisterActorInfoRequest &request,
|
||||
rpc::RegisterActorInfoReply *reply,
|
||||
rpc::SendReplyCallback send_reply_callback) override;
|
||||
|
||||
void HandleUpdateActorInfo(const rpc::UpdateActorInfoRequest &request,
|
||||
rpc::UpdateActorInfoReply *reply,
|
||||
rpc::SendReplyCallback send_reply_callback) override;
|
||||
|
||||
/// Register actor asynchronously.
|
||||
///
|
||||
/// \param request Contains the meta info to create the actor.
|
||||
|
@ -411,8 +403,6 @@ class GcsActorManager : public rpc::ActorInfoHandler {
|
|||
GET_ACTOR_INFO_REQUEST = 2,
|
||||
GET_NAMED_ACTOR_INFO_REQUEST = 3,
|
||||
GET_ALL_ACTOR_INFO_REQUEST = 4,
|
||||
REGISTER_ACTOR_INFO_REQUEST = 5,
|
||||
UPDATE_ACTOR_INFO_REQUEST = 6,
|
||||
CountType_MAX = 10,
|
||||
};
|
||||
uint64_t counts_[CountType::CountType_MAX] = {0};
|
||||
|
|
|
@ -81,27 +81,6 @@ class GcsServerTest : public ::testing::Test {
|
|||
return WaitReady(promise.get_future(), timeout_ms_);
|
||||
}
|
||||
|
||||
bool RegisterActorInfo(const rpc::RegisterActorInfoRequest &request) {
|
||||
std::promise<bool> promise;
|
||||
client_->RegisterActorInfo(
|
||||
request,
|
||||
[&promise](const Status &status, const rpc::RegisterActorInfoReply &reply) {
|
||||
RAY_CHECK_OK(status);
|
||||
promise.set_value(true);
|
||||
});
|
||||
return WaitReady(promise.get_future(), timeout_ms_);
|
||||
}
|
||||
|
||||
bool UpdateActorInfo(const rpc::UpdateActorInfoRequest &request) {
|
||||
std::promise<bool> promise;
|
||||
client_->UpdateActorInfo(request, [&promise](const Status &status,
|
||||
const rpc::UpdateActorInfoReply &reply) {
|
||||
RAY_CHECK_OK(status);
|
||||
promise.set_value(true);
|
||||
});
|
||||
return WaitReady(promise.get_future(), timeout_ms_);
|
||||
}
|
||||
|
||||
boost::optional<rpc::ActorTableData> GetActorInfo(const std::string &actor_id) {
|
||||
rpc::GetActorInfoRequest request;
|
||||
request.set_actor_id(actor_id);
|
||||
|
|
|
@ -92,26 +92,6 @@ message GetAllActorInfoReply {
|
|||
repeated ActorTableData actor_table_data = 2;
|
||||
}
|
||||
|
||||
message RegisterActorInfoRequest {
|
||||
// Data of actor.
|
||||
ActorTableData actor_table_data = 1;
|
||||
}
|
||||
|
||||
message RegisterActorInfoReply {
|
||||
GcsStatus status = 1;
|
||||
}
|
||||
|
||||
message UpdateActorInfoRequest {
|
||||
// ID of this actor.
|
||||
bytes actor_id = 1;
|
||||
// Data of actor.
|
||||
ActorTableData actor_table_data = 2;
|
||||
}
|
||||
|
||||
message UpdateActorInfoReply {
|
||||
GcsStatus status = 1;
|
||||
}
|
||||
|
||||
// Service for actor info access.
|
||||
service ActorInfoGcsService {
|
||||
// Register actor to gcs service.
|
||||
|
@ -124,10 +104,6 @@ service ActorInfoGcsService {
|
|||
rpc GetNamedActorInfo(GetNamedActorInfoRequest) returns (GetNamedActorInfoReply);
|
||||
// Get information of all actor from GCS Service.
|
||||
rpc GetAllActorInfo(GetAllActorInfoRequest) returns (GetAllActorInfoReply);
|
||||
// Register an actor to GCS Service.
|
||||
rpc RegisterActorInfo(RegisterActorInfoRequest) returns (RegisterActorInfoReply);
|
||||
// Update actor info in GCS Service.
|
||||
rpc UpdateActorInfo(UpdateActorInfoRequest) returns (UpdateActorInfoReply);
|
||||
}
|
||||
|
||||
message RegisterNodeRequest {
|
||||
|
|
|
@ -144,14 +144,6 @@ class GcsRpcClient {
|
|||
VOID_GCS_RPC_CLIENT_METHOD(ActorInfoGcsService, GetAllActorInfo,
|
||||
actor_info_grpc_client_, )
|
||||
|
||||
/// Register an actor to GCS Service.
|
||||
VOID_GCS_RPC_CLIENT_METHOD(ActorInfoGcsService, RegisterActorInfo,
|
||||
actor_info_grpc_client_, )
|
||||
|
||||
/// Update actor info in GCS Service.
|
||||
VOID_GCS_RPC_CLIENT_METHOD(ActorInfoGcsService, UpdateActorInfo,
|
||||
actor_info_grpc_client_, )
|
||||
|
||||
/// Register a node to GCS Service.
|
||||
VOID_GCS_RPC_CLIENT_METHOD(NodeInfoGcsService, RegisterNode, node_info_grpc_client_, )
|
||||
|
||||
|
|
|
@ -125,14 +125,6 @@ class ActorInfoGcsServiceHandler {
|
|||
virtual void HandleGetAllActorInfo(const GetAllActorInfoRequest &request,
|
||||
GetAllActorInfoReply *reply,
|
||||
SendReplyCallback send_reply_callback) = 0;
|
||||
|
||||
virtual void HandleRegisterActorInfo(const RegisterActorInfoRequest &request,
|
||||
RegisterActorInfoReply *reply,
|
||||
SendReplyCallback send_reply_callback) = 0;
|
||||
|
||||
virtual void HandleUpdateActorInfo(const UpdateActorInfoRequest &request,
|
||||
UpdateActorInfoReply *reply,
|
||||
SendReplyCallback send_reply_callback) = 0;
|
||||
};
|
||||
|
||||
/// The `GrpcService` for `ActorInfoGcsService`.
|
||||
|
@ -156,8 +148,6 @@ class ActorInfoGrpcService : public GrpcService {
|
|||
ACTOR_INFO_SERVICE_RPC_HANDLER(GetActorInfo);
|
||||
ACTOR_INFO_SERVICE_RPC_HANDLER(GetNamedActorInfo);
|
||||
ACTOR_INFO_SERVICE_RPC_HANDLER(GetAllActorInfo);
|
||||
ACTOR_INFO_SERVICE_RPC_HANDLER(RegisterActorInfo);
|
||||
ACTOR_INFO_SERVICE_RPC_HANDLER(UpdateActorInfo);
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Reference in a new issue