hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1170933 - in /hbase/trunk: ./ src/main/java/org/apache/hadoop/hbase/client/ src/main/java/org/apache/hadoop/hbase/ipc/ src/main/java/org/apache/hadoop/hbase/master/ src/main/ruby/shell/commands/
Date Thu, 15 Sep 2011 02:46:39 GMT
Author: tedyu
Date: Thu Sep 15 02:46:38 2011
New Revision: 1170933

URL: http://svn.apache.org/viewvc?rev=1170933&view=rev
Log:
HBASE-4351 If from Admin we try to unassign a region forcefully, though a valid region name
is given the master is not able to identify the region to unassign.(Ramkrishna)

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HMasterInterface.java
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
    hbase/trunk/src/main/ruby/shell/commands/unassign.rb

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1170933&r1=1170932&r2=1170933&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Thu Sep 15 02:46:38 2011
@@ -263,6 +263,9 @@ Release 0.91.0 - Unreleased
    HBASE-4406  TestOpenRegionHandler failing after HBASE-4287 (todd)
    HBASE-4330  Fix races in slab cache (Li Pi & Todd)
    HBASE-4383  SlabCache reports negative heap sizes (Li Pi)
+   HBASE-4351  If from Admin we try to unassign a region forcefully,
+               though a valid region name is given the master is not able
+               to identify the region to unassign (Ramkrishna)
 
   IMPROVEMENTS
    HBASE-3290  Max Compaction Size (Nicolas Spiegelberg via Stack)  

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java?rev=1170933&r1=1170932&r2=1170933&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java Thu Sep 15 02:46:38
2011
@@ -1322,7 +1322,8 @@ public class HBaseAdmin implements Abort
    * @param regionName Region to unassign. Will clear any existing RegionPlan
    * if one found.
    * @param force If true, force unassign (Will remove region from
-   * regions-in-transition too if present).
+   * regions-in-transition too if present. If results in double assignment
+   * use hbck -fix to resolve. To be used by experts).
    * @throws MasterNotRunningException
    * @throws ZooKeeperConnectionException
    * @throws IOException

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HMasterInterface.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HMasterInterface.java?rev=1170933&r1=1170932&r2=1170933&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HMasterInterface.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HMasterInterface.java Thu Sep 15
02:46:38 2011
@@ -193,7 +193,7 @@ public interface HMasterInterface extend
    * if one found.
    * @param force If true, force unassign (Will remove region from
    * regions-in-transition too if present as well as from assigned regions --
-   * radical!).
+   * radical!.If results in double assignment use hbck -fix to resolve.
    * @throws IOException
    */
   public void unassign(final byte [] regionName, final boolean force)

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java?rev=1170933&r1=1170932&r2=1170933&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java Thu Sep 15 02:46:38
2011
@@ -1364,8 +1364,12 @@ implements HMasterInterface, HMasterRegi
         return;
       }
     }
-    if (force) this.assignmentManager.clearRegionFromTransition(hri);
-    this.assignmentManager.unassign(hri, force);
+    if (force) {
+      this.assignmentManager.clearRegionFromTransition(hri);
+      assignRegion(hri);
+    } else {
+      this.assignmentManager.unassign(hri, force);
+    }
     if (cpHost != null) {
       cpHost.postUnassign(hri, force);
     }

Modified: hbase/trunk/src/main/ruby/shell/commands/unassign.rb
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/ruby/shell/commands/unassign.rb?rev=1170933&r1=1170932&r2=1170933&view=diff
==============================================================================
--- hbase/trunk/src/main/ruby/shell/commands/unassign.rb (original)
+++ hbase/trunk/src/main/ruby/shell/commands/unassign.rb Thu Sep 15 02:46:38 2011
@@ -25,8 +25,9 @@ module Shell
         return <<-EOF
 Unassign a region. Unassign will close region in current location and then
 reopen it again.  Pass 'true' to force the unassignment ('force' will clear
-all in-memory state in master before the reassign).  Use with caution.  For
-expert use only.  Examples:
+all in-memory state in master before the reassign. If results in
+double assignment use hbck -fix to resolve. To be used by experts).
+Use with caution.  For expert use only.  Examples:
 
   hbase> unassign 'REGIONNAME'
   hbase> unassign 'REGIONNAME', true



Mime
View raw message