當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。