本文整理了Java中org.apache.hadoop.ipc.Server.refreshServiceAcl()
方法的一些代码示例,展示了Server.refreshServiceAcl()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Server.refreshServiceAcl()
方法的具体详情如下:
包路径:org.apache.hadoop.ipc.Server
类名称:Server
方法名:refreshServiceAcl
[英]Refresh the service authorization ACL for the service handled by this server.
[中]刷新此服务器处理的服务的服务授权ACL。
代码示例来源:origin: Qihoo360/XLearning
protected void serviceStart() throws Exception {
Configuration conf = new XLearningConfiguration();
YarnRPC rpc = YarnRPC.create(conf);
initializeWebApp(conf);
InetSocketAddress address = conf.getSocketAddr(
XLearningConfiguration.XLEARNING_HISTORY_BIND_HOST,
XLearningConfiguration.XLEARNING_HISTORY_ADDRESS,
conf.get(XLearningConfiguration.XLEARNING_HISTORY_ADDRESS, XLearningConfiguration.DEFAULT_XLEARNING_HISTORY_ADDRESS),
conf.getInt(XLearningConfiguration.XLEARNING_HISTORY_PORT, XLearningConfiguration.DEFAULT_XLEARNING_HISTORY_PORT));
server =
rpc.getServer(HSClientProtocol.class, protocolHandler, address,
conf, jhsDTSecretManager,
conf.getInt(XLearningConfiguration.XLEARNING_HISTORY_CLIENT_THREAD_COUNT,
XLearningConfiguration.DEFAULT_XLEARNING_HISTORY_CLIENT_THREAD_COUNT));
// Enable service authorization?
if (conf.getBoolean(
CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHORIZATION,
false)) {
server.refreshServiceAcl(conf, new ClientHSPolicyProvider());
}
server.start();
this.bindAddress = conf.updateConnectAddr(XLearningConfiguration.XLEARNING_HISTORY_BIND_HOST,
XLearningConfiguration.XLEARNING_HISTORY_ADDRESS,
conf.get(XLearningConfiguration.XLEARNING_HISTORY_ADDRESS, XLearningConfiguration.DEFAULT_XLEARNING_HISTORY_ADDRESS),
server.getListenerAddress());
LOG.info("Instantiated HistoryClientService at " + this.bindAddress);
super.serviceStart();
}
代码示例来源:origin: apache/hive
public LlapTaskUmbilicalServer(Configuration conf, LlapTaskUmbilicalProtocol umbilical, int numHandlers) throws IOException {
jobTokenSecretManager = new JobTokenSecretManager();
server = new RPC.Builder(conf)
.setProtocol(LlapTaskUmbilicalProtocol.class)
.setBindAddress("0.0.0.0")
.setPort(0)
.setInstance(umbilical)
.setNumHandlers(numHandlers)
.setSecretManager(jobTokenSecretManager).build();
if (conf.getBoolean(CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHORIZATION, false)) {
server.refreshServiceAcl(conf, new LlapUmbilicalExternalPolicyProvider());
}
server.start();
this.address = NetUtils.getConnectAddress(server);
LOG.info(
"Started TaskUmbilicalServer: " + umbilical.getClass().getName() + " at address: " + address +
" with numHandlers=" + numHandlers);
}
代码示例来源:origin: apache/hive
@Override
protected void startRpcServer() {
Configuration conf = getConf();
try {
JobTokenSecretManager jobTokenSecretManager =
new JobTokenSecretManager();
jobTokenSecretManager.addTokenForJob(tokenIdentifier, sessionToken);
int numHandlers =
HiveConf.getIntVar(conf, ConfVars.LLAP_TASK_COMMUNICATOR_LISTENER_THREAD_COUNT);
server = new RPC.Builder(conf)
.setProtocol(LlapTaskUmbilicalProtocol.class)
.setBindAddress("0.0.0.0")
.setPort(0)
.setInstance(umbilical)
.setNumHandlers(numHandlers)
.setSecretManager(jobTokenSecretManager).build();
if (conf.getBoolean(CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHORIZATION, false)) {
server.refreshServiceAcl(conf, new LlapUmbilicalPolicyProvider());
}
server.start();
this.address = NetUtils.getConnectAddress(server);
this.amHost = LlapUtil.getAmHostNameFromAddress(address, conf);
LOG.info("Started LlapUmbilical: " + umbilical.getClass().getName() + " at address: "
+ address + " with numHandlers=" + numHandlers + " using the host name " + amHost);
} catch (IOException e) {
throw new TezUncheckedException(e);
}
}
代码示例来源:origin: org.apache.apex/apex-engine
void refreshServiceAcls(Configuration configuration,
PolicyProvider policyProvider)
{
this.server.refreshServiceAcl(configuration, policyProvider);
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-applicationhistoryservice
private void refreshServiceAcls(Configuration configuration,
PolicyProvider policyProvider) {
this.server.refreshServiceAcl(configuration, policyProvider);
}
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-nodemanager
void refreshServiceAcls(Configuration configuration,
PolicyProvider policyProvider) {
this.server.refreshServiceAcl(configuration, policyProvider);
}
代码示例来源:origin: org.apache.tez/tez-dag
private void refreshServiceAcls(Configuration configuration,
PolicyProvider policyProvider) {
this.server.refreshServiceAcl(configuration, policyProvider);
}
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-applicationhistoryservice
private void refreshServiceAcls(Configuration configuration,
PolicyProvider policyProvider) {
this.server.refreshServiceAcl(configuration, policyProvider);
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapreduce-client-app
void refreshServiceAcls(Configuration configuration,
PolicyProvider policyProvider) {
this.server.refreshServiceAcl(configuration, policyProvider);
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapreduce-client-app
void refreshServiceAcls(Configuration configuration,
PolicyProvider policyProvider) {
this.server.refreshServiceAcl(configuration, policyProvider);
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-nodemanager
void refreshServiceAcls(Configuration configuration,
PolicyProvider policyProvider) {
this.server.refreshServiceAcl(configuration, policyProvider);
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-mapreduce-client-app
void refreshServiceAcls(Configuration configuration,
PolicyProvider policyProvider) {
this.server.refreshServiceAcl(configuration, policyProvider);
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-mapreduce-client-app
void refreshServiceAcls(Configuration configuration,
PolicyProvider policyProvider) {
this.server.refreshServiceAcl(configuration, policyProvider);
}
代码示例来源:origin: io.hops/hadoop-mapreduce-client-app
void refreshServiceAcls(Configuration configuration,
PolicyProvider policyProvider) {
this.server.refreshServiceAcl(configuration, policyProvider);
}
代码示例来源:origin: io.hops/hadoop-mapreduce-client-app
void refreshServiceAcls(Configuration configuration,
PolicyProvider policyProvider) {
this.server.refreshServiceAcl(configuration, policyProvider);
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-server-nodemanager
void refreshServiceAcls(Configuration configuration,
PolicyProvider policyProvider) {
this.server.refreshServiceAcl(configuration, policyProvider);
}
代码示例来源:origin: io.hops/hadoop-yarn-server-nodemanager
void refreshServiceAcls(Configuration configuration,
PolicyProvider policyProvider) {
this.server.refreshServiceAcl(configuration, policyProvider);
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-server-applicationhistoryservice
private void refreshServiceAcls(Configuration configuration,
PolicyProvider policyProvider) {
this.server.refreshServiceAcl(configuration, policyProvider);
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapred
@Override
public void refreshServiceAcl() throws IOException {
if (!conf.getBoolean(
CommonConfigurationKeys.HADOOP_SECURITY_AUTHORIZATION, false)) {
throw new AuthorizationException("Service Level Authorization not enabled!");
}
this.interTrackerServer.refreshServiceAcl(conf, new MapReducePolicyProvider());
}
代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-nodemanager
Server createServer() {
Configuration conf = getConfig();
YarnRPC rpc = YarnRPC.create(conf);
if (UserGroupInformation.isSecurityEnabled()) {
secretManager = new LocalizerTokenSecretManager();
}
Server server = rpc.getServer(LocalizationProtocol.class, this,
localizationServerAddress, conf, secretManager,
conf.getInt(YarnConfiguration.NM_LOCALIZER_CLIENT_THREAD_COUNT,
YarnConfiguration.DEFAULT_NM_LOCALIZER_CLIENT_THREAD_COUNT));
// Enable service authorization?
if (conf.getBoolean(
CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHORIZATION,
false)) {
server.refreshServiceAcl(conf, new NMPolicyProvider());
}
return server;
}
内容来源于网络,如有侵权,请联系作者删除!