org.apache.hadoop.yarn.security.client.ClientToAMTokenSecretManager Java Examples

The following examples show how to use org.apache.hadoop.yarn.security.client.ClientToAMTokenSecretManager. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TestClientToAMTokens.java    From hadoop with Apache License 2.0 6 votes vote down vote up
@Override
protected void serviceStart() throws Exception {
  Configuration conf = getConfig();

  Server server;
  try {
    secretMgr = new ClientToAMTokenSecretManager(
        this.appAttemptId, secretKey);
    server =
        new RPC.Builder(conf)
          .setProtocol(CustomProtocol.class)
          .setNumHandlers(1)
          .setSecretManager(secretMgr)
          .setInstance(this).build();
  } catch (Exception e) {
    throw new YarnRuntimeException(e);
  }
  server.start();
  this.address = NetUtils.getConnectAddress(server);
  super.serviceStart();
}
 
Example #2
Source File: TestClientToAMTokens.java    From big-c with Apache License 2.0 6 votes vote down vote up
@Override
protected void serviceStart() throws Exception {
  Configuration conf = getConfig();

  Server server;
  try {
    secretMgr = new ClientToAMTokenSecretManager(
        this.appAttemptId, secretKey);
    server =
        new RPC.Builder(conf)
          .setProtocol(CustomProtocol.class)
          .setNumHandlers(1)
          .setSecretManager(secretMgr)
          .setInstance(this).build();
  } catch (Exception e) {
    throw new YarnRuntimeException(e);
  }
  server.start();
  this.address = NetUtils.getConnectAddress(server);
  super.serviceStart();
}
 
Example #3
Source File: DAGClientServer.java    From tez with Apache License 2.0 5 votes vote down vote up
public DAGClientServer(DAGClientHandler realInstance,
    ApplicationAttemptId attemptId, FileSystem stagingFs) {
  super("DAGClientRPCServer");
  this.realInstance = realInstance;
  this.secretManager = new ClientToAMTokenSecretManager(attemptId, null);
  this.stagingFs = stagingFs;
}
 
Example #4
Source File: MRAppMaster.java    From hadoop with Apache License 2.0 4 votes vote down vote up
public RunningAppContext(Configuration config) {
  this.conf = config;
  this.clientToAMTokenSecretManager =
      new ClientToAMTokenSecretManager(appAttemptID, null);
}
 
Example #5
Source File: MRAppMaster.java    From hadoop with Apache License 2.0 4 votes vote down vote up
@Override
public ClientToAMTokenSecretManager getClientToAMTokenSecretManager() {
  return clientToAMTokenSecretManager;
}
 
Example #6
Source File: TestRuntimeEstimators.java    From hadoop with Apache License 2.0 4 votes vote down vote up
@Override
public ClientToAMTokenSecretManager getClientToAMTokenSecretManager() {
  return null;
}
 
Example #7
Source File: MockAppContext.java    From hadoop with Apache License 2.0 4 votes vote down vote up
public ClientToAMTokenSecretManager getClientToAMTokenSecretManager() {
  // Not implemented
  return null;
}
 
Example #8
Source File: JobHistory.java    From hadoop with Apache License 2.0 4 votes vote down vote up
@Override
public ClientToAMTokenSecretManager getClientToAMTokenSecretManager() {
  // Not implemented.
  return null;
}
 
Example #9
Source File: TestClientToAMTokens.java    From big-c with Apache License 2.0 4 votes vote down vote up
public ClientToAMTokenSecretManager getClientToAMTokenSecretManager() {
  return secretMgr;
}
 
Example #10
Source File: TestClientToAMTokens.java    From hadoop with Apache License 2.0 4 votes vote down vote up
public ClientToAMTokenSecretManager getClientToAMTokenSecretManager() {
  return secretMgr;
}
 
Example #11
Source File: MRAppMaster.java    From big-c with Apache License 2.0 4 votes vote down vote up
public RunningAppContext(Configuration config) {
  this.conf = config;
  this.clientToAMTokenSecretManager =
      new ClientToAMTokenSecretManager(appAttemptID, null);
}
 
Example #12
Source File: MRAppMaster.java    From big-c with Apache License 2.0 4 votes vote down vote up
@Override
public ClientToAMTokenSecretManager getClientToAMTokenSecretManager() {
  return clientToAMTokenSecretManager;
}
 
Example #13
Source File: TestRuntimeEstimators.java    From big-c with Apache License 2.0 4 votes vote down vote up
@Override
public ClientToAMTokenSecretManager getClientToAMTokenSecretManager() {
  return null;
}
 
Example #14
Source File: MockAppContext.java    From big-c with Apache License 2.0 4 votes vote down vote up
public ClientToAMTokenSecretManager getClientToAMTokenSecretManager() {
  // Not implemented
  return null;
}
 
Example #15
Source File: JobHistory.java    From big-c with Apache License 2.0 4 votes vote down vote up
@Override
public ClientToAMTokenSecretManager getClientToAMTokenSecretManager() {
  // Not implemented.
  return null;
}
 
Example #16
Source File: DAGClientServer.java    From incubator-tez with Apache License 2.0 4 votes vote down vote up
public DAGClientServer(DAGClientHandler realInstance,
    ApplicationAttemptId attemptId) {
  super("DAGClientRPCServer");
  this.realInstance = realInstance;
  this.secretManager = new ClientToAMTokenSecretManager(attemptId, null);
}
 
Example #17
Source File: AppContext.java    From hadoop with Apache License 2.0 votes vote down vote up
ClientToAMTokenSecretManager getClientToAMTokenSecretManager(); 
Example #18
Source File: AppContext.java    From big-c with Apache License 2.0 votes vote down vote up
ClientToAMTokenSecretManager getClientToAMTokenSecretManager();