YARN-4266, the recommendation was to use -u [uid]:[gid] numeric values to enforce user and group for the running user. In YARN-6623, this translated to --user=test --group-add=group1. The code no longer enforce group correctly for launched process.
In addition, the implementation in
YARN-6623 requires the user and group information to exist in container to translate username and group to uid/gid. For users on LDAP, there is no good way to populate container with user and group information.