[HBASE-10927] #3909589 RollingRestart.java to report the successfully drained regions + undrain onlySE-10927

Author: edunov

Summary:
There are couple of options now. You can specify drain log file via -location option or you can omit it and temp file will be created for you which you can use later

Note, that rolling_restart_v2 change is implemented but I was unable to test it because groovy version on hbase host is 1.8 and it has incompatible version of asm 3.2. Need to upgrade groovy on hbase host to 2.2 first.

Test Plan:
1. On hbase cluster run

./hbase org.apache.hadoop.hbase.util.RollingRestart -drain -location /tmp/drain.log.bin  -s hbase2464.ash3.facebook.com -p 60021
then
./hbase org.apache.hadoop.hbase.util.RollingRestart -undrain -location /tmp/drain.log.bin  -s <region server host> -p 60021

check the file  /tmp/drain.log.bin it should have regions in binary form

Dump all regions from the drain log file:
./hbase org.apache.hadoop.hbase.util.RollingRestart -readlog -location /tmp/drain.log.bin

Should print something similar to this:

14/04/03 11:39:32 INFO util.RollingRestart: Regions contained in the file:
t1,99999999,1396299107459.103fda0eed9b2b9a55421bc2ca9175ae.
t1,55555555,1396299107458.177065759563bf26d8069bfb88d8110e.
t1,11111111,1396299107458.86733e9549ada628073cd7a806ffa307.
t1,dddddddd,1396299107459.ff55239c7b55204a2962f61b8be4016a.

Reviewers: rshroff, rmk

Reviewed By: rshroff

CC: hbase-eng@, aleksandr

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

Task ID: 3909589

git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/0.89-fb@1585805 13f79535-47bb-0310-9956-ffa450edef68
[HBASE-10905][0.89-fb] Be able to query a region location through the (Thrift)HRegionInterface

Author: gauravm

Summary:
In order to write a simplistic non-Java client (PHP in our case), where we don't want to push the region locating code to the client side, we can let the Region Server do it for us.

The client can pick up an Region Server in the regionservers tier, and get the location for any row in the table. The client is also able to request the server to disregard any previous cached location if it needs to.

Test Plan: TestGetRegionLocation and other unit tests

Reviewers: manukranthk, fan, rshroff, myang, daviddeng

Reviewed By: manukranthk

CC: hbase-eng@, andrewcox

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

Task ID: 4058577

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