private void checkAccess ( JobInProgress job , QueueManager . QueueOperation oper , UserGroupInformation ugi ) throws IOException { // get the queue String queue = job . getProfile ( ) . getQueueName ( ) ; if ( ! queueManager . hasAccess ( queue , job , oper , ugi ) ) { throw new AccessControlException ( "User " + ugi . getUserName ( ) + " cannot perform " + "operation " + oper + " on queue " + queue + ".\n Please run \"hadoop queue -showacls\" " + "command to find the queues you have access" + " to ." ) ; } }
use the passed ugi for checking the access