use of org.apache.twill.discovery.ServiceDiscovered in project cdap by caskdata.
the class DefaultServiceManager method getServiceURL.
@Override
public URL getServiceURL(long timeout, TimeUnit timeoutUnit) {
String discoveryName = String.format("service.%s.%s.%s", namespace, applicationId, serviceName);
ServiceDiscovered discovered = discoveryServiceClient.discover(discoveryName);
return createURL(new RandomEndpointStrategy(discovered).pick(timeout, timeoutUnit), applicationId, serviceName);
}
Aggregations