当前位置: 首页>>代码示例>>Java>>正文


Java RefreshSuperUserGroupsConfigurationRequest类代码示例

本文整理汇总了Java中org.apache.hadoop.yarn.server.api.protocolrecords.RefreshSuperUserGroupsConfigurationRequest的典型用法代码示例。如果您正苦于以下问题:Java RefreshSuperUserGroupsConfigurationRequest类的具体用法?Java RefreshSuperUserGroupsConfigurationRequest怎么用?Java RefreshSuperUserGroupsConfigurationRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


RefreshSuperUserGroupsConfigurationRequest类属于org.apache.hadoop.yarn.server.api.protocolrecords包,在下文中一共展示了RefreshSuperUserGroupsConfigurationRequest类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: refreshSuperUserGroupsConfiguration

import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshSuperUserGroupsConfigurationRequest; //导入依赖的package包/类
@Override
public RefreshSuperUserGroupsConfigurationResponse refreshSuperUserGroupsConfiguration(
    RefreshSuperUserGroupsConfigurationRequest request)
    throws YarnException, IOException {
  String argName = "refreshSuperUserGroupsConfiguration";
  UserGroupInformation user = checkAcls(argName);

  checkRMStatus(user.getShortUserName(), argName, "refresh super-user-groups.");

  // Accept hadoop common configs in core-site.xml as well as RM specific
  // configurations in yarn-site.xml
  Configuration conf =
      getConfiguration(new Configuration(false),
          YarnConfiguration.CORE_SITE_CONFIGURATION_FILE,
          YarnConfiguration.YARN_SITE_CONFIGURATION_FILE);
  RMServerUtils.processRMProxyUsersConf(conf);
  ProxyUsers.refreshSuperUserGroupsConfiguration(conf);
  RMAuditLogger.logSuccess(user.getShortUserName(),
      argName, "AdminService");
  
  return recordFactory.newRecordInstance(
      RefreshSuperUserGroupsConfigurationResponse.class);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:24,代码来源:AdminService.java

示例2: refreshAll

import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshSuperUserGroupsConfigurationRequest; //导入依赖的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

示例3: refreshAll

import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshSuperUserGroupsConfigurationRequest; //导入依赖的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: refreshSuperUserGroupsConfiguration

import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshSuperUserGroupsConfigurationRequest; //导入依赖的package包/类
@Override
public RefreshSuperUserGroupsConfigurationResponse refreshSuperUserGroupsConfiguration(
    RefreshSuperUserGroupsConfigurationRequest request)
    throws YarnException, IOException {
  final String operation = "refreshSuperUserGroupsConfiguration";
  UserGroupInformation user = checkAcls(operation);

  checkRMStatus(user.getShortUserName(), operation,
          "refresh super-user-groups.");

  // Accept hadoop common configs in core-site.xml as well as RM specific
  // configurations in yarn-site.xml
  Configuration conf =
      getConfiguration(new Configuration(false),
          YarnConfiguration.CORE_SITE_CONFIGURATION_FILE,
          YarnConfiguration.YARN_SITE_CONFIGURATION_FILE);
  RMServerUtils.processRMProxyUsersConf(conf);
  ProxyUsers.refreshSuperUserGroupsConfiguration(conf);
  RMAuditLogger.logSuccess(user.getShortUserName(),
      operation, "AdminService");

  return recordFactory.newRecordInstance(
      RefreshSuperUserGroupsConfigurationResponse.class);
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:25,代码来源:AdminService.java

示例5: refreshAll

import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshSuperUserGroupsConfigurationRequest; //导入依赖的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: refreshSuperUserGroupsConfiguration

import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshSuperUserGroupsConfigurationRequest; //导入依赖的package包/类
@Override
public RefreshSuperUserGroupsConfigurationResponse refreshSuperUserGroupsConfiguration(
    RefreshSuperUserGroupsConfigurationRequest request)
    throws YarnException, IOException {
  String argName = "refreshSuperUserGroupsConfiguration";
  UserGroupInformation user = checkAcls(argName);

  if (!isRMActive()) {
    RMAuditLogger.logFailure(user.getShortUserName(), argName,
        adminAcl.toString(), "AdminService",
        "ResourceManager is not active. Can not refresh super-user-groups.");
    throwStandbyException();
  }

  Configuration conf =
      getConfiguration(new Configuration(false),
          YarnConfiguration.CORE_SITE_CONFIGURATION_FILE);
  ProxyUsers.refreshSuperUserGroupsConfiguration(conf);
  RMAuditLogger.logSuccess(user.getShortUserName(),
      argName, "AdminService");
  
  return recordFactory.newRecordInstance(
      RefreshSuperUserGroupsConfigurationResponse.class);
}
 
开发者ID:Seagate,项目名称:hadoop-on-lustre2,代码行数:25,代码来源:AdminService.java

示例7: refreshSuperUserGroupsConfiguration

import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshSuperUserGroupsConfigurationRequest; //导入依赖的package包/类
@Override
public RefreshSuperUserGroupsConfigurationResponse refreshSuperUserGroupsConfiguration(
    RefreshSuperUserGroupsConfigurationRequest request)
    throws YarnException, IOException {
  RefreshSuperUserGroupsConfigurationRequestProto requestProto = 
    ((RefreshSuperUserGroupsConfigurationRequestPBImpl)request).getProto();
  try {
    return new RefreshSuperUserGroupsConfigurationResponsePBImpl(
        proxy.refreshSuperUserGroupsConfiguration(null, requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:15,代码来源:ResourceManagerAdministrationProtocolPBClientImpl.java

示例8: testRefreshSuperUserGroupsWithLocalConfigurationProvider

import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshSuperUserGroupsConfigurationRequest; //导入依赖的package包/类
@Test
public void
    testRefreshSuperUserGroupsWithLocalConfigurationProvider() {
  rm = new MockRM(configuration);
  rm.init(configuration);
  rm.start();

  try {
    rm.adminService.refreshSuperUserGroupsConfiguration(
        RefreshSuperUserGroupsConfigurationRequest.newInstance());
  } catch (Exception ex) {
    fail("Using localConfigurationProvider. Should not get any exception.");
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:15,代码来源:TestRMAdminService.java

示例9: refreshSuperUserGroupsConfiguration

import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshSuperUserGroupsConfigurationRequest; //导入依赖的package包/类
private int refreshSuperUserGroupsConfiguration() throws IOException,
    YarnException {
  // Refresh the super-user groups
  ResourceManagerAdministrationProtocol adminProtocol = createAdminProtocol();
  RefreshSuperUserGroupsConfigurationRequest request = 
    recordFactory.newRecordInstance(RefreshSuperUserGroupsConfigurationRequest.class);
  adminProtocol.refreshSuperUserGroupsConfiguration(request);
  return 0;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:10,代码来源:RMAdminCLI.java

示例10: testRefreshSuperUserGroupsConfiguration

import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshSuperUserGroupsConfigurationRequest; //导入依赖的package包/类
@Test(timeout=500)
public void testRefreshSuperUserGroupsConfiguration() throws Exception {
  String[] args = { "-refreshSuperUserGroupsConfiguration" };
  assertEquals(0, rmAdminCLI.run(args));
  verify(admin).refreshSuperUserGroupsConfiguration(
      any(RefreshSuperUserGroupsConfigurationRequest.class));
}
 
开发者ID:naver,项目名称:hadoop,代码行数:8,代码来源:TestRMAdminCLI.java

示例11: testRefreshSuperUserGroupsConfiguration

import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshSuperUserGroupsConfigurationRequest; //导入依赖的package包/类
/**
 * Test method refreshSuperUserGroupsConfiguration. This method present and it works.
 */
@Test
public void testRefreshSuperUserGroupsConfiguration() throws Exception {

  RefreshSuperUserGroupsConfigurationRequest request = recordFactory
          .newRecordInstance(RefreshSuperUserGroupsConfigurationRequest.class);
  RefreshSuperUserGroupsConfigurationResponse response = client
          .refreshSuperUserGroupsConfiguration(request);
  assertNotNull(response);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:13,代码来源:TestResourceManagerAdministrationProtocolPBClientImpl.java

示例12: refreshSuperUserGroupsConfiguration

import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshSuperUserGroupsConfigurationRequest; //导入依赖的package包/类
@Public
@Stable
@Idempotent
public RefreshSuperUserGroupsConfigurationResponse 
refreshSuperUserGroupsConfiguration(
    RefreshSuperUserGroupsConfigurationRequest request)
throws StandbyException, YarnException, IOException;
 
开发者ID:naver,项目名称:hadoop,代码行数:8,代码来源:ResourceManagerAdministrationProtocol.java

示例13: refreshSuperUserGroupsConfiguration

import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshSuperUserGroupsConfigurationRequest; //导入依赖的package包/类
@Override
public RefreshSuperUserGroupsConfigurationResponse refreshSuperUserGroupsConfiguration(
    RefreshSuperUserGroupsConfigurationRequest request)
    throws YarnException, IOException {
  String argName = "refreshSuperUserGroupsConfiguration";
  UserGroupInformation user = checkAcls(argName);

  if (!isRMActive()) {
    RMAuditLogger.logFailure(user.getShortUserName(), argName,
        adminAcl.toString(), "AdminService",
        "ResourceManager is not active. Can not refresh super-user-groups.");
    throwStandbyException();
  }

  // Accept hadoop common configs in core-site.xml as well as RM specific
  // configurations in yarn-site.xml
  Configuration conf =
      getConfiguration(new Configuration(false),
          YarnConfiguration.CORE_SITE_CONFIGURATION_FILE,
          YarnConfiguration.YARN_SITE_CONFIGURATION_FILE);
  RMServerUtils.processRMProxyUsersConf(conf);
  ProxyUsers.refreshSuperUserGroupsConfiguration(conf);
  RMAuditLogger.logSuccess(user.getShortUserName(),
      argName, "AdminService");
  
  return recordFactory.newRecordInstance(
      RefreshSuperUserGroupsConfigurationResponse.class);
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:29,代码来源:AdminService.java

示例14: refreshSuperUserGroupsConfiguration

import org.apache.hadoop.yarn.server.api.protocolrecords.RefreshSuperUserGroupsConfigurationRequest; //导入依赖的package包/类
@Override
public RefreshSuperUserGroupsConfigurationResponse refreshSuperUserGroupsConfiguration(
    RefreshSuperUserGroupsConfigurationRequest request)
    throws YarnException {
  UserGroupInformation user = checkAcls("refreshSuperUserGroupsConfiguration");
  
  ProxyUsers.refreshSuperUserGroupsConfiguration(new Configuration());
  RMAuditLogger.logSuccess(user.getShortUserName(),
      "refreshSuperUserGroupsConfiguration", "AdminService");
  
  return recordFactory.newRecordInstance(
      RefreshSuperUserGroupsConfigurationResponse.class);
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:14,代码来源:AdminService.java


注:本文中的org.apache.hadoop.yarn.server.api.protocolrecords.RefreshSuperUserGroupsConfigurationRequest类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。