本文整理汇总了Java中org.apache.hadoop.yarn.server.api.protocolrecords.RefreshServiceAclsRequest类的典型用法代码示例。如果您正苦于以下问题:Java RefreshServiceAclsRequest类的具体用法?Java RefreshServiceAclsRequest怎么用?Java RefreshServiceAclsRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RefreshServiceAclsRequest类属于org.apache.hadoop.yarn.server.api.protocolrecords包,在下文中一共展示了RefreshServiceAclsRequest类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: refreshAll
import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshServiceAclsRequest; //导入依赖的package包/类
private void refreshAll() throws ServiceFailedException {
try {
refreshQueues(RefreshQueuesRequest.newInstance());
refreshNodes(RefreshNodesRequest.newInstance());
refreshSuperUserGroupsConfiguration(
RefreshSuperUserGroupsConfigurationRequest.newInstance());
refreshUserToGroupsMappings(
RefreshUserToGroupsMappingsRequest.newInstance());
if (getConfig().getBoolean(
CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHORIZATION,
false)) {
refreshServiceAcls(RefreshServiceAclsRequest.newInstance());
}
} catch (Exception ex) {
throw new ServiceFailedException(ex.getMessage());
}
}
开发者ID:naver,项目名称:hadoop,代码行数:18,代码来源:AdminService.java
示例2: testServiceAclsRefreshWithLocalConfigurationProvider
import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshServiceAclsRequest; //导入依赖的package包/类
@Test
public void testServiceAclsRefreshWithLocalConfigurationProvider() {
configuration.setBoolean(
CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHORIZATION, true);
ResourceManager resourceManager = null;
try {
resourceManager = new ResourceManager();
resourceManager.init(configuration);
resourceManager.start();
resourceManager.adminService.refreshServiceAcls(RefreshServiceAclsRequest
.newInstance());
} catch (Exception ex) {
fail("Using localConfigurationProvider. Should not get any exception.");
} finally {
if (resourceManager != null) {
resourceManager.stop();
}
}
}
开发者ID:naver,项目名称:hadoop,代码行数:21,代码来源:TestRMAdminService.java
示例3: refreshAll
import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshServiceAclsRequest; //导入依赖的package包/类
private void refreshAll() throws ServiceFailedException {
try {
refreshQueues(RefreshQueuesRequest.newInstance());
refreshNodes(RefreshNodesRequest.newInstance(DecommissionType.NORMAL));
refreshSuperUserGroupsConfiguration(
RefreshSuperUserGroupsConfigurationRequest.newInstance());
refreshUserToGroupsMappings(
RefreshUserToGroupsMappingsRequest.newInstance());
if (getConfig().getBoolean(
CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHORIZATION,
false)) {
refreshServiceAcls(RefreshServiceAclsRequest.newInstance());
}
refreshClusterMaxPriority(RefreshClusterMaxPriorityRequest.newInstance());
} catch (Exception ex) {
throw new ServiceFailedException(ex.getMessage());
}
}
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:19,代码来源:AdminService.java
示例4: refreshServiceAcls
import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshServiceAclsRequest; //导入依赖的package包/类
@Override
public RefreshServiceAclsResponse refreshServiceAcls(
RefreshServiceAclsRequest request) throws YarnException {
Configuration conf = new Configuration();
if (!conf.getBoolean(
CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHORIZATION,
false)) {
throw RPCUtil.getRemoteException(
new IOException("Service Authorization (" +
CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHORIZATION +
") not enabled."));
}
PolicyProvider policyProvider = new RMPolicyProvider();
refreshServiceAcls(conf, policyProvider);
clientRMService.refreshServiceAcls(conf, policyProvider);
applicationMasterService.refreshServiceAcls(conf, policyProvider);
resourceTrackerService.refreshServiceAcls(conf, policyProvider);
return recordFactory.newRecordInstance(RefreshServiceAclsResponse.class);
}
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:23,代码来源:AdminService.java
示例5: refreshAll
import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshServiceAclsRequest; //导入依赖的package包/类
private void refreshAll() throws ServiceFailedException {
try {
refreshQueues(RefreshQueuesRequest.newInstance());
refreshNodes(RefreshNodesRequest.newInstance(DecommissionType.NORMAL));
refreshSuperUserGroupsConfiguration(
RefreshSuperUserGroupsConfigurationRequest.newInstance());
refreshUserToGroupsMappings(
RefreshUserToGroupsMappingsRequest.newInstance());
if (getConfig().getBoolean(
CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHORIZATION,
false)) {
refreshServiceAcls(RefreshServiceAclsRequest.newInstance());
}
refreshClusterMaxPriority(RefreshClusterMaxPriorityRequest.newInstance());
} catch (Exception ex) {
throw new ServiceFailedException("RefreshAll operation failed", ex);
}
}
开发者ID:hopshadoop,项目名称:hops,代码行数:19,代码来源:AdminService.java
示例6: refreshServiceAcls
import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshServiceAclsRequest; //导入依赖的package包/类
@Override
public RefreshServiceAclsResponse refreshServiceAcls(
RefreshServiceAclsRequest request) throws YarnException,
IOException {
RefreshServiceAclsRequestProto requestProto =
((RefreshServiceAclsRequestPBImpl)request).getProto();
try {
return new RefreshServiceAclsResponsePBImpl(proxy.refreshServiceAcls(
null, requestProto));
} catch (ServiceException e) {
RPCUtil.unwrapAndThrowException(e);
return null;
}
}
开发者ID:naver,项目名称:hadoop,代码行数:15,代码来源:ResourceManagerAdministrationProtocolPBClientImpl.java
示例7: refreshServiceAcls
import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshServiceAclsRequest; //导入依赖的package包/类
@Override
public RefreshServiceAclsResponse refreshServiceAcls(
RefreshServiceAclsRequest request) throws YarnException, IOException {
if (!getConfig().getBoolean(
CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHORIZATION,
false)) {
throw RPCUtil.getRemoteException(
new IOException("Service Authorization (" +
CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHORIZATION +
") not enabled."));
}
String argName = "refreshServiceAcls";
UserGroupInformation user = checkAcls(argName);
checkRMStatus(user.getShortUserName(), argName, "refresh Service ACLs.");
PolicyProvider policyProvider = RMPolicyProvider.getInstance();
Configuration conf =
getConfiguration(new Configuration(false),
YarnConfiguration.HADOOP_POLICY_CONFIGURATION_FILE);
refreshServiceAcls(conf, policyProvider);
rmContext.getClientRMService().refreshServiceAcls(conf, policyProvider);
rmContext.getApplicationMasterService().refreshServiceAcls(
conf, policyProvider);
rmContext.getResourceTrackerService().refreshServiceAcls(
conf, policyProvider);
RMAuditLogger.logSuccess(user.getShortUserName(), argName, "AdminService");
return recordFactory.newRecordInstance(RefreshServiceAclsResponse.class);
}
开发者ID:naver,项目名称:hadoop,代码行数:34,代码来源:AdminService.java
示例8: refreshServiceAcls
import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshServiceAclsRequest; //导入依赖的package包/类
private int refreshServiceAcls() throws IOException, YarnException {
// Refresh the service acls
ResourceManagerAdministrationProtocol adminProtocol = createAdminProtocol();
RefreshServiceAclsRequest request =
recordFactory.newRecordInstance(RefreshServiceAclsRequest.class);
adminProtocol.refreshServiceAcls(request);
return 0;
}
开发者ID:naver,项目名称:hadoop,代码行数:9,代码来源:RMAdminCLI.java
示例9: testRefreshServiceAcls
import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshServiceAclsRequest; //导入依赖的package包/类
@Test
public void testRefreshServiceAcls() throws Exception {
RefreshServiceAclsRequest request = recordFactory
.newRecordInstance(RefreshServiceAclsRequest.class);
RefreshServiceAclsResponse response = client.refreshServiceAcls(request);
assertNotNull(response);
}
开发者ID:naver,项目名称:hadoop,代码行数:9,代码来源:TestResourceManagerAdministrationProtocolPBClientImpl.java
示例10: refreshServiceAcls
import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshServiceAclsRequest; //导入依赖的package包/类
@Override
public RefreshServiceAclsResponse refreshServiceAcls(
RefreshServiceAclsRequest request) throws YarnException, IOException {
if (!getConfig().getBoolean(
CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHORIZATION,
false)) {
throw RPCUtil.getRemoteException(
new IOException("Service Authorization (" +
CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHORIZATION +
") not enabled."));
}
String argName = "refreshServiceAcls";
if (!isRMActive()) {
RMAuditLogger.logFailure(UserGroupInformation.getCurrentUser()
.getShortUserName(), argName,
adminAcl.toString(), "AdminService",
"ResourceManager is not active. Can not refresh Service ACLs.");
throwStandbyException();
}
PolicyProvider policyProvider = RMPolicyProvider.getInstance();
Configuration conf =
getConfiguration(new Configuration(false),
YarnConfiguration.HADOOP_POLICY_CONFIGURATION_FILE);
refreshServiceAcls(conf, policyProvider);
rmContext.getClientRMService().refreshServiceAcls(conf, policyProvider);
rmContext.getApplicationMasterService().refreshServiceAcls(
conf, policyProvider);
rmContext.getResourceTrackerService().refreshServiceAcls(
conf, policyProvider);
return recordFactory.newRecordInstance(RefreshServiceAclsResponse.class);
}
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:36,代码来源:AdminService.java
示例11: refreshServiceAcls
import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshServiceAclsRequest; //导入依赖的package包/类
@Override
public RefreshServiceAclsResponse refreshServiceAcls(
RefreshServiceAclsRequest request) throws YarnException, IOException {
if (!getConfig().getBoolean(
CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHORIZATION,
false)) {
throw RPCUtil.getRemoteException(
new IOException("Service Authorization (" +
CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHORIZATION +
") not enabled."));
}
final String operation = "refreshServiceAcls";
UserGroupInformation user = checkAcls(operation);
checkRMStatus(user.getShortUserName(), operation, "refresh Service ACLs.");
PolicyProvider policyProvider = RMPolicyProvider.getInstance();
Configuration conf =
getConfiguration(new Configuration(false),
YarnConfiguration.HADOOP_POLICY_CONFIGURATION_FILE);
refreshServiceAcls(conf, policyProvider);
rmContext.getClientRMService().refreshServiceAcls(conf, policyProvider);
rmContext.getApplicationMasterService().refreshServiceAcls(
conf, policyProvider);
rmContext.getResourceTrackerService().refreshServiceAcls(
conf, policyProvider);
RMAuditLogger.logSuccess(user.getShortUserName(), operation,
"AdminService");
return recordFactory.newRecordInstance(RefreshServiceAclsResponse.class);
}
开发者ID:hopshadoop,项目名称:hops,代码行数:35,代码来源:AdminService.java
注:本文中的org.apache.hadoop.yarn.server.api.protocolrecords.RefreshServiceAclsRequest类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论