[cpp worker] support cluster mode and object Put/Get works (#9682)

This commit is contained in:
SongGuyang
2020-08-28 13:53:36 +08:00
committed by GitHub
parent 0d22c0b653
commit cb70864c04
28 changed files with 490 additions and 58 deletions
+3
View File
@@ -33,6 +33,9 @@ class Ray {
/// Initialize Ray runtime.
static void Init();
/// Shutdown Ray runtime.
static void Shutdown();
/// Store an object in the object store.
///
/// \param[in] obj The object which should be stored.
+10 -5
View File
@@ -2,22 +2,27 @@
#pragma once
#include <memory>
#include <string>
#include "ray/core.h"
namespace ray {
namespace api {
enum class RunMode { SINGLE_PROCESS, SINGLE_BOX, CLUSTER };
enum class WorkerMode { NONE, DRIVER, WORKER };
enum class RunMode { SINGLE_PROCESS, CLUSTER };
/// TODO(Guyang Song): Make configuration complete and use to initialize.
class RayConfig {
public:
WorkerMode worker_mode = WorkerMode::DRIVER;
WorkerType worker_type = WorkerType::DRIVER;
RunMode run_mode = RunMode::SINGLE_PROCESS;
std::string redis_address;
std::string redis_ip;
int redis_port = 6379;
std::string redis_password = "5241590000000000";
int node_manager_port = 62665;
static std::shared_ptr<RayConfig> GetInstance();
+4
View File
@@ -8,6 +8,10 @@
#include "ray/common/task/task_common.h"
#include "ray/common/task/task_spec.h"
#include "ray/common/task/task_util.h"
#include "ray/common/test_util.h"
#include "ray/core_worker/common.h"
#include "ray/core_worker/context.h"
#include "ray/core_worker/core_worker.h"
#include "ray/core_worker/store_provider/memory_store/memory_store.h"
#include "ray/gcs/gcs_client.h"
#include "ray/util/logging.h"