Java 类org.apache.hadoop.security.authorize.Service 实例源码

项目:hadoop    文件:TimelinePolicyProvider.java   
@Override
public Service[] getServices() {
  return new Service[] {
      new Service(
          YarnConfiguration.YARN_SECURITY_SERVICE_AUTHORIZATION_APPLICATIONHISTORY_PROTOCOL,
          ApplicationHistoryProtocolPB.class)
  };
}
项目:ditb    文件:TestTokenAuthentication.java   
@BeforeClass
public static void setupBeforeClass() throws Exception {
  TEST_UTIL = new HBaseTestingUtility();
  TEST_UTIL.startMiniZKCluster();
  // register token type for protocol
  SecurityInfo.addInfo(AuthenticationProtos.AuthenticationService.getDescriptor().getName(),
    new SecurityInfo("hbase.test.kerberos.principal",
      AuthenticationProtos.TokenIdentifier.Kind.HBASE_AUTH_TOKEN));
  // security settings only added after startup so that ZK does not require SASL
  Configuration conf = TEST_UTIL.getConfiguration();
  conf.set("hadoop.security.authentication", "kerberos");
  conf.set("hbase.security.authentication", "kerberos");
  conf.setBoolean(HADOOP_SECURITY_AUTHORIZATION, true);
  server = new TokenServer(conf);
  serverThread = new Thread(server);
  Threads.setDaemonThreadRunning(serverThread, "TokenServer:"+server.getServerName().toString());
  // wait for startup
  while (!server.isStarted() && !server.isStopped()) {
    Thread.sleep(10);
  }
  server.rpcServer.refreshAuthManager(new PolicyProvider() {
    @Override
    public Service[] getServices() {
      return new Service [] {
        new Service("security.client.protocol.acl",
          AuthenticationProtos.AuthenticationService.BlockingInterface.class)};
    }
  });
  ZKClusterId.setClusterId(server.getZooKeeper(), clusterId);
  secretManager = (AuthenticationTokenSecretManager)server.getSecretManager();
  while(secretManager.getCurrentKey() == null) {
    Thread.sleep(1);
  }
}
项目:aliyun-oss-hadoop-fs    文件:TimelinePolicyProvider.java   
@Override
public Service[] getServices() {
  return new Service[] {
      new Service(
          YarnConfiguration.YARN_SECURITY_SERVICE_AUTHORIZATION_APPLICATIONHISTORY_PROTOCOL,
          ApplicationHistoryProtocolPB.class)
  };
}
项目:big-c    文件:TimelinePolicyProvider.java   
@Override
public Service[] getServices() {
  return new Service[] {
      new Service(
          YarnConfiguration.YARN_SECURITY_SERVICE_AUTHORIZATION_APPLICATIONHISTORY_PROTOCOL,
          ApplicationHistoryProtocolPB.class)
  };
}
项目:apex-core    文件:StreamingContainerParent.java   
protected void startRpcServer()
{
  Configuration conf = getConfig();
  LOG.info("Config: " + conf);
  LOG.info("Listener thread count " + listenerThreadCount);
  try {
    server = new RPC.Builder(conf).setProtocol(StreamingContainerUmbilicalProtocol.class).setInstance(this)
        .setBindAddress("0.0.0.0").setPort(0).setNumHandlers(listenerThreadCount).setSecretManager(tokenSecretManager)
        .setVerbose(false).build();

    // Enable service authorization?
    if (conf.getBoolean(
        CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHORIZATION,
        false)) {
      //refreshServiceAcls(conf, new MRAMPolicyProvider());
      server.refreshServiceAcl(conf, new PolicyProvider()
      {

        @Override
        public Service[] getServices()
        {
          return (new Service[]{
              new Service(StreamingContainerUmbilicalProtocol.class
                  .getName(), StreamingContainerUmbilicalProtocol.class)
          });
        }

      });
    }

    server.start();
    this.address = NetUtils.getConnectAddress(server);
    LOG.info("Container callback server listening at " + this.address);
  } catch (IOException e) {
    throw new YarnRuntimeException(e);
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TimelinePolicyProvider.java   
@Override
public Service[] getServices() {
  return new Service[] {
      new Service(
          YarnConfiguration.YARN_SECURITY_SERVICE_AUTHORIZATION_APPLICATIONHISTORY_PROTOCOL,
          ApplicationHistoryProtocolPB.class)
  };
}
项目:pbase    文件:TestTokenAuthentication.java   
@BeforeClass
public static void setupBeforeClass() throws Exception {
  TEST_UTIL = new HBaseTestingUtility();
  TEST_UTIL.startMiniZKCluster();
  // register token type for protocol
  SecurityInfo.addInfo(AuthenticationProtos.AuthenticationService.getDescriptor().getName(),
    new SecurityInfo("hbase.test.kerberos.principal",
      AuthenticationProtos.TokenIdentifier.Kind.HBASE_AUTH_TOKEN));
  // security settings only added after startup so that ZK does not require SASL
  Configuration conf = TEST_UTIL.getConfiguration();
  conf.set("hadoop.security.authentication", "kerberos");
  conf.set("hbase.security.authentication", "kerberos");
  conf.setBoolean(HADOOP_SECURITY_AUTHORIZATION, true);
  server = new TokenServer(conf);
  serverThread = new Thread(server);
  Threads.setDaemonThreadRunning(serverThread, "TokenServer:"+server.getServerName().toString());
  // wait for startup
  while (!server.isStarted() && !server.isStopped()) {
    Thread.sleep(10);
  }
  server.rpcServer.refreshAuthManager(new PolicyProvider() {
    @Override
    public Service[] getServices() {
      return new Service [] {
        new Service("security.client.protocol.acl",
          AuthenticationProtos.AuthenticationService.BlockingInterface.class)};
    }
  });
  ZKClusterId.setClusterId(server.getZooKeeper(), clusterId);
  secretManager = (AuthenticationTokenSecretManager)server.getSecretManager();
  while(secretManager.getCurrentKey() == null) {
    Thread.sleep(1);
  }
}
项目:HIndex    文件:TestTokenAuthentication.java   
@BeforeClass
public static void setupBeforeClass() throws Exception {
  TEST_UTIL = new HBaseTestingUtility();
  TEST_UTIL.startMiniZKCluster();
  // register token type for protocol
  SecurityInfo.addInfo(AuthenticationProtos.AuthenticationService.getDescriptor().getName(),
    new SecurityInfo("hbase.test.kerberos.principal",
      AuthenticationProtos.TokenIdentifier.Kind.HBASE_AUTH_TOKEN));
  // security settings only added after startup so that ZK does not require SASL
  Configuration conf = TEST_UTIL.getConfiguration();
  conf.set("hadoop.security.authentication", "kerberos");
  conf.set("hbase.security.authentication", "kerberos");
  conf.setBoolean(HADOOP_SECURITY_AUTHORIZATION, true);
  server = new TokenServer(conf);
  serverThread = new Thread(server);
  Threads.setDaemonThreadRunning(serverThread, "TokenServer:"+server.getServerName().toString());
  // wait for startup
  while (!server.isStarted() && !server.isStopped()) {
    Thread.sleep(10);
  }
  server.rpcServer.refreshAuthManager(new PolicyProvider() {
    @Override
    public Service[] getServices() {
      return new Service [] {
        new Service("security.client.protocol.acl",
          AuthenticationProtos.AuthenticationService.BlockingInterface.class)};
    }
  });
  ZKClusterId.setClusterId(server.getZooKeeper(), clusterId);
  secretManager = (AuthenticationTokenSecretManager)server.getSecretManager();
  while(secretManager.getCurrentKey() == null) {
    Thread.sleep(1);
  }
}
项目:hops    文件:TimelinePolicyProvider.java   
@Override
public Service[] getServices() {
  return new Service[] {
      new Service(
          YarnConfiguration.YARN_SECURITY_SERVICE_AUTHORIZATION_APPLICATIONHISTORY_PROTOCOL,
          ApplicationHistoryProtocolPB.class)
  };
}
项目:hbase    文件:TestTokenAuthentication.java   
@Before
public void setUp() throws Exception {
  TEST_UTIL = new HBaseTestingUtility();
  TEST_UTIL.startMiniZKCluster();
  // register token type for protocol
  SecurityInfo.addInfo(AuthenticationProtos.AuthenticationService.getDescriptor().getName(),
    new SecurityInfo("hbase.test.kerberos.principal",
      AuthenticationProtos.TokenIdentifier.Kind.HBASE_AUTH_TOKEN));
  // security settings only added after startup so that ZK does not require SASL
  Configuration conf = TEST_UTIL.getConfiguration();
  conf.set("hadoop.security.authentication", "kerberos");
  conf.set("hbase.security.authentication", "kerberos");
  conf.setBoolean(HADOOP_SECURITY_AUTHORIZATION, true);
  conf.set(RpcServerFactory.CUSTOM_RPC_SERVER_IMPL_CONF_KEY, rpcServerImpl);
  server = new TokenServer(conf, TEST_UTIL);
  serverThread = new Thread(server);
  Threads.setDaemonThreadRunning(serverThread, "TokenServer:"+server.getServerName().toString());
  // wait for startup
  while (!server.isStarted() && !server.isStopped()) {
    Thread.sleep(10);
  }
  server.rpcServer.refreshAuthManager(new PolicyProvider() {
    @Override
    public Service[] getServices() {
      return new Service [] {
        new Service("security.client.protocol.acl",
          AuthenticationProtos.AuthenticationService.BlockingInterface.class)};
    }
  });
  ZKClusterId.setClusterId(server.getZooKeeper(), clusterId);
  secretManager = (AuthenticationTokenSecretManager)server.getSecretManager();
  while(secretManager.getCurrentKey() == null) {
    Thread.sleep(1);
  }
}
项目:PyroDB    文件:TestTokenAuthentication.java   
@BeforeClass
public static void setupBeforeClass() throws Exception {
  TEST_UTIL = new HBaseTestingUtility();
  TEST_UTIL.startMiniZKCluster();
  // register token type for protocol
  SecurityInfo.addInfo(AuthenticationProtos.AuthenticationService.getDescriptor().getName(),
    new SecurityInfo("hbase.test.kerberos.principal",
      AuthenticationProtos.TokenIdentifier.Kind.HBASE_AUTH_TOKEN));
  // security settings only added after startup so that ZK does not require SASL
  Configuration conf = TEST_UTIL.getConfiguration();
  conf.set("hadoop.security.authentication", "kerberos");
  conf.set("hbase.security.authentication", "kerberos");
  conf.setBoolean(HADOOP_SECURITY_AUTHORIZATION, true);
  server = new TokenServer(conf);
  serverThread = new Thread(server);
  Threads.setDaemonThreadRunning(serverThread, "TokenServer:"+server.getServerName().toString());
  // wait for startup
  while (!server.isStarted() && !server.isStopped()) {
    Thread.sleep(10);
  }
  server.rpcServer.refreshAuthManager(new PolicyProvider() {
    @Override
    public Service[] getServices() {
      return new Service [] {
        new Service("security.client.protocol.acl",
          AuthenticationProtos.AuthenticationService.BlockingInterface.class)};
    }
  });
  ZKClusterId.setClusterId(server.getZooKeeper(), clusterId);
  secretManager = (AuthenticationTokenSecretManager)server.getSecretManager();
  while(secretManager.getCurrentKey() == null) {
    Thread.sleep(1);
  }
}
项目:c5    文件:TestTokenAuthentication.java   
@BeforeClass
public static void setupBeforeClass() throws Exception {
  TEST_UTIL = new HBaseTestingUtility();
  TEST_UTIL.startMiniZKCluster();
  // register token type for protocol
  SecurityInfo.addInfo(AuthenticationProtos.AuthenticationService.getDescriptor().getName(),
    new SecurityInfo("hbase.test.kerberos.principal",
      AuthenticationProtos.TokenIdentifier.Kind.HBASE_AUTH_TOKEN));
  // security settings only added after startup so that ZK does not require SASL
  Configuration conf = TEST_UTIL.getConfiguration();
  conf.set("hadoop.security.authentication", "kerberos");
  conf.set("hbase.security.authentication", "kerberos");
  conf.setBoolean(HADOOP_SECURITY_AUTHORIZATION, true);
  server = new TokenServer(conf);
  serverThread = new Thread(server);
  Threads.setDaemonThreadRunning(serverThread, "TokenServer:"+server.getServerName().toString());
  // wait for startup
  while (!server.isStarted() && !server.isStopped()) {
    Thread.sleep(10);
  }
  server.rpcServer.refreshAuthManager(new PolicyProvider() {
    @Override
    public Service[] getServices() {
      return new Service [] {
        new Service("security.client.protocol.acl",
          AuthenticationProtos.AuthenticationService.BlockingInterface.class)};
    }
  });
  ZKClusterId.setClusterId(server.getZooKeeper(), clusterId);
  secretManager = (AuthenticationTokenSecretManager)server.getSecretManager();
  while(secretManager.getCurrentKey() == null) {
    Thread.sleep(1);
  }
}
项目:hadoop-oss    文件:TestRPC.java   
@Override
public Service[] getServices() {
  return new Service[] { new Service(ACL_CONFIG, TestRpcService.class) };
}
项目:hadoop    文件:NMPolicyProvider.java   
@Override
public Service[] getServices() {
  return nodeManagerServices;
}
项目:hadoop    文件:RMPolicyProvider.java   
@Override
public Service[] getServices() {
  return resourceManagerServices;
}
项目:hadoop    文件:ClientHSPolicyProvider.java   
@Override
public Service[] getServices() {
  return mrHSServices;
}
项目:hadoop    文件:MRAMPolicyProvider.java   
@Override
public Service[] getServices() {
  return mapReduceApplicationMasterServices;
}
项目:hadoop    文件:HDFSPolicyProvider.java   
@Override
public Service[] getServices() {
  return hdfsServices;
}
项目:hadoop    文件:TestRPC.java   
@Override
public Service[] getServices() {
  return new Service[] { new Service(ACL_CONFIG, TestProtocol.class) };
}
项目:ditb    文件:HBasePolicyProvider.java   
@Override
public Service[] getServices() {
  return services;
}
项目:aliyun-oss-hadoop-fs    文件:NMPolicyProvider.java   
@Override
public Service[] getServices() {
  return nodeManagerServices;
}
项目:aliyun-oss-hadoop-fs    文件:RMPolicyProvider.java   
@Override
public Service[] getServices() {
  return resourceManagerServices;
}
项目:aliyun-oss-hadoop-fs    文件:ClientHSPolicyProvider.java   
@Override
public Service[] getServices() {
  return mrHSServices;
}
项目:aliyun-oss-hadoop-fs    文件:MRAMPolicyProvider.java   
@Override
public Service[] getServices() {
  return mapReduceApplicationMasterServices;
}
项目:aliyun-oss-hadoop-fs    文件:HDFSPolicyProvider.java   
@Override
public Service[] getServices() {
  return hdfsServices;
}
项目:aliyun-oss-hadoop-fs    文件:TestRPC.java   
@Override
public Service[] getServices() {
  return new Service[] { new Service(ACL_CONFIG, TestProtocol.class) };
}
项目:big-c    文件:NMPolicyProvider.java   
@Override
public Service[] getServices() {
  return nodeManagerServices;
}
项目:big-c    文件:RMPolicyProvider.java   
@Override
public Service[] getServices() {
  return resourceManagerServices;
}
项目:big-c    文件:ClientHSPolicyProvider.java   
@Override
public Service[] getServices() {
  return mrHSServices;
}
项目:big-c    文件:MRAMPolicyProvider.java   
@Override
public Service[] getServices() {
  return mapReduceApplicationMasterServices;
}
项目:big-c    文件:HDFSPolicyProvider.java   
@Override
public Service[] getServices() {
  return hdfsServices;
}
项目:big-c    文件:TestRPC.java   
@Override
public Service[] getServices() {
  return new Service[] { new Service(ACL_CONFIG, TestProtocol.class) };
}
项目:hadoop-2.6.0-cdh5.4.3    文件:NMPolicyProvider.java   
@Override
public Service[] getServices() {
  return nodeManagerServices;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:RMPolicyProvider.java   
@Override
public Service[] getServices() {
  return resourceManagerServices;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ClientHSPolicyProvider.java   
@Override
public Service[] getServices() {
  return mrHSServices;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:MRAMPolicyProvider.java   
@Override
public Service[] getServices() {
  return mapReduceApplicationMasterServices;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:HDFSPolicyProvider.java   
@Override
public Service[] getServices() {
  return hdfsServices;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestRPC.java   
@Override
public Service[] getServices() {
  return new Service[] { new Service(ACL_CONFIG, TestProtocol.class) };
}
项目:hadoop-2.6.0-cdh5.4.3    文件:MapReducePolicyProvider.java   
@Override
public Service[] getServices() {
  return mapReduceServices;
}
项目:hadoop-EAR    文件:MapReducePolicyProvider.java   
@Override
public Service[] getServices() {
  return mapReduceServices;
}