@@ -117,16 +117,6 @@ namespace rpc {
117117 HANDLER, \
118118 RayConfig::instance ().gcs_max_active_rpcs_per_handler())
119119
120- #define TASK_INFO_SERVICE_RPC_HANDLER (HANDLER ) \
121- RPC_SERVICE_HANDLER (TaskInfoGcsService, \
122- HANDLER, \
123- RayConfig::instance ().gcs_max_active_rpcs_per_handler())
124-
125- #define RAY_EVENT_EXPORT_SERVICE_RPC_HANDLER (HANDLER ) \
126- RPC_SERVICE_HANDLER (RayEventExportGcsService, \
127- HANDLER, \
128- RayConfig::instance ().gcs_max_active_rpcs_per_handler())
129-
130120#define OBJECT_INFO_SERVICE_RPC_HANDLER (HANDLER ) \
131121 RPC_SERVICE_HANDLER (ObjectInfoGcsService, \
132122 HANDLER, \
@@ -291,83 +281,8 @@ class PlacementGroupInfoGrpcService : public GrpcService {
291281 PlacementGroupInfoGcsServiceHandler &service_handler_;
292282};
293283
294- class TaskInfoGcsServiceHandler {
295- public:
296- virtual ~TaskInfoGcsServiceHandler () = default ;
297-
298- virtual void HandleAddTaskEventData (AddTaskEventDataRequest request,
299- AddTaskEventDataReply *reply,
300- SendReplyCallback send_reply_callback) = 0;
301-
302- virtual void HandleGetTaskEvents (GetTaskEventsRequest request,
303- GetTaskEventsReply *reply,
304- SendReplyCallback send_reply_callback) = 0;
305- };
306-
307- // / The `GrpcService` for `TaskInfoGcsService`.
308- class TaskInfoGrpcService : public GrpcService {
309- public:
310- // / Constructor.
311- // /
312- // / \param[in] io_service IO service to run the handler.
313- // / \param[in] handler The service handler that actually handle the requests.
314- explicit TaskInfoGrpcService (instrumented_io_context &io_service,
315- TaskInfoGcsServiceHandler &handler)
316- : GrpcService(io_service), service_handler_(handler){};
317-
318- protected:
319- grpc::Service &GetGrpcService () override { return service_; }
320-
321- void InitServerCallFactories (
322- const std::unique_ptr<grpc::ServerCompletionQueue> &cq,
323- std::vector<std::unique_ptr<ServerCallFactory>> *server_call_factories,
324- const ClusterID &cluster_id) override {
325- TASK_INFO_SERVICE_RPC_HANDLER (AddTaskEventData);
326- TASK_INFO_SERVICE_RPC_HANDLER (GetTaskEvents);
327- }
328-
329- private:
330- // / The grpc async service object.
331- TaskInfoGcsService::AsyncService service_;
332- // / The service handler that actually handle the requests.
333- TaskInfoGcsServiceHandler &service_handler_;
334- };
335-
336- class RayEventExportGcsServiceHandler {
337- public:
338- virtual ~RayEventExportGcsServiceHandler () = default ;
339- virtual void HandleAddEvents (AddEventsRequest request,
340- AddEventsReply *reply,
341- SendReplyCallback send_reply_callback) = 0;
342- };
343-
344- // / The `GrpcService` for `RayEventExportGcsService`.
345- class RayEventExportGrpcService : public GrpcService {
346- public:
347- explicit RayEventExportGrpcService (instrumented_io_context &io_service,
348- RayEventExportGcsServiceHandler &handler)
349- : GrpcService(io_service), service_handler_(handler) {}
350-
351- protected:
352- grpc::Service &GetGrpcService () override { return service_; }
353- void InitServerCallFactories (
354- const std::unique_ptr<grpc::ServerCompletionQueue> &cq,
355- std::vector<std::unique_ptr<ServerCallFactory>> *server_call_factories,
356- const ClusterID &cluster_id) override {
357- RAY_EVENT_EXPORT_SERVICE_RPC_HANDLER (AddEvents);
358- }
359-
360- private:
361- // / The grpc async service object.
362- RayEventExportGcsService::AsyncService service_;
363- // / The service handler that actually handle the requests.
364- RayEventExportGcsServiceHandler &service_handler_;
365- };
366-
367284using ActorInfoHandler = ActorInfoGcsServiceHandler;
368285using PlacementGroupInfoHandler = PlacementGroupInfoGcsServiceHandler;
369- using TaskInfoHandler = TaskInfoGcsServiceHandler;
370- using RayEventExportHandler = RayEventExportGcsServiceHandler;
371286
372287} // namespace rpc
373288} // namespace ray
0 commit comments