Refine the code according to Jon's comments.
Refine the code.
Merge remote-tracking branch 'origin/hbase-11339-core' into hbase-11339-core-snapshot