Java 类org.apache.hadoop.mapreduce.v2.hs.protocol.HSAdminRefreshProtocol 实例源码

项目:FlexMap    文件:HSProxies.java   
@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;
}
项目:hadoop-on-lustre2    文件:HSProxies.java   
@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;
}
项目:FlexMap    文件:HSProxies.java   
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);
}
项目:FlexMap    文件:HSAdmin.java   
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;
}
项目:FlexMap    文件:HSAdmin.java   
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;
}
项目:FlexMap    文件:HSAdmin.java   
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;
}
项目:FlexMap    文件:HSAdmin.java   
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;
}
项目:hadoop-on-lustre2    文件:HSProxies.java   
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);
}
项目:hadoop-on-lustre2    文件:HSAdmin.java   
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;
}
项目:hadoop-on-lustre2    文件:HSAdmin.java   
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;
}
项目:hadoop-on-lustre2    文件:HSAdmin.java   
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;
}
项目:hadoop-on-lustre2    文件:HSAdmin.java   
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;
}
项目:FlexMap    文件:HSAdminRefreshProtocolServerSideTranslatorPB.java   
public HSAdminRefreshProtocolServerSideTranslatorPB(
    HSAdminRefreshProtocol impl) {
  this.impl = impl;
}
项目:hadoop-on-lustre2    文件:HSAdminRefreshProtocolServerSideTranslatorPB.java   
public HSAdminRefreshProtocolServerSideTranslatorPB(
    HSAdminRefreshProtocol impl) {
  this.impl = impl;
}