@Override public void buildEndpointDetails(Map<String, MonitorDetail> details) { ServiceRecord self = yarnRegistry.getSelfRegistration(); List<Endpoint> externals = self.external; for (Endpoint endpoint : externals) { String addressType = endpoint.addressType; if (AddressTypes.ADDRESS_URI.equals(addressType)) { try { List<URL> urls = RegistryTypeUtils.retrieveAddressURLs(endpoint); if (!urls.isEmpty()) { details.put(endpoint.api, new MonitorDetail(urls.get(0).toString(), true)); } } catch (InvalidRecordException | MalformedURLException ignored) { // Ignored } } } }
@Override public void buildEndpointDetails(Map<String, MonitorDetail> details) { ServiceRecord self = yarnRegistry.getSelfRegistration(); List<Endpoint> externals = self.external; for (Endpoint endpoint : externals) { String addressType = endpoint.addressType; if (AddressTypes.ADDRESS_URI.equals(addressType)) { try { List<URL> urls = RegistryTypeUtils.retrieveAddressURLs(endpoint); if (!urls.isEmpty()) { details.put(endpoint.api, new MonitorDetail(urls.get(0).toString(), true)); } } catch (InvalidRecordException | MalformedURLException ignored) { // Ignored } } } }