To add to Till's comment, setting `HADOOP_USER_NAME` in your environment is probably the easiest way if you are using CLI.
If you are launching the job programmatically, e.g. using YarnClusterDescriptor , there're many ways to set `HADOOP_USER_NAME` as well, please share more information if you are going down that path.
Alternatively if you are set to use UserGroupInformation and "yarn" is super user in your cluster, you can also try out proxy user approach .
Hope this helps.