hbase git commit: HBASE-18231 Deprecate Admin#closeRegion*() commands in favor of Admin#unassign().

2017-08-02 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/branch-2 6440509d7 -> 41da64a14


HBASE-18231 Deprecate Admin#closeRegion*() commands in favor of 
Admin#unassign().

Other changes:
- Update corresponding tests in TestAdmin2. Removed tests centered around 
serverName part of old functions.
- Remove dead functions from ProtobufUtil and ServerManager
- Rename closeRegion* functions in HBTU to unassignRegion*

Change-Id: Ib9bdeb185e10750daf652be0bb328306accb73ab


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/41da64a1
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/41da64a1
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/41da64a1

Branch: refs/heads/branch-2
Commit: 41da64a144e286c3d42a58d61227a9edc852af8f
Parents: 6440509
Author: Apekshit Sharma 
Authored: Mon Jul 31 19:21:40 2017 -0700
Committer: Apekshit Sharma 
Committed: Wed Aug 2 15:22:17 2017 -0700

--
 .../org/apache/hadoop/hbase/client/Admin.java   | 36 +++-
 .../apache/hadoop/hbase/client/AsyncAdmin.java  |  8 +-
 .../hadoop/hbase/client/AsyncHBaseAdmin.java|  4 +-
 .../apache/hadoop/hbase/client/HBaseAdmin.java  | 69 +++
 .../hadoop/hbase/client/RawAsyncHBaseAdmin.java | 28 +-
 .../hbase/shaded/protobuf/ProtobufUtil.java | 44 --
 .../hadoop/hbase/master/ServerManager.java  | 29 ---
 .../hadoop/hbase/HBaseTestingUtility.java   | 27 +++---
 .../apache/hadoop/hbase/client/TestAdmin2.java  | 89 ++--
 .../hadoop/hbase/client/TestReplicasClient.java |  2 +-
 .../hadoop/hbase/master/TestMasterFailover.java |  4 +-
 .../hbase/master/TestMasterNoCluster.java   |  4 -
 .../TestQuotaObserverChoreRegionReports.java|  2 +-
 .../regionserver/TestRegionServerNoMaster.java  |  2 +-
 .../hadoop/hbase/util/TestHBaseFsckTwoRS.java   |  2 +-
 15 files changed, 59 insertions(+), 291 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/41da64a1/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
index 6e9b0df..4f5c128 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
@@ -826,56 +826,46 @@ public interface Admin extends Abortable, Closeable {
   Future modifyColumnFamilyAsync(TableName tableName, 
ColumnFamilyDescriptor columnFamily)
   throws IOException;
 
-
   /**
-   * Close a region. For expert-admins.  Runs close on the regionserver.  The 
master will not be
-   * informed of the close.
+   * Uses {@link #unassign(byte[], boolean)} to unassign the region. For 
expert-admins.
*
* @param regionname region name to close
-   * @param serverName If supplied, we'll use this location rather than the 
one currently in
-   * hbase:meta
+   * @param serverName Deprecated. Not used.
* @throws IOException if a remote or network exception occurs
+   * @deprecated Since 2.0. Will be removed in 3.0. Use {@link 
#unassign(byte[], boolean)} instead.
*/
   void closeRegion(final String regionname, final String serverName) throws 
IOException;
 
   /**
-   * Close a region.  For expert-admins  Runs close on the regionserver.  The 
master will not be
-   * informed of the close.
+   * Uses {@link #unassign(byte[], boolean)} to unassign the region. For 
expert-admins.
*
* @param regionname region name to close
-   * @param serverName The servername of the regionserver.  If passed null we 
will use servername
-   * found in the hbase:meta table. A server name is made of host, port and 
startcode.  Here is an
-   * example:  host187.example.com,60020,1289493121758
+   * @param serverName Deprecated. Not used.
* @throws IOException if a remote or network exception occurs
+   * @deprecated Since 2.0. Will be removed in 3.0. Use {@link 
#unassign(byte[], boolean)} instead.
*/
   void closeRegion(final byte[] regionname, final String serverName) throws 
IOException;
 
   /**
-   * For expert-admins. Runs close on the regionserver. Closes a region based 
on the encoded region
-   * name. The region server name is mandatory. If the servername is provided 
then based on the
-   * online regions in the specified regionserver the specified region will be 
closed. The master
-   * will not be informed of the close. Note that the regionname is the 
encoded regionname.
+   * Uses {@link #unassign(byte[], boolean)} to unassign the region. For 
expert-admins.
*
* @param encodedRegionName The encoded region name; i.e. the hash that 
makes up the region name
* suffix: e.g. 

hbase git commit: HBASE-18231 Deprecate Admin#closeRegion*() commands in favor of Admin#unassign().

2017-08-02 Thread appy
Repository: hbase
Updated Branches:
  refs/heads/master 7a6de1bd4 -> de696cf6b


HBASE-18231 Deprecate Admin#closeRegion*() commands in favor of 
Admin#unassign().

Other changes:
- Update corresponding tests in TestAdmin2. Removed tests centered around 
serverName part of old functions.
- Remove dead functions from ProtobufUtil and ServerManager
- Rename closeRegion* functions in HBTU to unassignRegion*

Change-Id: Ib9bdeb185e10750daf652be0bb328306accb73ab


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/de696cf6
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/de696cf6
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/de696cf6

Branch: refs/heads/master
Commit: de696cf6b653749c6bf105ef3d62d7a6c6923c57
Parents: 7a6de1b
Author: Apekshit Sharma 
Authored: Mon Jul 31 19:21:40 2017 -0700
Committer: Apekshit Sharma 
Committed: Wed Aug 2 15:19:06 2017 -0700

--
 .../org/apache/hadoop/hbase/client/Admin.java   | 36 +++-
 .../apache/hadoop/hbase/client/AsyncAdmin.java  |  8 +-
 .../hadoop/hbase/client/AsyncHBaseAdmin.java|  4 +-
 .../apache/hadoop/hbase/client/HBaseAdmin.java  | 69 +++
 .../hadoop/hbase/client/RawAsyncHBaseAdmin.java | 28 +-
 .../hbase/shaded/protobuf/ProtobufUtil.java | 44 --
 .../hadoop/hbase/master/ServerManager.java  | 29 ---
 .../hadoop/hbase/HBaseTestingUtility.java   | 27 +++---
 .../apache/hadoop/hbase/client/TestAdmin2.java  | 89 ++--
 .../hadoop/hbase/client/TestReplicasClient.java |  2 +-
 .../hadoop/hbase/master/TestMasterFailover.java |  4 +-
 .../hbase/master/TestMasterNoCluster.java   |  4 -
 .../TestQuotaObserverChoreRegionReports.java|  2 +-
 .../regionserver/TestRegionServerNoMaster.java  |  2 +-
 .../hadoop/hbase/util/TestHBaseFsckTwoRS.java   |  2 +-
 15 files changed, 59 insertions(+), 291 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/de696cf6/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
index 6e9b0df..4f5c128 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
@@ -826,56 +826,46 @@ public interface Admin extends Abortable, Closeable {
   Future modifyColumnFamilyAsync(TableName tableName, 
ColumnFamilyDescriptor columnFamily)
   throws IOException;
 
-
   /**
-   * Close a region. For expert-admins.  Runs close on the regionserver.  The 
master will not be
-   * informed of the close.
+   * Uses {@link #unassign(byte[], boolean)} to unassign the region. For 
expert-admins.
*
* @param regionname region name to close
-   * @param serverName If supplied, we'll use this location rather than the 
one currently in
-   * hbase:meta
+   * @param serverName Deprecated. Not used.
* @throws IOException if a remote or network exception occurs
+   * @deprecated Since 2.0. Will be removed in 3.0. Use {@link 
#unassign(byte[], boolean)} instead.
*/
   void closeRegion(final String regionname, final String serverName) throws 
IOException;
 
   /**
-   * Close a region.  For expert-admins  Runs close on the regionserver.  The 
master will not be
-   * informed of the close.
+   * Uses {@link #unassign(byte[], boolean)} to unassign the region. For 
expert-admins.
*
* @param regionname region name to close
-   * @param serverName The servername of the regionserver.  If passed null we 
will use servername
-   * found in the hbase:meta table. A server name is made of host, port and 
startcode.  Here is an
-   * example:  host187.example.com,60020,1289493121758
+   * @param serverName Deprecated. Not used.
* @throws IOException if a remote or network exception occurs
+   * @deprecated Since 2.0. Will be removed in 3.0. Use {@link 
#unassign(byte[], boolean)} instead.
*/
   void closeRegion(final byte[] regionname, final String serverName) throws 
IOException;
 
   /**
-   * For expert-admins. Runs close on the regionserver. Closes a region based 
on the encoded region
-   * name. The region server name is mandatory. If the servername is provided 
then based on the
-   * online regions in the specified regionserver the specified region will be 
closed. The master
-   * will not be informed of the close. Note that the regionname is the 
encoded regionname.
+   * Uses {@link #unassign(byte[], boolean)} to unassign the region. For 
expert-admins.
*
* @param encodedRegionName The encoded region name; i.e. the hash that 
makes up the region name
* suffix: e.g. if