@Override
    public HiveAuthorizer createHiveAuthorizer(HiveMetastoreClientFactory metastoreClientFactory,
        HiveConf conf, HiveAuthenticationProvider authenticator, HiveAuthzSessionContext ctx) {
      username = authenticator.getUserName();
      HiveAccessController acontroller = Mockito.mock(HiveAccessController.class);
      return new HiveAuthorizerImpl(acontroller, null);
    }
dummy hive authorizer that stores the user name
ql/src/test/org/apache/hadoop/hive/ql/parse/authorization/TestSessionUserName.java