本文整理匯總了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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例7: HSAdminRefreshProtocolServerSideTranslatorPB
import org.apache.hadoop.mapreduce.v2.hs.protocol.HSAdminRefreshProtocol; //導入依賴的package包/類
public HSAdminRefreshProtocolServerSideTranslatorPB(
HSAdminRefreshProtocol impl) {
this.impl = impl;
}