| 187 | } |
| 188 | |
| 189 | const BackendDescriptorPB* ExecutorGroup::LookUpBackendDesc( |
| 190 | const NetworkAddressPB& host) const { |
| 191 | IpAddr ip; |
| 192 | if (LookUpExecutorIp(host.hostname(), &ip)) { |
| 193 | const ExecutorGroup::Executors& be_list = GetExecutorsForHost(ip); |
| 194 | for (const BackendDescriptorPB& desc : be_list) { |
| 195 | if (desc.address() == host) return &desc; |
| 196 | } |
| 197 | } |
| 198 | return nullptr; |
| 199 | } |
| 200 | |
| 201 | const BackendDescriptorPB* ExecutorGroup::LookUpBackendDesc( |
| 202 | const UniqueIdPB& be_id) const { |