String servicePath = RegistryUtils.servicePath( JOYConstants.APP_NAME, JOYConstants.APP_TYPE, instance); Map<String, ServiceRecord> hosts = RegistryUtils.listServiceRecords(registryOperations, servicePath); for (String host : hosts.keySet()) { ServiceRecord sr = hosts.get(JOYConstants.HOST);
if (!registryOperations.exists(componentsPath)) continue; Map<String, ServiceRecord> containers = RegistryUtils.listServiceRecords(registryOperations, componentsPath);
Map<String, ServiceRecord> apps = RegistryUtils.listServiceRecords(registryOperations, instancePath); for (String subAppPath : apps.keySet()) { LOG.info("existApp:" + subAppPath);
/** * List instances in the registry * @return the instance IDs * @throws IOException * @throws YarnException */ public List<String> listRegisteredSliderInstances() throws IOException, YarnException { try { Map<String, ServiceRecord> recordMap = listServiceRecords( getRegistryOperations(), serviceclassPath(currentUser(), SliderKeys.APP_TYPE)); return new ArrayList<>(recordMap.keySet()); } catch (PathNotFoundException e) { log.debug("No registry path for slider instances for current user: {}", e, e); // no entries: return an empty list return new ArrayList<>(0); } catch (IOException | YarnException e) { throw e; } catch (Exception e) { throw new IOException(e); } }
/** * List instances in the registry * @return the instance IDs * @throws IOException * @throws YarnException */ public List<String> listRegisteredSliderInstances() throws IOException, YarnException { try { Map<String, ServiceRecord> recordMap = listServiceRecords( getRegistryOperations(), serviceclassPath(currentUser(), SliderKeys.APP_TYPE)); return new ArrayList<>(recordMap.keySet()); } catch (PathNotFoundException e) { log.debug("No registry path for slider instances for current user: {}", e, e); // no entries: return an empty list return new ArrayList<>(0); } catch (IOException | YarnException e) { throw e; } catch (Exception e) { throw new IOException(e); } }
/** * List instances in the registry for the current user * @return a list of slider registry instances * @throws IOException Any IO problem ... including no path in the registry * to slider service classes for this user * @throws SliderException other failures */ public Map<String, ServiceRecord> listRegistryInstances() throws IOException, SliderException { Map<String, ServiceRecord> recordMap = listServiceRecords( getRegistryOperations(), serviceclassPath(currentUser(), SliderKeys.APP_TYPE)); return recordMap; }
/** * List instances in the registry for the current user * @return a list of slider registry instances * @throws IOException Any IO problem ... including no path in the registry * to slider service classes for this user * @throws SliderException other failures */ public Map<String, ServiceRecord> listRegistryInstances() throws IOException, SliderException { Map<String, ServiceRecord> recordMap = listServiceRecords( getRegistryOperations(), serviceclassPath(currentUser(), SliderKeys.APP_TYPE)); return recordMap; }
listServiceRecords(operations, path); if (recordMap.isEmpty()) { throw new UnknownApplicationInstanceException(
listServiceRecords(operations, path); if (recordMap.isEmpty()) { throw new UnknownApplicationInstanceException(