Search in sources :

Example 1 with LocalizerTokenSecretManager

use of org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.security.LocalizerTokenSecretManager in project hadoop by apache.

the class ResourceLocalizationService method createServer.

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;
}
Also used : Configuration(org.apache.hadoop.conf.Configuration) YarnConfiguration(org.apache.hadoop.yarn.conf.YarnConfiguration) Server(org.apache.hadoop.ipc.Server) YarnRPC(org.apache.hadoop.yarn.ipc.YarnRPC) LocalizerTokenSecretManager(org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.security.LocalizerTokenSecretManager) NMPolicyProvider(org.apache.hadoop.yarn.server.nodemanager.security.authorize.NMPolicyProvider)

Aggregations

Configuration (org.apache.hadoop.conf.Configuration)1 Server (org.apache.hadoop.ipc.Server)1 YarnConfiguration (org.apache.hadoop.yarn.conf.YarnConfiguration)1 YarnRPC (org.apache.hadoop.yarn.ipc.YarnRPC)1 LocalizerTokenSecretManager (org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.security.LocalizerTokenSecretManager)1 NMPolicyProvider (org.apache.hadoop.yarn.server.nodemanager.security.authorize.NMPolicyProvider)1