本文整理汇总了Java中org.apache.hadoop.yarn.server.api.protocolrecords.RefreshServiceAclsResponse类的典型用法代码示例。如果您正苦于以下问题:Java RefreshServiceAclsResponse类的具体用法?Java RefreshServiceAclsResponse怎么用?Java RefreshServiceAclsResponse使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RefreshServiceAclsResponse类属于org.apache.hadoop.yarn.server.api.protocolrecords包,在下文中一共展示了RefreshServiceAclsResponse类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: refreshServiceAcls
import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshServiceAclsResponse; //导入依赖的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);
}
示例2: refreshServiceAcls
import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshServiceAclsResponse; //导入依赖的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;
}
}
示例3: refreshServiceAcls
import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshServiceAclsResponse; //导入依赖的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);
}
示例4: testRefreshServiceAcls
import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshServiceAclsResponse; //导入依赖的package包/类
@Test
public void testRefreshServiceAcls() throws Exception {
RefreshServiceAclsRequest request = recordFactory
.newRecordInstance(RefreshServiceAclsRequest.class);
RefreshServiceAclsResponse response = client.refreshServiceAcls(request);
assertNotNull(response);
}
示例5: refreshServiceAcls
import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshServiceAclsResponse; //导入依赖的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);
}
示例6: refreshServiceAcls
import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshServiceAclsResponse; //导入依赖的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);
}
示例7: refreshServiceAcls
import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshServiceAclsResponse; //导入依赖的package包/类
@Public
@Stable
@Idempotent
public RefreshServiceAclsResponse refreshServiceAcls(
RefreshServiceAclsRequest request)
throws YarnException, IOException;
示例8: refreshServiceAcls
import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshServiceAclsResponse; //导入依赖的package包/类
@Private
@Idempotent
public RefreshServiceAclsResponse refreshServiceAcls(
RefreshServiceAclsRequest request)
throws YarnException, IOException;
示例9: refreshServiceAcls
import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshServiceAclsResponse; //导入依赖的package包/类
@Public
@Stable
public RefreshServiceAclsResponse refreshServiceAcls(
RefreshServiceAclsRequest request)
throws YarnException, IOException;