[HBASE-10709] Fix the bug of rejecting exception in HTableClientScanner when too many scanner running at the same time.

Author: daviddeng

Summary:
`SynchronousQueue` is replaced with `LinkedBlockingQueue`
Background thread is no longer blocked waiting for main thread to consume the data.

Test Plan: `TestHTableClientScanner`

Reviewers: liyintang, manukranthk, elliott, ehwang

Reviewed By: ehwang

CC: hbase-eng@, elliott, ehwang

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

Task ID: 4073520

git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/0.89-fb@1588111 13f79535-47bb-0310-9956-ffa450edef68
[HBASE-10975] HtableMultiplexer to use executor

Author: adela

Summary:
Adding ScheduledExecutor to deal with thread creation and execution instead of doing that via creating new Thread.
Also making the code a little bit smaller with that :)

Test Plan: created a unit test which spawns 10 client threads doing 10k puts each

Reviewers: liyintang, daviddeng

Reviewed By: daviddeng

CC: hbase-eng@, daviddeng

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

git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/0.89-fb@1588112 13f79535-47bb-0310-9956-ffa450edef68
[master] Fix unstable testcase TestGlobalMemStoreSize

Author: daviddeng

Summary:
The reason of being unstable is that after you force a flush on regions of META table, it's possible some other updates to META table is inserted before asserting. Then the mem-store is non empty again and the testcase failed.

The workaround is to skip assertion for the server with META table's regions.

More information is logged.

Test Plan: `TestGlobalMemStoreSize`

Reviewers: liyintang, manukranthk, gauravm, elliott

Reviewed By: elliott

CC: hbase-eng@, elliott

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

Task ID: 4138742

git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/0.89-fb@1588113 13f79535-47bb-0310-9956-ffa450edef68
[HBASE-10907] Stabilize TestRegionPlacement addendum

Author: elliott

Summary:
TestRegionPlacement can be flakey even after the last change.
There are several differernt things fixed here:

* The test where servers are killed make tests hard to compute
* Sometimes regions take a while to open because there are other things happening (other tests or slow disk)
* Sometimes metrics are in flux.
* Sometimes meta is in the middle of being updated.

So the final solution was:

* Add script to help with running tests in a loop to try and see how stable things are.
* Split tests into test cases that kill servers (Only one currently) and other that are non-destructive.
* Split up test cases into multiple tests
* Added code to make sure that region placement has reached a stable place before asserting anything.
* Added code to make sure that table creation and assignment is complete.
* loosened up the testing of number region opens as it's possible that regions take too long to open up and so are opened on non preferred servers.

Test Plan:
bin/test/loop_tests.sh -t TestRegionPlacement
bin/test/loop_tests.sh -t TestRegionPlacementDestructive

Reviewers: daviddeng, liyintang, adela

Reviewed By: adela

CC: hbase-eng@

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

Task ID: 2747703

git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/0.89-fb@1588114 13f79535-47bb-0310-9956-ffa450edef68
[Master] Fix TestRegionChecker

Author: liyintang

Summary: There was a bug in the TestRegionChecker. In the unit tests, the test function tries to verify whether avDetDayAfter contains all the re-assigned regions. However, the ROOT region will not be included in such collection based on the design of the HRegionChecker. Therefore, the fix is to exclude the ROOT region from the checking.

Test Plan: will run this unit tests multiple times to verify

Reviewers: rshroff

Reviewed By: rshroff

CC: hbase-dev@

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

Task ID: 3297398

git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/0.89-fb@1588115 13f79535-47bb-0310-9956-ffa450edef68
[HBASE-2000] Adding RegionObserver

Author: adela

Summary: https://our.intern.facebook.com/intern/wiki/index.php/HBase/Coprocessor/Observers

Test Plan: unit test

Reviewers: daviddeng, liyintang

Reviewed By: daviddeng

CC: hbase-eng@

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

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