Java 类org.apache.hadoop.security.token.delegation.TestDelegationToken.TestDelegationTokenSecretManager 实例源码

项目:hadoop-oss    文件:TestToken.java   
public void testDecodeIdentifier() throws IOException {
  TestDelegationTokenSecretManager secretManager =
    new TestDelegationTokenSecretManager(0, 0, 0, 0);
  secretManager.startThreads();
  TestDelegationTokenIdentifier id = new TestDelegationTokenIdentifier(
      new Text("owner"), new Text("renewer"), new Text("realUser"));

  Token<TestDelegationTokenIdentifier> token =
    new Token<TestDelegationTokenIdentifier>(id, secretManager);
  TokenIdentifier idCopy = token.decodeIdentifier();

  assertNotSame(id, idCopy);
  assertEquals(id, idCopy);
}
项目:hadoop-oss    文件:MiniRPCBenchmark.java   
/** Start RPC server */
MiniServer(Configuration conf, String user, String keytabFile)
throws IOException {
  UserGroupInformation.setConfiguration(conf);
  UserGroupInformation.loginUserFromKeytab(user, keytabFile);
  secretManager = 
    new TestDelegationTokenSecretManager(24*60*60*1000,
        7*24*60*60*1000,24*60*60*1000,3600000);
  secretManager.startThreads();
  rpcServer = new RPC.Builder(conf).setProtocol(MiniProtocol.class)
      .setInstance(this).setBindAddress(DEFAULT_SERVER_ADDRESS).setPort(0)
      .setNumHandlers(1).setVerbose(false).setSecretManager(secretManager)
      .build();
  rpcServer.start();
}
项目:hadoop    文件:TestToken.java   
public void testDecodeIdentifier() throws IOException {
  TestDelegationTokenSecretManager secretManager =
    new TestDelegationTokenSecretManager(0, 0, 0, 0);
  secretManager.startThreads();
  TestDelegationTokenIdentifier id = new TestDelegationTokenIdentifier(
      new Text("owner"), new Text("renewer"), new Text("realUser"));

  Token<TestDelegationTokenIdentifier> token =
    new Token<TestDelegationTokenIdentifier>(id, secretManager);
  TokenIdentifier idCopy = token.decodeIdentifier();

  assertNotSame(id, idCopy);
  assertEquals(id, idCopy);
}
项目:hadoop    文件:MiniRPCBenchmark.java   
/** Start RPC server */
MiniServer(Configuration conf, String user, String keytabFile)
throws IOException {
  UserGroupInformation.setConfiguration(conf);
  UserGroupInformation.loginUserFromKeytab(user, keytabFile);
  secretManager = 
    new TestDelegationTokenSecretManager(24*60*60*1000,
        7*24*60*60*1000,24*60*60*1000,3600000);
  secretManager.startThreads();
  rpcServer = new RPC.Builder(conf).setProtocol(MiniProtocol.class)
      .setInstance(this).setBindAddress(DEFAULT_SERVER_ADDRESS).setPort(0)
      .setNumHandlers(1).setVerbose(false).setSecretManager(secretManager)
      .build();
  rpcServer.start();
}
项目:aliyun-oss-hadoop-fs    文件:TestToken.java   
public void testDecodeIdentifier() throws IOException {
  TestDelegationTokenSecretManager secretManager =
    new TestDelegationTokenSecretManager(0, 0, 0, 0);
  secretManager.startThreads();
  TestDelegationTokenIdentifier id = new TestDelegationTokenIdentifier(
      new Text("owner"), new Text("renewer"), new Text("realUser"));

  Token<TestDelegationTokenIdentifier> token =
    new Token<TestDelegationTokenIdentifier>(id, secretManager);
  TokenIdentifier idCopy = token.decodeIdentifier();

  assertNotSame(id, idCopy);
  assertEquals(id, idCopy);
}
项目:aliyun-oss-hadoop-fs    文件:MiniRPCBenchmark.java   
/** Start RPC server */
MiniServer(Configuration conf, String user, String keytabFile)
throws IOException {
  UserGroupInformation.setConfiguration(conf);
  UserGroupInformation.loginUserFromKeytab(user, keytabFile);
  secretManager = 
    new TestDelegationTokenSecretManager(24*60*60*1000,
        7*24*60*60*1000,24*60*60*1000,3600000);
  secretManager.startThreads();
  rpcServer = new RPC.Builder(conf).setProtocol(MiniProtocol.class)
      .setInstance(this).setBindAddress(DEFAULT_SERVER_ADDRESS).setPort(0)
      .setNumHandlers(1).setVerbose(false).setSecretManager(secretManager)
      .build();
  rpcServer.start();
}
项目:big-c    文件:TestToken.java   
public void testDecodeIdentifier() throws IOException {
  TestDelegationTokenSecretManager secretManager =
    new TestDelegationTokenSecretManager(0, 0, 0, 0);
  secretManager.startThreads();
  TestDelegationTokenIdentifier id = new TestDelegationTokenIdentifier(
      new Text("owner"), new Text("renewer"), new Text("realUser"));

  Token<TestDelegationTokenIdentifier> token =
    new Token<TestDelegationTokenIdentifier>(id, secretManager);
  TokenIdentifier idCopy = token.decodeIdentifier();

  assertNotSame(id, idCopy);
  assertEquals(id, idCopy);
}
项目:big-c    文件:MiniRPCBenchmark.java   
/** Start RPC server */
MiniServer(Configuration conf, String user, String keytabFile)
throws IOException {
  UserGroupInformation.setConfiguration(conf);
  UserGroupInformation.loginUserFromKeytab(user, keytabFile);
  secretManager = 
    new TestDelegationTokenSecretManager(24*60*60*1000,
        7*24*60*60*1000,24*60*60*1000,3600000);
  secretManager.startThreads();
  rpcServer = new RPC.Builder(conf).setProtocol(MiniProtocol.class)
      .setInstance(this).setBindAddress(DEFAULT_SERVER_ADDRESS).setPort(0)
      .setNumHandlers(1).setVerbose(false).setSecretManager(secretManager)
      .build();
  rpcServer.start();
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestToken.java   
public void testDecodeIdentifier() throws IOException {
  TestDelegationTokenSecretManager secretManager =
    new TestDelegationTokenSecretManager(0, 0, 0, 0);
  secretManager.startThreads();
  TestDelegationTokenIdentifier id = new TestDelegationTokenIdentifier(
      new Text("owner"), new Text("renewer"), new Text("realUser"));

  Token<TestDelegationTokenIdentifier> token =
    new Token<TestDelegationTokenIdentifier>(id, secretManager);
  TokenIdentifier idCopy = token.decodeIdentifier();

  assertNotSame(id, idCopy);
  assertEquals(id, idCopy);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:MiniRPCBenchmark.java   
/** Start RPC server */
MiniServer(Configuration conf, String user, String keytabFile)
throws IOException {
  UserGroupInformation.setConfiguration(conf);
  UserGroupInformation.loginUserFromKeytab(user, keytabFile);
  secretManager = 
    new TestDelegationTokenSecretManager(24*60*60*1000,
        7*24*60*60*1000,24*60*60*1000,3600000);
  secretManager.startThreads();
  rpcServer = new RPC.Builder(conf).setProtocol(MiniProtocol.class)
      .setInstance(this).setBindAddress(DEFAULT_SERVER_ADDRESS).setPort(0)
      .setNumHandlers(1).setVerbose(false).setSecretManager(secretManager)
      .build();
  rpcServer.start();
}
项目:hadoop-plus    文件:TestToken.java   
public void testDecodeIdentifier() throws IOException {
  TestDelegationTokenSecretManager secretManager =
    new TestDelegationTokenSecretManager(0, 0, 0, 0);
  secretManager.startThreads();
  TestDelegationTokenIdentifier id = new TestDelegationTokenIdentifier(
      new Text("owner"), new Text("renewer"), new Text("realUser"));

  Token<TestDelegationTokenIdentifier> token =
    new Token<TestDelegationTokenIdentifier>(id, secretManager);
  TokenIdentifier idCopy = token.decodeIdentifier();

  assertNotSame(id, idCopy);
  assertEquals(id, idCopy);
}
项目:hadoop-plus    文件:MiniRPCBenchmark.java   
/** Start RPC server */
MiniServer(Configuration conf, String user, String keytabFile)
throws IOException {
  UserGroupInformation.setConfiguration(conf);
  UserGroupInformation.loginUserFromKeytab(user, keytabFile);
  secretManager = 
    new TestDelegationTokenSecretManager(24*60*60*1000,
        7*24*60*60*1000,24*60*60*1000,3600000);
  secretManager.startThreads();
  rpcServer = new RPC.Builder(conf).setProtocol(MiniProtocol.class)
      .setInstance(this).setBindAddress(DEFAULT_SERVER_ADDRESS).setPort(0)
      .setNumHandlers(1).setVerbose(false).setSecretManager(secretManager)
      .build();
  rpcServer.start();
}
项目:hops    文件:TestToken.java   
public void testDecodeIdentifier() throws IOException {
  TestDelegationTokenSecretManager secretManager =
    new TestDelegationTokenSecretManager(0, 0, 0, 0);
  secretManager.startThreads();
  TestDelegationTokenIdentifier id = new TestDelegationTokenIdentifier(
      new Text("owner"), new Text("renewer"), new Text("realUser"));

  Token<TestDelegationTokenIdentifier> token =
    new Token<TestDelegationTokenIdentifier>(id, secretManager);
  TokenIdentifier idCopy = token.decodeIdentifier();

  assertNotSame(id, idCopy);
  assertEquals(id, idCopy);
}
项目:hops    文件:MiniRPCBenchmark.java   
/** Start RPC server */
MiniServer(Configuration conf, String user, String keytabFile)
throws IOException {
  UserGroupInformation.setConfiguration(conf);
  UserGroupInformation.loginUserFromKeytab(user, keytabFile);
  secretManager = 
    new TestDelegationTokenSecretManager(24*60*60*1000,
        7*24*60*60*1000,24*60*60*1000,3600000);
  secretManager.startThreads();
  rpcServer = new RPC.Builder(conf).setProtocol(MiniProtocol.class)
      .setInstance(this).setBindAddress(DEFAULT_SERVER_ADDRESS).setPort(0)
      .setNumHandlers(1).setVerbose(false).setSecretManager(secretManager)
      .build();
  rpcServer.start();
}
项目:hadoop-TCP    文件:TestToken.java   
public void testDecodeIdentifier() throws IOException {
  TestDelegationTokenSecretManager secretManager =
    new TestDelegationTokenSecretManager(0, 0, 0, 0);
  secretManager.startThreads();
  TestDelegationTokenIdentifier id = new TestDelegationTokenIdentifier(
      new Text("owner"), new Text("renewer"), new Text("realUser"));

  Token<TestDelegationTokenIdentifier> token =
    new Token<TestDelegationTokenIdentifier>(id, secretManager);
  TokenIdentifier idCopy = token.decodeIdentifier();

  assertNotSame(id, idCopy);
  assertEquals(id, idCopy);
}
项目:hadoop-TCP    文件:MiniRPCBenchmark.java   
/** Start RPC server */
MiniServer(Configuration conf, String user, String keytabFile)
throws IOException {
  UserGroupInformation.setConfiguration(conf);
  UserGroupInformation.loginUserFromKeytab(user, keytabFile);
  secretManager = 
    new TestDelegationTokenSecretManager(24*60*60*1000,
        7*24*60*60*1000,24*60*60*1000,3600000);
  secretManager.startThreads();
  rpcServer = new RPC.Builder(conf).setProtocol(MiniProtocol.class)
      .setInstance(this).setBindAddress(DEFAULT_SERVER_ADDRESS).setPort(0)
      .setNumHandlers(1).setVerbose(false).setSecretManager(secretManager)
      .build();
  rpcServer.start();
}
项目:hadoop-on-lustre    文件:MiniRPCBenchmark.java   
/** Start RPC server */
MiniServer(Configuration conf, String user, String keytabFile)
throws IOException {
  UserGroupInformation.setConfiguration(conf);
  UserGroupInformation.loginUserFromKeytab(user, keytabFile);
  secretManager = 
    new TestDelegationTokenSecretManager(24*60*60*1000,
        7*24*60*60*1000,24*60*60*1000,3600000);
  secretManager.startThreads();
  rpcServer = RPC.getServer(
      this, DEFAULT_SERVER_ADDRESS, 0, 1, false, conf, secretManager);
  rpcServer.start();
}
项目:hardfs    文件:TestToken.java   
public void testDecodeIdentifier() throws IOException {
  TestDelegationTokenSecretManager secretManager =
    new TestDelegationTokenSecretManager(0, 0, 0, 0);
  secretManager.startThreads();
  TestDelegationTokenIdentifier id = new TestDelegationTokenIdentifier(
      new Text("owner"), new Text("renewer"), new Text("realUser"));

  Token<TestDelegationTokenIdentifier> token =
    new Token<TestDelegationTokenIdentifier>(id, secretManager);
  TokenIdentifier idCopy = token.decodeIdentifier();

  assertNotSame(id, idCopy);
  assertEquals(id, idCopy);
}
项目:hardfs    文件:MiniRPCBenchmark.java   
/** Start RPC server */
MiniServer(Configuration conf, String user, String keytabFile)
throws IOException {
  UserGroupInformation.setConfiguration(conf);
  UserGroupInformation.loginUserFromKeytab(user, keytabFile);
  secretManager = 
    new TestDelegationTokenSecretManager(24*60*60*1000,
        7*24*60*60*1000,24*60*60*1000,3600000);
  secretManager.startThreads();
  rpcServer = new RPC.Builder(conf).setProtocol(MiniProtocol.class)
      .setInstance(this).setBindAddress(DEFAULT_SERVER_ADDRESS).setPort(0)
      .setNumHandlers(1).setVerbose(false).setSecretManager(secretManager)
      .build();
  rpcServer.start();
}
项目:hadoop-on-lustre2    文件:TestToken.java   
public void testDecodeIdentifier() throws IOException {
  TestDelegationTokenSecretManager secretManager =
    new TestDelegationTokenSecretManager(0, 0, 0, 0);
  secretManager.startThreads();
  TestDelegationTokenIdentifier id = new TestDelegationTokenIdentifier(
      new Text("owner"), new Text("renewer"), new Text("realUser"));

  Token<TestDelegationTokenIdentifier> token =
    new Token<TestDelegationTokenIdentifier>(id, secretManager);
  TokenIdentifier idCopy = token.decodeIdentifier();

  assertNotSame(id, idCopy);
  assertEquals(id, idCopy);
}
项目:hadoop-on-lustre2    文件:MiniRPCBenchmark.java   
/** Start RPC server */
MiniServer(Configuration conf, String user, String keytabFile)
throws IOException {
  UserGroupInformation.setConfiguration(conf);
  UserGroupInformation.loginUserFromKeytab(user, keytabFile);
  secretManager = 
    new TestDelegationTokenSecretManager(24*60*60*1000,
        7*24*60*60*1000,24*60*60*1000,3600000);
  secretManager.startThreads();
  rpcServer = new RPC.Builder(conf).setProtocol(MiniProtocol.class)
      .setInstance(this).setBindAddress(DEFAULT_SERVER_ADDRESS).setPort(0)
      .setNumHandlers(1).setVerbose(false).setSecretManager(secretManager)
      .build();
  rpcServer.start();
}
项目:hortonworks-extension    文件:MiniRPCBenchmark.java   
/** Start RPC server */
MiniServer(Configuration conf, String user, String keytabFile)
throws IOException {
  UserGroupInformation.setConfiguration(conf);
  UserGroupInformation.loginUserFromKeytab(user, keytabFile);
  secretManager = 
    new TestDelegationTokenSecretManager(24*60*60*1000,
        7*24*60*60*1000,24*60*60*1000,3600000);
  secretManager.startThreads();
  rpcServer = RPC.getServer(
      this, DEFAULT_SERVER_ADDRESS, 0, 1, false, conf, secretManager);
  rpcServer.start();
}
项目:hortonworks-extension    文件:MiniRPCBenchmark.java   
/** Start RPC server */
MiniServer(Configuration conf, String user, String keytabFile)
throws IOException {
  UserGroupInformation.setConfiguration(conf);
  UserGroupInformation.loginUserFromKeytab(user, keytabFile);
  secretManager = 
    new TestDelegationTokenSecretManager(24*60*60*1000,
        7*24*60*60*1000,24*60*60*1000,3600000);
  secretManager.startThreads();
  rpcServer = RPC.getServer(
      this, DEFAULT_SERVER_ADDRESS, 0, 1, false, conf, secretManager);
  rpcServer.start();
}