[HBASE-10503] Add metrics for compaction hook

Author: adela

Summary:
Added metrics for
- how many bytes we saved with the hook
- how many KVs we transformed

Test Plan: modified TestLowerToUpperCompactionHook

Reviewers: aaiyer, liyintang

Reviewed By: aaiyer

CC: hbase-eng@, gauravm

Differential Revision: https://phabricator.fb.com/D1159919

Task ID: 3637276

git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/0.89-fb@1567723 13f79535-47bb-0310-9956-ffa450edef68
[HBASE-10496] Add MurmurHash3

Author: gauravm

Summary:
I found that the hashing algorithm that we use is the 32-bit MurmurHash version 2.

It seems there is a newer hash function in the same family, which according to the authors is about 25-30% faster. (https://code.google.com/p/smhasher/source/browse/wiki/MurmurHash3.wiki)

I ran a benchmark to verify this in https://phabricator.fb.com/P5616093. The results are as follows:
Murmur Hash 3 time taken: 17.022
Murmur Hash 3 encoding speed: 1434.265215603337 MB/s

Murmur Hash 2 time taken: 20.446
Murmur Hash 2 encoding speed: 1194.0752469920767 MB/s

I will write another benchmark to verify the collision resistance of MurmurHash3 when I get some bandwidth, and check how it improves/worsens the performance of ByteBloomFilter.

This has also been ported to open-source HBase in HBASE-9631.

Test Plan: Unit Tests

Reviewers: liyintang, adela, aaiyer, manukranthk, fan, daviddeng, weichen

Reviewed By: manukranthk

CC: hbase-eng@

Differential Revision: https://phabricator.fb.com/D1168344

Task ID: 3696318

git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/0.89-fb@1567724 13f79535-47bb-0310-9956-ffa450edef68
[master] Force double flushes in HRegion.close() to prevent data loss

Author: fan

Summary: Force double flushes in HRegion.close() to prevent data loss.

Test Plan: A new unit test to verify region close when store's snapshot is not empty.

Reviewers: liyintang, gauravm, adela, aaiyer, jiqingt, manukranthk

Reviewed By: aaiyer

CC: hbase-dev@

Differential Revision: https://phabricator.fb.com/D1163424

Task ID: 3621385

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