Problem scenario
You run sudo bash start-yarn.sh but you receive this message:
ERROR: Attempting to operate on yarn resourcemanager as root
ERROR: but there is no YARN_RESOURCEMANAGER_USER defined. Aborting operation.
What should you do?
Solution
1. Modify start-yarn.sh. Underneath the last section of comments, place three lines with the following text:
YARN_RESOURCEMANAGER_USER=root
HADOOP_SECURE_DN_USER=yarn
YARN_NODEMANAGER_USER=root
2. Modify stop-yarn.sh.
…