[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
[HBASE-10986] Add Test timeouts to all hanging JUnit tests

Author: elliott

Summary: Some tests are hanging on Jenkins.  Add timeouts to all the junit4 tests.

Test Plan: mvn test

Reviewers: liyintang, daviddeng

Reviewed By: daviddeng

CC: hbase-eng@

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

Task ID: 4142789

git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/0.89-fb@1588117 13f79535-47bb-0310-9956-ffa450edef68
[master] Support arbitrary parameters and return value in endpoint.

Author: daviddeng

Summary: Implements `EndpointBytesCodec` converting between primitive types and `byte arrays.

Test Plan:
`TestEndpoint` was changed.
`TestEndpointBytesCodec` was added.

Reviewers: adela, gauravm, manukranthk

Reviewed By: adela

CC: hbase-eng@, andrewcox

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

git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/0.89-fb@1588118 13f79535-47bb-0310-9956-ffa450edef68
[HBASE-9930] Fix new HDFS dependencies

Author: manukranthk

Summary: On pulling the new HDFS dependencies, the trunk cannot be built. This diff is to fix it.

Test Plan: mvn -Dskiptests package

Reviewers: daviddeng, pritam, dikang, weiyan, hkuang, tomasz

Reviewed By: daviddeng

CC: hbase-eng@, andrewcox, jiqingt, elliott, gauravm

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

git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/0.89-fb@1588119 13f79535-47bb-0310-9956-ffa450edef68
[HBASE-9704] Tag TestClientLocalScanner#testLocalScannerWithHardlinks as unstable.

Author: manukranthk

Summary: Follow up task : 3864238

Test Plan: Tagging ustable

Reviewers: daviddeng

Reviewed By: daviddeng

CC: hbase-eng@

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

Task ID: 3864238

git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/0.89-fb@1588120 13f79535-47bb-0310-9956-ffa450edef68
[master] Pinned table tests for RegionPlacement

Author: elliott

Summary: Add test to make sure tables stay pinned after creation.

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

Reviewers: adela, daviddeng

Reviewed By: adela

CC: hbase-eng@

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

Task ID: 4114856

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

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