In yarn-env.sh, you can find:
# For setting YARN specific HEAP sizes please use this
# Parameter and set appropriately
In hadoop-env.sh, you can find:
# The maximum amount of heap to use, in MB. Default is 1000.
So, uncomment them and change them to the required values you want. Restart Hadoop and it will go.