gpt4 book ai didi

org.apache.slider.server.services.yarnregistry.YarnRegistryViewForProviders.putService()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 23:07:31 26 4
gpt4 key购买 nike

本文整理了Java中org.apache.slider.server.services.yarnregistry.YarnRegistryViewForProviders.putService()方法的一些代码示例,展示了YarnRegistryViewForProviders.putService()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YarnRegistryViewForProviders.putService()方法的具体详情如下:
包路径:org.apache.slider.server.services.yarnregistry.YarnRegistryViewForProviders
类名称:YarnRegistryViewForProviders
方法名:putService

YarnRegistryViewForProviders.putService介绍

[英]Add a service under a path, optionally purging any history
[中]在路径下添加服务,可以选择清除任何历史记录

代码示例

代码示例来源:origin: apache/incubator-slider

/**
 * 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);
}

代码示例来源:origin: org.apache.slider/slider-core

/**
 * 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);
}

代码示例来源:origin: org.apache.slider/slider-core

/**
 * 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);
}

代码示例来源:origin: apache/incubator-slider

/**
 * 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);
}

代码示例来源:origin: org.apache.slider/slider-core

/**
 * 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;
}

代码示例来源:origin: apache/incubator-slider

/**
 * 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;
}

代码示例来源:origin: org.apache.slider/slider-hbase-provider

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);    
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com