if (UserGroupInformation.isSecurityEnabled()) {
org.apache.hadoop.yarn.api.records.Token clientToAMToken =
application.getClientToAMToken();
Token<ClientToAMTokenIdentifier> token =
ConverterUtils.convertFromYarn(clientToAMToken, serviceAddr);
newUgi.addToken(token);
realProxy =
newUgi.doAs(new PrivilegedExceptionAction<SliderClusterProtocol>() {
@Override
public SliderClusterProtocol run() throws IOException {
return connectToServer(serviceAddr, newUgi, conf, rpcTimeout);