String appPath = RegistryUtils.serviceclassPath( JOYConstants.APP_NAME, JOYConstants.APP_TYPE); String path = RegistryUtils.servicePath(
String appPath = RegistryUtils.serviceclassPath( JOYConstants.APP_TYPE, JOYConstants.EMPTY); String path = RegistryUtils.serviceclassPath( JOYConstants.APP_TYPE, instanceName); for (String instance : instanceNames) { String servicePath = RegistryUtils.serviceclassPath( JOYConstants.APP_TYPE, instance);
String instancePath = RegistryUtils.serviceclassPath( JOYConstants.APP_TYPE, jstormMasterContext.instanceName);
String path = RegistryUtils.serviceclassPath( JOYConstants.APP_TYPE, jstormMasterContext.instanceName);
/** * Create a path to a service under a user and service class * @param user username or "" * @param serviceClass service name * @param serviceName service name unique for that user and service class * @return a full path */ public static String servicePath(String user, String serviceClass, String serviceName) { return join( serviceclassPath(user, serviceClass), serviceName); }
/** * Create a path to a service under a user and service class * @param user username or "" * @param serviceClass service name * @param serviceName service name unique for that user and service class * @return a full path */ public static String servicePath(String user, String serviceClass, String serviceName) { return join( serviceclassPath(user, serviceClass), serviceName); }
/** * 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; }
Collection<ServiceRecord> serviceRecords; if (StringUtils.isEmpty(name)) { String path = serviceclassPath(currentUser(), serviceType);
Collection<ServiceRecord> serviceRecords; if (StringUtils.isEmpty(name)) { String path = serviceclassPath(currentUser(), serviceType);