public PublishedConfigSet shallowCopy() { PublishedConfigSet that = new PublishedConfigSet(); for (Map.Entry<String, PublishedConfiguration> entry : configurations.entrySet()) { that.put(entry.getKey(), entry.getValue().shallowCopy()); } return that; } }
public PublishedConfigSet shallowCopy() { PublishedConfigSet that = new PublishedConfigSet(); for (Map.Entry<String, PublishedConfiguration> entry : configurations.entrySet()) { that.put(entry.getKey(), entry.getValue().shallowCopy()); } return that; } }
/** * Publish a named property bag that may contain name-value pairs for app configurations such as hbase-site * * @param name * @param description * @param entries */ protected void publishApplicationInstanceData(String name, String description, Iterable<Map.Entry<String, String>> entries) { PublishedConfiguration pubconf = new PublishedConfiguration(); pubconf.description = description; pubconf.putValues(entries); log.info("publishing {}", pubconf); getAmState().getPublishedSliderConfigurations().put(name, pubconf); }
/** * Publish a named property bag that may contain name-value pairs for app configurations such as hbase-site * * @param name * @param description * @param entries */ protected void publishApplicationInstanceData(String name, String description, Iterable<Map.Entry<String, String>> entries) { PublishedConfiguration pubconf = new PublishedConfiguration(); pubconf.description = description; pubconf.putValues(entries); log.info("publishing {}", pubconf); getAmState().getPublishedSliderConfigurations().put(name, pubconf); }
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); }
amState.getPublishedSliderConfigurations().put( PublishedArtifacts.COMPLETE_CONFIG, new PublishedConfiguration( "Complete slider application settings", getConfig(), getConfig())); amState.getPublishedSliderConfigurations().put( PublishedArtifacts.YARN_SITE_CONFIG, new PublishedConfiguration( defaultYarnConfig) ); amState.getPublishedSliderConfigurations().put( PublishedArtifacts.CORE_SITE_CONFIG, new PublishedConfiguration( ConfigHelper.loadFromResource("core-site.xml"), defaultYarnConfig) ); amState.getPublishedSliderConfigurations().put( PublishedArtifacts.HDFS_SITE_CONFIG, new PublishedConfiguration(
amState.getPublishedSliderConfigurations().put( PublishedArtifacts.COMPLETE_CONFIG, new PublishedConfiguration( "Complete slider application settings", getConfig(), getConfig())); amState.getPublishedSliderConfigurations().put( PublishedArtifacts.YARN_SITE_CONFIG, new PublishedConfiguration( defaultYarnConfig) ); amState.getPublishedSliderConfigurations().put( PublishedArtifacts.CORE_SITE_CONFIG, new PublishedConfiguration( ConfigHelper.loadFromResource("core-site.xml"), defaultYarnConfig) ); amState.getPublishedSliderConfigurations().put( PublishedArtifacts.HDFS_SITE_CONFIG, new PublishedConfiguration(
new PublishedConfiguration(configFile.getDictionaryName(), config.entrySet()); getAmState().getPublishedSliderConfigurations().put( configFile.getDictionaryName(), publishedConfiguration); log.info("Publishing AM configuration {}", configFile.getDictionaryName());
new PublishedConfiguration(configFile.getDictionaryName(), config.entrySet()); getAmState().getPublishedSliderConfigurations().put( configFile.getDictionaryName(), publishedConfiguration); log.info("Publishing AM configuration {}", configFile.getDictionaryName());