/** * Returns a list of the metadata provided by all of the Oozie Servers. Note that the metadata is cached so it may be a second * or two stale. * * @return a List of the metadata provided by all of the Oozie Servers. */ public List<ServiceInstance<Map>> getAllMetaData() { List<ServiceInstance<Map>> instances = null; if (sCache != null) { instances = sCache.getInstances(); } return instances; }
/** * Returns a list of the metadata provided by all of the Oozie Servers. Note that the metadata is cached so it may be a second * or two stale. * * @return a List of the metadata provided by all of the Oozie Servers. */ public List<ServiceInstance<Map>> getAllMetaData() { List<ServiceInstance<Map>> instances = null; if (sCache != null) { instances = sCache.getInstances(); } return instances; }
@Override public Collection<NodeEndpoint> getAvailableEndpoints() { return transform(serviceCache.getInstances(), new Function<ServiceInstance<NodeEndpoint>, NodeEndpoint>() { @Override public NodeEndpoint apply(ServiceInstance<NodeEndpoint> input) { return input.getPayload(); } }); }
@SuppressWarnings("unchecked") public void verifyDependencyPresence(String dependencyName, @SuppressWarnings("rawtypes") ServiceCache serviceCache, boolean required) { if (required) { MANDATORY_DEPENDENCY_CHECKER.checkPresence(dependencyName, serviceCache.getInstances()); } else { this.optionalDependencyChecker.checkPresence(dependencyName, serviceCache.getInstances()); } } }
@Override public void cacheChanged() { DependencyState state = this.serviceCache.getInstances().isEmpty() ? DependencyState.DISCONNECTED : DependencyState.CONNECTED; logCurrentState(state); informListeners(state); }
balancerLock.writeLock().lock(); try { List<ServiceInstance> instances = serviceCache.getInstances(); Set<TimelyBalancedHost> availableHosts = new HashSet<>(); for (ServiceInstance si : instances) {