fix naming Pull -> Request

This commit is contained in:
Robert Nishihara 2016-04-06 22:06:53 -07:00
parent d8f7a0e2e4
commit 6a5eeec86b
4 changed files with 8 additions and 8 deletions

View file

@ -32,7 +32,7 @@ service Scheduler {
// Request an object reference for an object that will be pushed to an object store // Request an object reference for an object that will be pushed to an object store
rpc PushObj(PushObjRequest) returns (PushObjReply); rpc PushObj(PushObjRequest) returns (PushObjReply);
// Request delivery of an object from an object store that holds the object to the local object store // Request delivery of an object from an object store that holds the object to the local object store
rpc PullObj(PullObjRequest) returns (AckReply); // TODO(pcm): rename to RequestObj and change documentation rpc RequestObj(RequestObjRequest) returns (AckReply);
// Used by an object store to tell the scheduler that an object is ready (i.e. has been finalized and can be shared) // Used by an object store to tell the scheduler that an object is ready (i.e. has been finalized and can be shared)
rpc ObjReady(ObjReadyRequest) returns (AckReply); rpc ObjReady(ObjReadyRequest) returns (AckReply);
// Used by the worker to report back and ask for more work // Used by the worker to report back and ask for more work
@ -75,9 +75,9 @@ message RemoteCallReply {
repeated uint64 result = 1; // Object references of the function return values repeated uint64 result = 1; // Object references of the function return values
} }
message PullObjRequest { message RequestObjRequest {
uint64 workerid = 1; // Worker that tries to pull the object uint64 workerid = 1; // Worker that tries to request the object
uint64 objref = 2; // Object reference of the object being pulled uint64 objref = 2; // Object reference of the object being requested
} }
message PushObjRequest { message PushObjRequest {

View file

@ -38,7 +38,7 @@ Status SchedulerService::PushObj(ServerContext* context, const PushObjRequest* r
return Status::OK; return Status::OK;
} }
Status SchedulerService::PullObj(ServerContext* context, const PullObjRequest* request, AckReply* reply) { Status SchedulerService::RequestObj(ServerContext* context, const RequestObjRequest* request, AckReply* reply) {
objtable_lock_.lock(); objtable_lock_.lock();
size_t size = objtable_.size(); size_t size = objtable_.size();
objtable_lock_.unlock(); objtable_lock_.unlock();

View file

@ -39,7 +39,7 @@ class SchedulerService : public Scheduler::Service {
public: public:
Status RemoteCall(ServerContext* context, const RemoteCallRequest* request, RemoteCallReply* reply) override; Status RemoteCall(ServerContext* context, const RemoteCallRequest* request, RemoteCallReply* reply) override;
Status PushObj(ServerContext* context, const PushObjRequest* request, PushObjReply* reply) override; Status PushObj(ServerContext* context, const PushObjRequest* request, PushObjReply* reply) override;
Status PullObj(ServerContext* context, const PullObjRequest* request, AckReply* reply) override; Status RequestObj(ServerContext* context, const RequestObjRequest* request, AckReply* reply) override;
Status RegisterObjStore(ServerContext* context, const RegisterObjStoreRequest* request, RegisterObjStoreReply* reply) override; Status RegisterObjStore(ServerContext* context, const RegisterObjStoreRequest* request, RegisterObjStoreReply* reply) override;
Status RegisterWorker(ServerContext* context, const RegisterWorkerRequest* request, RegisterWorkerReply* reply) override; Status RegisterWorker(ServerContext* context, const RegisterWorkerRequest* request, RegisterWorkerReply* reply) override;
Status RegisterFunction(ServerContext* context, const RegisterFunctionRequest* request, AckReply* reply) override; Status RegisterFunction(ServerContext* context, const RegisterFunctionRequest* request, AckReply* reply) override;

View file

@ -37,12 +37,12 @@ void Worker::register_worker(const std::string& worker_address, const std::strin
} }
void Worker::request_object(ObjRef objref) { void Worker::request_object(ObjRef objref) {
PullObjRequest request; RequestObjRequest request;
request.set_workerid(workerid_); request.set_workerid(workerid_);
request.set_objref(objref); request.set_objref(objref);
AckReply reply; AckReply reply;
ClientContext context; ClientContext context;
Status status = scheduler_stub_->PullObj(&context, request, &reply); Status status = scheduler_stub_->RequestObj(&context, request, &reply);
return; return;
} }