gpt4 book ai didi

org.apache.hadoop.yarn.conf.YarnConfiguration.useHttps()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 02:44:40 27 4
gpt4 key购买 nike

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

YarnConfiguration.useHttps介绍

暂无

代码示例

代码示例来源:origin: apache/kylin

if (YarnConfiguration.useHttps(conf)) {
  webappConfKey = YarnConfiguration.RM_WEBAPP_HTTPS_ADDRESS;
  defaultAddr = YarnConfiguration.DEFAULT_RM_WEBAPP_HTTPS_ADDRESS;
  rmWebHost = (YarnConfiguration.useHttps(conf) ? "https://" : "http://") + rmWebHost;

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-common

/**
 * Choose which scheme (HTTP or HTTPS) to use when generating a URL based on
 * the configuration.
 * 
 * @return the scheme (HTTP / HTTPS)
 */
public static String getHttpSchemePrefix(Configuration conf) {
 return YarnConfiguration.useHttps(conf) ? HTTPS_PREFIX : HTTP_PREFIX;
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

/**
 * Choose which scheme (HTTP or HTTPS) to use when generating a URL based on
 * the configuration.
 * 
 * @return the scheme (HTTP / HTTPS)
 */
public static String getHttpSchemePrefix(Configuration conf) {
 return YarnConfiguration.useHttps(conf) ? HTTPS_PREFIX : HTTP_PREFIX;
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

public static String getAHSWebAppURLWithoutScheme(Configuration conf) {
 if (YarnConfiguration.useHttps(conf)) {
  return conf.get(YarnConfiguration.TIMELINE_SERVICE_WEBAPP_HTTPS_ADDRESS,
    YarnConfiguration.DEFAULT_TIMELINE_SERVICE_WEBAPP_HTTPS_ADDRESS);
 } else {
  return conf.get(YarnConfiguration.TIMELINE_SERVICE_WEBAPP_ADDRESS,
    YarnConfiguration.DEFAULT_TIMELINE_SERVICE_WEBAPP_ADDRESS);
 }
}

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-common

public static void setNMWebAppHostNameAndPort(Configuration conf,
  String hostName, int port) {
 if (YarnConfiguration.useHttps(conf)) {
  conf.set(YarnConfiguration.NM_WEBAPP_HTTPS_ADDRESS,
    hostName + ":" + port);
 } else {
  conf.set(YarnConfiguration.NM_WEBAPP_ADDRESS,
    hostName + ":" + port);
 }
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-common

public static void setNMWebAppHostNameAndPort(Configuration conf,
  String hostName, int port) {
 if (YarnConfiguration.useHttps(conf)) {
  conf.set(YarnConfiguration.NM_WEBAPP_HTTPS_ADDRESS,
    hostName + ":" + port);
 } else {
  conf.set(YarnConfiguration.NM_WEBAPP_ADDRESS,
    hostName + ":" + port);
 }
}

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-common

public static String getRMWebAppURLWithoutScheme(Configuration conf) {
 if (YarnConfiguration.useHttps(conf)) {
  return conf.get(YarnConfiguration.RM_WEBAPP_HTTPS_ADDRESS,
    YarnConfiguration.DEFAULT_RM_WEBAPP_HTTPS_ADDRESS);
 }else {
  return conf.get(YarnConfiguration.RM_WEBAPP_ADDRESS,
    YarnConfiguration.DEFAULT_RM_WEBAPP_ADDRESS);
 }
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-common

public static void setRMWebAppHostnameAndPort(Configuration conf,
  String hostname, int port) {
 String resolvedAddress = hostname + ":" + port;
 if (YarnConfiguration.useHttps(conf)) {
  conf.set(YarnConfiguration.RM_WEBAPP_HTTPS_ADDRESS, resolvedAddress);
 } else {
  conf.set(YarnConfiguration.RM_WEBAPP_ADDRESS, resolvedAddress);
 }
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

public static void setNMWebAppHostNameAndPort(Configuration conf,
  String hostName, int port) {
 if (YarnConfiguration.useHttps(conf)) {
  conf.set(YarnConfiguration.NM_WEBAPP_HTTPS_ADDRESS,
    hostName + ":" + port);
 } else {
  conf.set(YarnConfiguration.NM_WEBAPP_ADDRESS,
    hostName + ":" + port);
 }
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

public static void setRMWebAppHostnameAndPort(Configuration conf,
  String hostname, int port) {
 String resolvedAddress = hostname + ":" + port;
 if (YarnConfiguration.useHttps(conf)) {
  conf.set(YarnConfiguration.RM_WEBAPP_HTTPS_ADDRESS, resolvedAddress);
 } else {
  conf.set(YarnConfiguration.RM_WEBAPP_ADDRESS, resolvedAddress);
 }
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

public static String getNMWebAppURLWithoutScheme(Configuration conf) {
 if (YarnConfiguration.useHttps(conf)) {
  return conf.get(YarnConfiguration.NM_WEBAPP_HTTPS_ADDRESS,
   YarnConfiguration.DEFAULT_NM_WEBAPP_HTTPS_ADDRESS);
 } else {
  return conf.get(YarnConfiguration.NM_WEBAPP_ADDRESS,
   YarnConfiguration.DEFAULT_NM_WEBAPP_ADDRESS);
 }
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

public static URI constructResURI(Configuration conf, String address,
  String uri) {
 return URI.create(
   JOINER.join(YarnConfiguration.useHttps(conf) ? "https://" : "http://",
     address, uri));
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

public static String getRouterWebAppURLWithoutScheme(Configuration conf) {
 if (YarnConfiguration.useHttps(conf)) {
  return conf.get(YarnConfiguration.ROUTER_WEBAPP_HTTPS_ADDRESS,
    YarnConfiguration.DEFAULT_ROUTER_WEBAPP_HTTPS_ADDRESS);
 } else {
  return conf.get(YarnConfiguration.ROUTER_WEBAPP_ADDRESS,
    YarnConfiguration.DEFAULT_ROUTER_WEBAPP_ADDRESS);
 }
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-web-proxy

private String getUrlByRmId(Configuration conf, String rmId) {
 String addressPropertyPrefix = YarnConfiguration.useHttps(conf) ?
   YarnConfiguration.RM_WEBAPP_HTTPS_ADDRESS :
   YarnConfiguration.RM_WEBAPP_ADDRESS;
 String host = conf.get(HAUtil.addSuffix(addressPropertyPrefix, rmId));
 return host;
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-api

@Private
public static List<String> getServiceAddressConfKeys(Configuration conf) {
 return useHttps(conf) ? RM_SERVICES_ADDRESS_CONF_KEYS_HTTPS
   : RM_SERVICES_ADDRESS_CONF_KEYS_HTTP;
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-api

@Private
public static List<String> getServiceAddressConfKeys(Configuration conf) {
 return useHttps(conf) ? RM_SERVICES_ADDRESS_CONF_KEYS_HTTPS
   : RM_SERVICES_ADDRESS_CONF_KEYS_HTTP;
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

public static String getResolvedRemoteRMWebAppURLWithoutScheme(
  Configuration conf) {
 return getResolvedRemoteRMWebAppURLWithoutScheme(conf,
   YarnConfiguration.useHttps(conf) ? Policy.HTTPS_ONLY : Policy.HTTP_ONLY);
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

public static String getResolvedRMWebAppURLWithoutScheme(Configuration conf) {
 return getResolvedRMWebAppURLWithoutScheme(conf,
   YarnConfiguration.useHttps(conf) ? Policy.HTTPS_ONLY : Policy.HTTP_ONLY);
}

代码示例来源:origin: io.hops/hadoop-yarn-api

@Private
public static List<String> getServiceAddressConfKeys(Configuration conf) {
 return useHttps(conf) ? RM_SERVICES_ADDRESS_CONF_KEYS_HTTPS
   : RM_SERVICES_ADDRESS_CONF_KEYS_HTTP;
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-client

@VisibleForTesting
public URL getHAClusterUrl(Configuration conf, String rmhid)
  throws MalformedURLException {
 return new URL(WebAppUtils.getHttpSchemePrefix(conf)
   + WebAppUtils.getResolvedRemoteRMWebAppURLWithoutScheme(conf,
     YarnConfiguration.useHttps(conf) ? Policy.HTTPS_ONLY
       : Policy.HTTP_ONLY,
     rmhid)
   + CLUSTER_INFO_URL);
}

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