HBASE-11509 Forward port HBASE-11039 to trunk and branch-1 after
HBASE-11489 (Ram)