本文整理汇总了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;
}