document and clean up orchestra protocol buffer specification

This commit is contained in:
Philipp Moritz
2016-03-25 13:46:12 -07:00
parent 16d91af7b8
commit 4f5a637a8f
4 changed files with 139 additions and 122 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ ObjStoreService::ObjStoreService(const std::string& objstore_address, std::share
recv_queue_.connect(std::string("queue:") + objstore_address + std::string(":obj"), true);
ClientContext context;
RegisterObjStoreRequest request;
request.set_address(objstore_address);
request.set_objstore_address(objstore_address);
RegisterObjStoreReply reply;
scheduler_stub_->RegisterObjStore(&context, request, &reply);
objstoreid_ = reply.objstoreid();
+2 -5
View File
@@ -59,9 +59,9 @@ Status SchedulerService::PullObj(ServerContext* context, const PullObjRequest* r
Status SchedulerService::RegisterObjStore(ServerContext* context, const RegisterObjStoreRequest* request, RegisterObjStoreReply* reply) {
std::lock_guard<std::mutex> objstore_lock(objstores_lock_);
ObjStoreId objstoreid = objstores_.size();
auto channel = grpc::CreateChannel(request->address(), grpc::InsecureChannelCredentials());
auto channel = grpc::CreateChannel(request->objstore_address(), grpc::InsecureChannelCredentials());
objstores_.push_back(ObjStoreHandle());
objstores_[objstoreid].address = request->address();
objstores_[objstoreid].address = request->objstore_address();
objstores_[objstoreid].channel = channel;
objstores_[objstoreid].objstore_stub = ObjStore::NewStub(channel);
reply->set_objstoreid(objstoreid);
@@ -263,9 +263,6 @@ void SchedulerService::register_function(const std::string& name, WorkerId worke
}
void SchedulerService::debug_info(const SchedulerDebugInfoRequest& request, SchedulerDebugInfoReply* reply) {
if (request.do_scheduling()) {
schedule();
}
fntable_lock_.lock();
auto function_table = reply->mutable_function_table();
for (const auto& entry : fntable_) {