HBASE-10712 Backport HBASE-8304 to 0.94 and 0.96 (Haosdent)



git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/0.96@1575982 13f79535-47bb-0310-9956-ffa450edef68