Fix compiler warnings in worker_cache_wrapper.h.

PiperOrigin-RevId: 260937903
This commit is contained in:
Derek Murray 2019-07-31 09:09:31 -07:00 committed by TensorFlower Gardener
parent 5820a245fa
commit b1c8e44cdd

View File

@ -29,11 +29,11 @@ class WorkerCacheWrapper : public WorkerCacheInterface {
// Updates *workers with strings naming the remote worker tasks to // Updates *workers with strings naming the remote worker tasks to
// which open channels have been established. // which open channels have been established.
virtual void ListWorkers(std::vector<string>* workers) const { void ListWorkers(std::vector<string>* workers) const override {
return wrapped_->ListWorkers(workers); return wrapped_->ListWorkers(workers);
} }
virtual void ListWorkersInJob(const string& job_name, void ListWorkersInJob(const string& job_name,
std::vector<string>* workers) const { std::vector<string>* workers) const override {
return wrapped_->ListWorkersInJob(job_name, workers); return wrapped_->ListWorkersInJob(job_name, workers);
} }
@ -41,7 +41,7 @@ class WorkerCacheWrapper : public WorkerCacheInterface {
// or can be constructed, returns a pointer to a WorkerInterface object // or can be constructed, returns a pointer to a WorkerInterface object
// wrapping that channel. The returned value must be destroyed by // wrapping that channel. The returned value must be destroyed by
// calling `this->ReleaseWorker(target, ret)` // calling `this->ReleaseWorker(target, ret)`
virtual WorkerInterface* GetOrCreateWorker(const string& target) { WorkerInterface* GetOrCreateWorker(const string& target) override {
return wrapped_->GetOrCreateWorker(target); return wrapped_->GetOrCreateWorker(target);
} }
@ -50,7 +50,7 @@ class WorkerCacheWrapper : public WorkerCacheInterface {
// TODO(jeff,sanjay): Consider moving target into WorkerInterface. // TODO(jeff,sanjay): Consider moving target into WorkerInterface.
// TODO(jeff,sanjay): Unify all worker-cache impls and factor out a // TODO(jeff,sanjay): Unify all worker-cache impls and factor out a
// per-rpc-subsystem WorkerInterface creator. // per-rpc-subsystem WorkerInterface creator.
virtual void ReleaseWorker(const string& target, WorkerInterface* worker) { void ReleaseWorker(const string& target, WorkerInterface* worker) override {
return wrapped_->ReleaseWorker(target, worker); return wrapped_->ReleaseWorker(target, worker);
} }
@ -63,29 +63,28 @@ class WorkerCacheWrapper : public WorkerCacheInterface {
// within its local environment. Returns true if *locality // within its local environment. Returns true if *locality
// was set, using only locally cached data. Returns false // was set, using only locally cached data. Returns false
// if status data for that device was not available. Never blocks. // if status data for that device was not available. Never blocks.
virtual bool GetDeviceLocalityNonBlocking(const string& device, bool GetDeviceLocalityNonBlocking(const string& device,
DeviceLocality* locality) { DeviceLocality* locality) override {
return wrapped_->GetDeviceLocalityNonBlocking(device, locality); return wrapped_->GetDeviceLocalityNonBlocking(device, locality);
} }
// Set *locality with the DeviceLocality of the specified remote device // Set *locality with the DeviceLocality of the specified remote device
// within its local environment. Callback gets Status::OK if *locality // within its local environment. Callback gets Status::OK if *locality
// was set. // was set.
virtual void GetDeviceLocalityAsync(const string& device, void GetDeviceLocalityAsync(const string& device, DeviceLocality* locality,
DeviceLocality* locality, StatusCallback done) override {
StatusCallback done) {
return wrapped_->GetDeviceLocalityAsync(device, locality, std::move(done)); return wrapped_->GetDeviceLocalityAsync(device, locality, std::move(done));
} }
// Start/stop logging activity. // Start/stop logging activity.
virtual void SetLogging(bool active) { wrapped_->SetLogging(active); } void SetLogging(bool active) override { wrapped_->SetLogging(active); }
// Discard any saved log data. // Discard any saved log data.
virtual void ClearLogs() { wrapped_->ClearLogs(); } void ClearLogs() override { wrapped_->ClearLogs(); }
// Return logs for the identified step in *ss. Any returned data will no // Return logs for the identified step in *ss. Any returned data will no
// longer be stored. // longer be stored.
virtual bool RetrieveLogs(int64 step_id, StepStats* ss) { bool RetrieveLogs(int64 step_id, StepStats* ss) override {
return wrapped_->RetrieveLogs(step_id, ss); return wrapped_->RetrieveLogs(step_id, ss);
} }