I've created the patch to make AM send blacklist nodes to RM. Basically the logical is described as follows:
1. Add blacklistAdditions and blacklistRemovals to remember the blacklisted nodes added or removed between two allocate calls. The two collections will be sent to RM in upcoming allocate call.
2. Whenever a container fails on a host, the host will be blacklisted, and will add to blacklistAdditions if blacklist is not ignored.
3. When changing from not ignoring blacklist to ignoring, we added all the blacklist nodes to blacklistRemovals.
4. When changing from ignoring blacklist to not ignoring, we added all the blacklist nodes to blacklistAdditions.
5. Switching between ignoring and not ignoring blacklist nodes will not effect until the upcoming allocate call, but anyway, it will effect eventually.
Test cases have been modified test whether RM is aware of the blacklisted nodes.