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


Java HSAdminRefreshProtocol类代码示例

本文整理汇总了Java中org.apache.hadoop.mapreduce.v2.hs.protocol.HSAdminRefreshProtocol的典型用法代码示例。如果您正苦于以下问题:Java HSAdminRefreshProtocol类的具体用法?Java HSAdminRefreshProtocol怎么用?Java HSAdminRefreshProtocol使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


HSAdminRefreshProtocol类属于org.apache.hadoop.mapreduce.v2.hs.protocol包,在下文中一共展示了HSAdminRefreshProtocol类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createProxy

import org.apache.hadoop.mapreduce.v2.hs.protocol.HSAdminRefreshProtocol; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public static <T> T createProxy(Configuration conf, InetSocketAddress hsaddr,
    Class<T> xface, UserGroupInformation ugi) throws IOException {

  T proxy;
  if (xface == RefreshUserMappingsProtocol.class) {
    proxy = (T) createHSProxyWithRefreshUserMappingsProtocol(hsaddr, conf,
        ugi);
  } else if (xface == GetUserMappingsProtocol.class) {
    proxy = (T) createHSProxyWithGetUserMappingsProtocol(hsaddr, conf, ugi);
  } else if (xface == HSAdminRefreshProtocol.class) {
    proxy = (T) createHSProxyWithHSAdminRefreshProtocol(hsaddr, conf, ugi);
  } else {
    String message = "Unsupported protocol found when creating the proxy "
        + "connection to History server: "
        + ((xface != null) ? xface.getClass().getName() : "null");
    LOG.error(message);
    throw new IllegalStateException(message);
  }
  return proxy;
}
 
开发者ID:yncxcw,项目名称:FlexMap,代码行数:22,代码来源:HSProxies.java

示例2: createHSProxyWithHSAdminRefreshProtocol

import org.apache.hadoop.mapreduce.v2.hs.protocol.HSAdminRefreshProtocol; //导入依赖的package包/类
private static HSAdminRefreshProtocol createHSProxyWithHSAdminRefreshProtocol(
    InetSocketAddress hsaddr, Configuration conf, UserGroupInformation ugi)
    throws IOException {
  HSAdminRefreshProtocolPB proxy = (HSAdminRefreshProtocolPB) createHSProxy(
      hsaddr, conf, ugi, HSAdminRefreshProtocolPB.class, 0);
  return new HSAdminRefreshProtocolClientSideTranslatorPB(proxy);
}
 
开发者ID:yncxcw,项目名称:FlexMap,代码行数:8,代码来源:HSProxies.java

示例3: refreshAdminAcls

import org.apache.hadoop.mapreduce.v2.hs.protocol.HSAdminRefreshProtocol; //导入依赖的package包/类
private int refreshAdminAcls() throws IOException {
  // Refresh the admin acls
  Configuration conf = getConf();
  InetSocketAddress address = conf.getSocketAddr(
      JHAdminConfig.JHS_ADMIN_ADDRESS,
      JHAdminConfig.DEFAULT_JHS_ADMIN_ADDRESS,
      JHAdminConfig.DEFAULT_JHS_ADMIN_PORT);

  HSAdminRefreshProtocol refreshProtocol = HSProxies.createProxy(conf,
      address, HSAdminRefreshProtocol.class,
      UserGroupInformation.getCurrentUser());

  refreshProtocol.refreshAdminAcls();
  return 0;
}
 
开发者ID:yncxcw,项目名称:FlexMap,代码行数:16,代码来源:HSAdmin.java

示例4: refreshLoadedJobCache

import org.apache.hadoop.mapreduce.v2.hs.protocol.HSAdminRefreshProtocol; //导入依赖的package包/类
private int refreshLoadedJobCache() throws IOException {
  // Refresh the loaded job cache
  Configuration conf = getConf();
  InetSocketAddress address = conf.getSocketAddr(
      JHAdminConfig.JHS_ADMIN_ADDRESS,
      JHAdminConfig.DEFAULT_JHS_ADMIN_ADDRESS,
      JHAdminConfig.DEFAULT_JHS_ADMIN_PORT);

  HSAdminRefreshProtocol refreshProtocol = HSProxies.createProxy(conf,
      address, HSAdminRefreshProtocol.class,
      UserGroupInformation.getCurrentUser());

  refreshProtocol.refreshLoadedJobCache();
  return 0;
}
 
开发者ID:yncxcw,项目名称:FlexMap,代码行数:16,代码来源:HSAdmin.java

示例5: refreshJobRetentionSettings

import org.apache.hadoop.mapreduce.v2.hs.protocol.HSAdminRefreshProtocol; //导入依赖的package包/类
private int refreshJobRetentionSettings() throws IOException {
  // Refresh job retention settings
  Configuration conf = getConf();
  InetSocketAddress address = conf.getSocketAddr(
      JHAdminConfig.JHS_ADMIN_ADDRESS,
      JHAdminConfig.DEFAULT_JHS_ADMIN_ADDRESS,
      JHAdminConfig.DEFAULT_JHS_ADMIN_PORT);

  HSAdminRefreshProtocol refreshProtocol = HSProxies.createProxy(conf,
      address, HSAdminRefreshProtocol.class,
      UserGroupInformation.getCurrentUser());

  refreshProtocol.refreshJobRetentionSettings();
  return 0;
}
 
开发者ID:yncxcw,项目名称:FlexMap,代码行数:16,代码来源:HSAdmin.java

示例6: refreshLogRetentionSettings

import org.apache.hadoop.mapreduce.v2.hs.protocol.HSAdminRefreshProtocol; //导入依赖的package包/类
private int refreshLogRetentionSettings() throws IOException {
  // Refresh log retention settings
  Configuration conf = getConf();
  InetSocketAddress address = conf.getSocketAddr(
      JHAdminConfig.JHS_ADMIN_ADDRESS,
      JHAdminConfig.DEFAULT_JHS_ADMIN_ADDRESS,
      JHAdminConfig.DEFAULT_JHS_ADMIN_PORT);

  HSAdminRefreshProtocol refreshProtocol = HSProxies.createProxy(conf,
      address, HSAdminRefreshProtocol.class,
      UserGroupInformation.getCurrentUser());

  refreshProtocol.refreshLogRetentionSettings();
  return 0;
}
 
开发者ID:yncxcw,项目名称:FlexMap,代码行数:16,代码来源:HSAdmin.java

示例7: HSAdminRefreshProtocolServerSideTranslatorPB

import org.apache.hadoop.mapreduce.v2.hs.protocol.HSAdminRefreshProtocol; //导入依赖的package包/类
public HSAdminRefreshProtocolServerSideTranslatorPB(
    HSAdminRefreshProtocol impl) {
  this.impl = impl;
}
 
开发者ID:yncxcw,项目名称:FlexMap,代码行数:5,代码来源:HSAdminRefreshProtocolServerSideTranslatorPB.java


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