当前位置: 首页>>代码示例>>Java>>正文


Java WebAppUtils.setRMWebAppHostnameAndPort方法代码示例

本文整理汇总了Java中org.apache.hadoop.yarn.webapp.util.WebAppUtils.setRMWebAppHostnameAndPort方法的典型用法代码示例。如果您正苦于以下问题:Java WebAppUtils.setRMWebAppHostnameAndPort方法的具体用法?Java WebAppUtils.setRMWebAppHostnameAndPort怎么用?Java WebAppUtils.setRMWebAppHostnameAndPort使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.hadoop.yarn.webapp.util.WebAppUtils的用法示例。


在下文中一共展示了WebAppUtils.setRMWebAppHostnameAndPort方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setNonHARMConfiguration

import org.apache.hadoop.yarn.webapp.util.WebAppUtils; //导入方法依赖的package包/类
private void setNonHARMConfiguration(Configuration conf) {
  String hostname = MiniYARNCluster.getHostname();
  conf.set(YarnConfiguration.RM_ADDRESS, hostname + ":0");
  conf.set(YarnConfiguration.RM_ADMIN_ADDRESS, hostname + ":0");
  conf.set(YarnConfiguration.RM_SCHEDULER_ADDRESS, hostname + ":0");
  conf.set(YarnConfiguration.RM_RESOURCE_TRACKER_ADDRESS, hostname + ":0");
  WebAppUtils.setRMWebAppHostnameAndPort(conf, hostname, 0);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:9,代码来源:MiniYARNCluster.java

示例2: setNonHARMConfigurationWithEphemeralPorts

import org.apache.hadoop.yarn.webapp.util.WebAppUtils; //导入方法依赖的package包/类
private void setNonHARMConfigurationWithEphemeralPorts(Configuration conf) {
  String hostname = MiniYARNCluster.getHostname();
  conf.set(YarnConfiguration.RM_ADDRESS, hostname + ":0");
  conf.set(YarnConfiguration.RM_ADMIN_ADDRESS, hostname + ":0");
  conf.set(YarnConfiguration.RM_SCHEDULER_ADDRESS, hostname + ":0");
  conf.set(YarnConfiguration.RM_RESOURCE_TRACKER_ADDRESS, hostname + ":0");
  WebAppUtils.setRMWebAppHostnameAndPort(conf, hostname, 0);
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:9,代码来源:MiniYARNCluster.java

示例3: setNonHARMConfigurationWithEphemeralPorts

import org.apache.hadoop.yarn.webapp.util.WebAppUtils; //导入方法依赖的package包/类
private void setNonHARMConfigurationWithEphemeralPorts(Configuration conf) {
  String hostname = MiniYARNCluster.getHostname();
  conf.set(YarnConfiguration.RM_ADDRESS, hostname + ":0");
  conf.set(YarnConfiguration.RM_ADMIN_ADDRESS, hostname + ":0");
  conf.set(YarnConfiguration.RM_SCHEDULER_ADDRESS, hostname + ":0");
  conf.set(YarnConfiguration.RM_RESOURCE_TRACKER_ADDRESS, hostname + ":0");
  conf.set(YarnConfiguration.RM_GROUP_MEMBERSHIP_ADDRESS, hostname + ":0");
  WebAppUtils.setRMWebAppHostnameAndPort(conf, hostname, 0);
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:10,代码来源:MiniYARNCluster.java

示例4: setNonHARMConfiguration

import org.apache.hadoop.yarn.webapp.util.WebAppUtils; //导入方法依赖的package包/类
private void setNonHARMConfiguration(Configuration conf) {
    String hostname = MiniYARNClusterSplice.getHostname();
    conf.set(YarnConfiguration.RM_ADDRESS, hostname + ":0");
    conf.set(YarnConfiguration.RM_ADMIN_ADDRESS, hostname + ":0");
    conf.set(YarnConfiguration.RM_SCHEDULER_ADDRESS, hostname + ":0");
    conf.set(YarnConfiguration.RM_RESOURCE_TRACKER_ADDRESS, hostname + ":0");
    WebAppUtils.setRMWebAppHostnameAndPort(conf, hostname, 0);
}
 
开发者ID:splicemachine,项目名称:spliceengine,代码行数:9,代码来源:MiniYARNClusterSplice.java

示例5: serviceStart

import org.apache.hadoop.yarn.webapp.util.WebAppUtils; //导入方法依赖的package包/类
@Override
public synchronized void serviceStart() throws Exception {
  try {
    getConfig().setBoolean(YarnConfiguration.IS_MINI_YARN_CLUSTER, true);
    if (!getConfig().getBoolean(
        YarnConfiguration.YARN_MINICLUSTER_FIXED_PORTS,
        YarnConfiguration.DEFAULT_YARN_MINICLUSTER_FIXED_PORTS)) {
      // pick free random ports.
      String hostname = MiniYARNCluster.getHostname();
      getConfig().set(YarnConfiguration.RM_ADDRESS,
          hostname + ":0");
      getConfig().set(YarnConfiguration.RM_ADMIN_ADDRESS,
          hostname + ":0");
      getConfig().set(YarnConfiguration.RM_SCHEDULER_ADDRESS,
          hostname + ":0");
      getConfig().set(YarnConfiguration.RM_RESOURCE_TRACKER_ADDRESS,
          hostname + ":0");
      WebAppUtils.setRMWebAppHostnameAndPort(getConfig(), hostname, 0);
    }
    resourceManager = new ResourceManager() {
      @Override
      protected void doSecureLogin() throws IOException {
        // Don't try to login using keytab in the testcase.
      };
    };
    resourceManager.init(getConfig());
    new Thread() {
      public void run() {
        resourceManager.start();
      };
    }.start();
    int waitCount = 0;
    while (resourceManager.getServiceState() == STATE.INITED
        && waitCount++ < 60) {
      LOG.info("Waiting for RM to start...");
      Thread.sleep(1500);
    }
    if (resourceManager.getServiceState() != STATE.STARTED) {
      // RM could have failed.
      throw new IOException(
          "ResourceManager failed to start. Final state is "
              + resourceManager.getServiceState());
    }
    super.serviceStart();
  } catch (Throwable t) {
    throw new YarnRuntimeException(t);
  }
  LOG.info("MiniYARN ResourceManager address: " +
           getConfig().get(YarnConfiguration.RM_ADDRESS));
  LOG.info("MiniYARN ResourceManager web address: " +
           WebAppUtils.getRMWebAppURLWithoutScheme(getConfig()));
}
 
开发者ID:chendave,项目名称:hadoop-TCP,代码行数:53,代码来源:MiniYARNCluster.java


注:本文中的org.apache.hadoop.yarn.webapp.util.WebAppUtils.setRMWebAppHostnameAndPort方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。