I had to recreate my cluster before I could try this out, and found that when I changed YARN memory limits Ambari suggested a load of other configuration changes to go with it, including MapReduce memory options. (I don’t remember it doing that previously.) If I accepted its recommendations I found that I didn’t hit this problem again, and the logged YARN messages I saw indicated that the the memory limit for a container that I’d configured was the one being used. (I’m still getting containers being killed, but it’s now complaining about lack of disk space – which sounds plausible.)
Thanks for you help