List of usage examples for org.apache.hadoop.yarn.api ApplicationClientProtocol getDelegationToken
@Public @Stable @Idempotent public GetDelegationTokenResponse getDelegationToken(GetDelegationTokenRequest request) throws YarnException, IOException;
The interface used by clients to get delegation token, enabling the containers to be able to talk to the service using those tokens.
From source file:org.springframework.yarn.client.ClientRmTemplate.java
License:Apache License
@Override public Token getDelegationToken(final String renewer) { return execute(new YarnRpcCallback<Token, ApplicationClientProtocol>() { @Override//from w w w .jav a 2 s .c om public Token doInYarn(ApplicationClientProtocol proxy) throws YarnException, IOException { GetDelegationTokenRequest request = Records.newRecord(GetDelegationTokenRequest.class); request.setRenewer(renewer); return proxy.getDelegationToken(request).getRMDelegationToken(); } }); }