Rebased HBASE-11730 for branch-1