/** * Update the self record by pushing out the latest version of the service * registration record. * @throws IOException any failure. */ public void updateSelf() throws IOException { putService(user, sliderServiceClass, instanceName, selfRegistration, false); }
/** * Update the self record by pushing out the latest version of the service * registration record. * @throws IOException any failure. */ public void updateSelf() throws IOException { putService(user, sliderServiceClass, instanceName, selfRegistration, false); }
/** * Add a service under a path for the current user * @param serviceClass service class to use under ~user * @param serviceName name of the service * @param record service record * @param deleteTreeFirst perform recursive delete of the path first * @return the path the service was created at * @throws IOException */ public String putService( String serviceClass, String serviceName, ServiceRecord record, boolean deleteTreeFirst) throws IOException { return putService(user, serviceClass, serviceName, record, deleteTreeFirst); }
/** * Add a service under a path for the current user * @param serviceClass service class to use under ~user * @param serviceName name of the service * @param record service record * @param deleteTreeFirst perform recursive delete of the path first * @return the path the service was created at * @throws IOException */ public String putService( String serviceClass, String serviceName, ServiceRecord record, boolean deleteTreeFirst) throws IOException { return putService(user, serviceClass, serviceName, record, deleteTreeFirst); }
/** * Add a service under a path for the current user * @param serviceClass service class to use under ~user * @param serviceName name of the service * @param record service record * @param deleteTreeFirst perform recursive delete of the path first * @return the path the service was created at * @throws IOException */ public String registerSelf( ServiceRecord record, boolean deleteTreeFirst) throws IOException { selfRegistrationPath = putService(user, sliderServiceClass, instanceName, record, deleteTreeFirst); setSelfRegistration(record); return selfRegistrationPath; }
/** * Add a service under a path for the current user * @param serviceClass service class to use under ~user * @param serviceName name of the service * @param record service record * @param deleteTreeFirst perform recursive delete of the path first * @return the path the service was created at * @throws IOException */ public String registerSelf( ServiceRecord record, boolean deleteTreeFirst) throws IOException { selfRegistrationPath = putService(user, sliderServiceClass, instanceName, record, deleteTreeFirst); setSelfRegistration(record); return selfRegistrationPath; }
private void registerHBaseServiceEntry() throws IOException { String name = amState.getApplicationName() ; ServiceRecord serviceRecord = new ServiceRecord(); // bond lifespan to the application serviceRecord.set(YarnRegistryAttributes.YARN_ID, yarnRegistry.getApplicationAttemptId() .getApplicationId().toString()); serviceRecord.set(YarnRegistryAttributes.YARN_PERSISTENCE, PersistencePolicies.APPLICATION); try { URL configURL = new URL(amWebAPI, SLIDER_PATH_PUBLISHER + "/" + HBASE_SERVICE_TYPE); serviceRecord.addExternalEndpoint( RegistryTypeUtils.restEndpoint( CustomRegistryConstants.PUBLISHER_CONFIGURATIONS_API, configURL.toURI())); } catch (URISyntaxException e) { log.warn("failed to create config URL: {}", e, e); } log.info("registering {}/{}", name, HBASE_SERVICE_TYPE); yarnRegistry.putService(HBASE_SERVICE_TYPE, name, serviceRecord, true); PublishedConfiguration publishedSite = new PublishedConfiguration("HBase site", siteConf); PublishedConfigSet configSet = amState.getOrCreatePublishedConfigSet(HBASE_SERVICE_TYPE); configSet.put(HBASE_SITE_PUBLISHED_CONFIG, publishedSite); }