private void setupSessionAcls(Configuration tezConf, HiveConf hiveConf) throws
      IOException {

    // TODO: De-link from SessionState. A TezSession can be linked to different Hive Sessions via the pool.
    String user = SessionState.getUserFromAuthenticator();
    UserGroupInformation loginUserUgi = UserGroupInformation.getLoginUser();
    String loginUser =
        loginUserUgi == null ? null : loginUserUgi.getShortUserName();
    boolean addHs2User =
        HiveConf.getBoolVar(hiveConf, ConfVars.HIVE_TEZ_HS2_USER_ACCESS);

    String viewStr = Utilities.getAclStringWithHiveModification(tezConf,
            TezConfiguration.TEZ_AM_VIEW_ACLS, addHs2User, user, loginUser);
    String modifyStr = Utilities.getAclStringWithHiveModification(tezConf,
            TezConfiguration.TEZ_AM_MODIFY_ACLS, addHs2User, user, loginUser);

    if (LOG.isDebugEnabled()) {
      // TODO: De-link from SessionState. A TezSession can be linked to different Hive Sessions via the pool.
      LOG.debug(
          "Setting Tez Session access for sessionId={} with viewAclString={}, modifyStr={}",
          SessionState.get().getSessionId(), viewStr, modifyStr);
    }

    tezConf.set(TezConfiguration.TEZ_AM_VIEW_ACLS, viewStr);
    tezConf.set(TezConfiguration.TEZ_AM_MODIFY_ACLS, modifyStr);
  }
This takes settings from MR and applies them to the appropriate Tez configuration. This is
similar to what Pig on Tez does (refer MRToTezHelper.java).

@param conf configuration with MR settings
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java