/** * Delete a component * @param componentName component name * @throws IOException */ public void deleteComponent(String componentName) throws IOException { String path = RegistryUtils.componentPath( user, jstormServiceClass, instanceName, componentName); registryOperations.delete(path, false); }
/** * Add a component * @param serviceClass service class to use under ~user * @param componentName component name * @param record record to put * @throws IOException */ public void putComponent(String serviceClass, String serviceName, String componentName, ServiceRecord record) throws IOException { String path = RegistryUtils.componentPath( user, serviceClass, serviceName, componentName); registryOperations.mknode(RegistryPathUtils.parentOf(path), true); registryOperations.bind(path, record, BindFlags.OVERWRITE); }
public boolean needUpgrade() { String containerPath = RegistryUtils.componentPath( JOYConstants.APP_TYPE, this.executorMeta.getInstanceName(), this.executorMeta.getApplicationId(), this.executorMeta.getRunningContainer()); try { if (registryOperations.exists(containerPath)) { ServiceRecord sr = registryOperations.resolve(containerPath); if (sr.get(JOYConstants.NEED_UPGRADE) != null && sr.get(JOYConstants.NEED_UPGRADE).equals(JOYConstants.TRUE)) { sr.set(JOYConstants.NEED_UPGRADE, JOYConstants.FALSE); registryOperations.bind(containerPath, sr, BindFlags.OVERWRITE); LOG.info(JOYConstants.NEED_UPGRADE); return true; } } } catch (IOException e) { e.printStackTrace(); } return false; }
String path = RegistryUtils.servicePath( JOYConstants.APP_NAME, JOYConstants.APP_TYPE, instanceName); String hostPath = RegistryUtils.componentPath( JOYConstants.APP_NAME, JOYConstants.APP_TYPE, instanceName, supervisorHost);
String containerPath = RegistryUtils.componentPath( JOYConstants.APP_TYPE, jstormMasterContext.instanceName, jstormMasterContext.appAttemptID.getApplicationId().toString(), containerStatus.getContainerId().toString()); try {
JOYConstants.APP_TYPE, instanceName); String containerPath = RegistryUtils.componentPath( JOYConstants.APP_TYPE, instanceName, containerId.getApplicationAttemptId().getApplicationId().toString(), containerId.toString());
String containerPath = RegistryUtils.componentPath( JOYConstants.APP_TYPE, jstormMasterContext.instanceName, container.getId().getApplicationAttemptId().getApplicationId().toString(), container.getId().toString());
String containerPath = RegistryUtils.componentPath( JOYConstants.APP_TYPE, jstormMasterContext.instanceName, supervisorContainer.getId().getApplicationAttemptId().getApplicationId().toString(), String containerPath = RegistryUtils.componentPath( JOYConstants.APP_TYPE, jstormMasterContext.instanceName, nimbusContainer.getId().getApplicationAttemptId().getApplicationId().toString(),
String containerPath = RegistryUtils.componentPath( JOYConstants.APP_TYPE, jstormMasterContext.instanceName, allocatedContainer.getId().getApplicationAttemptId().getApplicationId().toString(), allocatedContainer.getId().toString());
/** * Delete a component * @param componentName component name * @throws IOException */ public void deleteComponent(String componentName) throws IOException { String path = RegistryUtils.componentPath( user, sliderServiceClass, instanceName, componentName); registryOperations.delete(path, false); }
/** * Delete a component * @param componentName component name * @throws IOException */ public void deleteComponent(String componentName) throws IOException { String path = RegistryUtils.componentPath( user, sliderServiceClass, instanceName, componentName); registryOperations.delete(path, false); }
/** * Add a component * @param serviceClass service class to use under ~user * @param componentName component name * @param record record to put * @throws IOException */ public void putComponent(String serviceClass, String serviceName, String componentName, ServiceRecord record) throws IOException { String path = RegistryUtils.componentPath( user, serviceClass, serviceName, componentName); registryOperations.mknode(RegistryPathUtils.parentOf(path), true); registryOperations.bind(path, record, BindFlags.OVERWRITE); }
/** * Add a component * @param serviceClass service class to use under ~user * @param componentName component name * @param record record to put * @throws IOException */ public void putComponent(String serviceClass, String serviceName, String componentName, ServiceRecord record) throws IOException { String path = RegistryUtils.componentPath( user, serviceClass, serviceName, componentName); registryOperations.mknode(RegistryPathUtils.parentOf(path), true); registryOperations.bind(path, record, BindFlags.OVERWRITE); }