Refine the code.
Merge remote-tracking branch 'origin/hbase-11339-core-sweep-tool' into hbase-11339-clean-code-after-hcd