diff --git a/src/ray/core_worker/core_worker.cc b/src/ray/core_worker/core_worker.cc index 3a544191d..aa856a8ce 100644 --- a/src/ray/core_worker/core_worker.cc +++ b/src/ray/core_worker/core_worker.cc @@ -6,6 +6,7 @@ #include "ray/core_worker/context.h" #include "ray/core_worker/transport/direct_actor_transport.h" #include "ray/core_worker/transport/raylet_transport.h" +#include "ray/gcs/gcs_client/service_based_gcs_client.h" #include "ray/util/util.h" namespace { @@ -99,7 +100,11 @@ CoreWorker::CoreWorker(const WorkerType worker_type, const Language language, } RAY_LOG(INFO) << "Initializing worker " << worker_context_.GetWorkerID(); // Initialize gcs client. - gcs_client_ = std::make_shared(gcs_options); + if (getenv("RAY_GCS_SERVICE_ENABLED") != nullptr) { + gcs_client_ = std::make_shared(gcs_options); + } else { + gcs_client_ = std::make_shared(gcs_options); + } RAY_CHECK_OK(gcs_client_->Connect(io_service_)); actor_manager_ = std::unique_ptr(new ActorManager(gcs_client_->Actors()));