Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GCS] Use new interface class GcsClient in ray #6805

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rm friend class of RedisGcsClient
  • Loading branch information
micafan committed Jan 16, 2020
commit 6170c144bc4076577e116781689261fe9caef58f
40 changes: 10 additions & 30 deletions src/ray/gcs/redis_gcs_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,6 @@ namespace gcs {
class RedisContext;

class RAY_EXPORT RedisGcsClient : public GcsClient {
// TODO(micafan) Will remove those friend classes after we replace RedisGcsClient
// with interface class GcsClient in raylet.
friend class RedisActorInfoAccessor;
friend class RedisJobInfoAccessor;
friend class RedisTaskInfoAccessor;
friend class RedisNodeInfoAccessor;
friend class RedisObjectInfoAccessor;
friend class RedisErrorInfoAccessor;
friend class RedisStatsInfoAccessor;
friend class RedisWorkerInfoAccessor;
friend class SubscriptionExecutorTest;
friend class LogSubscribeTestHelper;
friend class LogLookupTestHelper;
friend class LogDeleteTestHelper;
friend class TaskTableTestHelper;
friend class ClientTableTestHelper;
friend class SetTestHelper;
friend class HashTableTestHelper;
friend class ActorCheckpointIdTable;

public:
/// Constructor of RedisGcsClient.
/// Connect() must be called(and return ok) before you call any other methods.
Expand Down Expand Up @@ -66,6 +46,11 @@ class RAY_EXPORT RedisGcsClient : public GcsClient {
/// Disconnect with GCS Service. Non-thread safe.
void Disconnect();

/// Returns debug string for class.
///
/// \return string.
std::string DebugString() const;

// We also need something to export generic code to run on workers from the
// driver (to set the PYTHONPATH)

Expand All @@ -77,16 +62,6 @@ class RAY_EXPORT RedisGcsClient : public GcsClient {
std::vector<std::shared_ptr<RedisContext>> shard_contexts() { return shard_contexts_; }
std::shared_ptr<RedisContext> primary_context() { return primary_context_; }

/// Returns debug string for class.
///
/// \return string.
std::string DebugString() const;

private:
/// Attach this client to an asio event loop. Note that only
/// one event loop should be attached at a time.
void Attach(boost::asio::io_service &io_service);

/// The following three methods will be deprecated, use method Actors() instead.
ActorTable &actor_table();
ActorCheckpointTable &actor_checkpoint_table();
Expand All @@ -112,6 +87,11 @@ class RAY_EXPORT RedisGcsClient : public GcsClient {
/// This method will be deprecated, use method Workers() instead.
WorkerFailureTable &worker_failure_table();

private:
/// Attach this client to an asio event loop. Note that only
/// one event loop should be attached at a time.
void Attach(boost::asio::io_service &io_service);

// GCS command type. If CommandType::kChain, chain-replicated versions of the tables
// might be used, if available.
CommandType command_type_{CommandType::kUnknown};
Expand Down