Java 类org.apache.hadoop.security.SecurityInfo 实例源码

项目:hadoop    文件:TestSaslRPC.java   
@Test
public void testDigestRpcWithoutAnnotation() throws Exception {
  TestTokenSecretManager sm = new TestTokenSecretManager();
  try {
    SecurityUtil.setSecurityInfoProviders(new CustomSecurityInfo());
    final Server server = new RPC.Builder(conf)
        .setProtocol(TestSaslProtocol.class).setInstance(new TestSaslImpl())
        .setBindAddress(ADDRESS).setPort(0).setNumHandlers(5)
        .setVerbose(true).setSecretManager(sm).build();
    doDigestRpc(server, sm);
  } finally {
    SecurityUtil.setSecurityInfoProviders(new SecurityInfo[0]);
  }
}
项目:aliyun-oss-hadoop-fs    文件:TestSaslRPC.java   
@Test
public void testDigestRpcWithoutAnnotation() throws Exception {
  TestTokenSecretManager sm = new TestTokenSecretManager();
  try {
    SecurityUtil.setSecurityInfoProviders(new CustomSecurityInfo());
    final Server server = new RPC.Builder(conf)
        .setProtocol(TestSaslProtocol.class).setInstance(new TestSaslImpl())
        .setBindAddress(ADDRESS).setPort(0).setNumHandlers(5)
        .setVerbose(true).setSecretManager(sm).build();
    doDigestRpc(server, sm);
  } finally {
    SecurityUtil.setSecurityInfoProviders(new SecurityInfo[0]);
  }
}
项目:big-c    文件:TestSaslRPC.java   
@Test
public void testDigestRpcWithoutAnnotation() throws Exception {
  TestTokenSecretManager sm = new TestTokenSecretManager();
  try {
    SecurityUtil.setSecurityInfoProviders(new CustomSecurityInfo());
    final Server server = new RPC.Builder(conf)
        .setProtocol(TestSaslProtocol.class).setInstance(new TestSaslImpl())
        .setBindAddress(ADDRESS).setPort(0).setNumHandlers(5)
        .setVerbose(true).setSecretManager(sm).build();
    doDigestRpc(server, sm);
  } finally {
    SecurityUtil.setSecurityInfoProviders(new SecurityInfo[0]);
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestSaslRPC.java   
@Test
public void testDigestRpcWithoutAnnotation() throws Exception {
  TestTokenSecretManager sm = new TestTokenSecretManager();
  try {
    SecurityUtil.setSecurityInfoProviders(new CustomSecurityInfo());
    final Server server = new RPC.Builder(conf)
        .setProtocol(TestSaslProtocol.class).setInstance(new TestSaslImpl())
        .setBindAddress(ADDRESS).setPort(0).setNumHandlers(5)
        .setVerbose(true).setSecretManager(sm).build();
    doDigestRpc(server, sm);
  } finally {
    SecurityUtil.setSecurityInfoProviders(new SecurityInfo[0]);
  }
}
项目:hadoop-plus    文件:TestSaslRPC.java   
@Test
public void testDigestRpcWithoutAnnotation() throws Exception {
  TestTokenSecretManager sm = new TestTokenSecretManager();
  try {
    SecurityUtil.setSecurityInfoProviders(new CustomSecurityInfo());
    final Server server = new RPC.Builder(conf)
        .setProtocol(TestSaslProtocol.class).setInstance(new TestSaslImpl())
        .setBindAddress(ADDRESS).setPort(0).setNumHandlers(5)
        .setVerbose(true).setSecretManager(sm).build();
    doDigestRpc(server, sm);
  } finally {
    SecurityUtil.setSecurityInfoProviders(new SecurityInfo[0]);
  }
}
项目:incubator-asterixdb-hyracks    文件:YarnClientRMConnection.java   
public YarnClientRMConnection(YarnConfiguration config) {
    this.config = config;
    InetSocketAddress remoteAddress = NetUtils.createSocketAddr(config.get(YarnConfiguration.RM_ADDRESS,
            YarnConfiguration.DEFAULT_RM_ADDRESS));
    Configuration appsManagerServerConf = new Configuration(config);
    appsManagerServerConf.setClass(YarnConfiguration.YARN_SECURITY_SERVICE_AUTHORIZATION_CLIENT_RESOURCEMANAGER,
            ClientRMSecurityInfo.class, SecurityInfo.class);
    YarnRPC rpc = YarnRPC.create(appsManagerServerConf);
    crmp = ((ClientRMProtocol) rpc.getProxy(ClientRMProtocol.class, remoteAddress, appsManagerServerConf));
}
项目:hadoop-TCP    文件:TestSaslRPC.java   
@Test
public void testDigestRpcWithoutAnnotation() throws Exception {
  TestTokenSecretManager sm = new TestTokenSecretManager();
  try {
    SecurityUtil.setSecurityInfoProviders(new CustomSecurityInfo());
    final Server server = new RPC.Builder(conf)
        .setProtocol(TestSaslProtocol.class).setInstance(new TestSaslImpl())
        .setBindAddress(ADDRESS).setPort(0).setNumHandlers(5)
        .setVerbose(true).setSecretManager(sm).build();
    doDigestRpc(server, sm);
  } finally {
    SecurityUtil.setSecurityInfoProviders(new SecurityInfo[0]);
  }
}
项目:hardfs    文件:TestSaslRPC.java   
@Test
public void testDigestRpcWithoutAnnotation() throws Exception {
  TestTokenSecretManager sm = new TestTokenSecretManager();
  try {
    SecurityUtil.setSecurityInfoProviders(new CustomSecurityInfo());
    final Server server = new RPC.Builder(conf)
        .setProtocol(TestSaslProtocol.class).setInstance(new TestSaslImpl())
        .setBindAddress(ADDRESS).setPort(0).setNumHandlers(5)
        .setVerbose(true).setSecretManager(sm).build();
    doDigestRpc(server, sm);
  } finally {
    SecurityUtil.setSecurityInfoProviders(new SecurityInfo[0]);
  }
}
项目:hadoop-on-lustre2    文件:TestSaslRPC.java   
@Test
public void testDigestRpcWithoutAnnotation() throws Exception {
  TestTokenSecretManager sm = new TestTokenSecretManager();
  try {
    SecurityUtil.setSecurityInfoProviders(new CustomSecurityInfo());
    final Server server = new RPC.Builder(conf)
        .setProtocol(TestSaslProtocol.class).setInstance(new TestSaslImpl())
        .setBindAddress(ADDRESS).setPort(0).setNumHandlers(5)
        .setVerbose(true).setSecretManager(sm).build();
    doDigestRpc(server, sm);
  } finally {
    SecurityUtil.setSecurityInfoProviders(new SecurityInfo[0]);
  }
}