YARN-2726. CapacityScheduler should explicitly log when an accessible label has no capacity. Contributed by Wangda Tan
YARN-2591. Fixed AHSWebServices to return FORBIDDEN(403) if the request user doesn't have access to the history data. Contributed by Zhijie Shen
(cherry picked from commit c05b581a5522eed499d3ba16af9fa6dc694563f6)
HDFS-7296. HdfsConstants#MEMORY_STORAGE_POLICY_ID and HdfsConstants#MEMORY_STORAGE_POLICY_ID are missing in branch-2. Contributed by Jing Zhao.
HDFS-6934. Move checksum computation off the hot path when writing to RAM disk. Contributed by Chris Nauroth.

(cherry picked from commit 463aec11718e47d4aabb86a7a539cb973460aae6)

Conflicts:
	hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
	hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSOutputStream.java

(cherry picked from commit 3d67da502aa21d314d672f8b465d5415d77b5df0)

Conflicts:
	hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/BlockReaderLocal.java
HDFS-6934. Revert files accidentally committed.

(cherry picked from commit 5b1dfe78b8b06335bed0bcb83f12bb936d4c021b)
(cherry picked from commit 5dbd27f8b4923daea6e70b0bfe5cd3063a5f1f57)
YARN-2704. Changed ResourceManager to optionally obtain tokens itself for the sake of localization and log-aggregation for long-running services. Contributed by Jian He.

(cherry picked from commit a16d022ca4313a41425c8e97841c841a2d6f2f54)
HDFS-7128. Decommission slows way down when it gets towards the end. Contributed by Ming Ma.

(cherry picked from commit 80cb472620f0a7889e311ca32212a42b95c6794e)
(cherry picked from commit 7e949744b14e540cc2824eae8e01a3d99714d662)

Conflicts:
	hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
	hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeDescriptor.java
YARN-2502. Changed DistributedShell to support node labels. Contributed by Wangda Tan
(cherry picked from commit f6b963fdfc517429149165e4bb6fb947be6e3c99)
MAPREDUCE-5933. Enabled MR AM to post history events to the timeline server. Contributed by Robert Kanter.

(cherry picked from commit 6b2f11b54bc679b0715fe66bd129e340e8c61c5c)
MAPREDUCE-6018. Added an MR specific config to enable emitting job history data to the timeline server. Contributed by Robert Kanter.

(cherry picked from commit 971e91c8c03a23e4613ed3f071b4f982ee5a1b63)
HDFS-6995. Block should be placed in the client's 'rack-local' node if 'client-local' node is not available (vinayakumarb)

(cherry picked from commit ed841dd9a96e54cb84d9cae5507e47ff1c8cdf6e)
(cherry picked from commit 5f58886770958fe9a0d1499f1d866c8534c6b90e)

Conflicts:
	hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
HDFS-6995. Block should be placed in the client's 'rack-local' node if 'client-local' node is not available (vinayakumarb)
Adding missed test file

(cherry picked from commit cba1f9e3896c0526fa748cd1bb13470d5fae584a)
(cherry picked from commit fea721daf95cfaa487ce9877e5355c6672cb3cd3)
HADOOP-11233. hadoop.security.kms.client.encrypted.key.cache.expiry property spelled wrong in core-default. (Stephen Chu via yliu)