hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-4217) HRS.closeRegion should be able to close regions with only the encoded name
Date Sat, 27 Aug 2011 03:27:29 GMT

    [ https://issues.apache.org/jira/browse/HBASE-4217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13092178#comment-13092178
] 

Ted Yu commented on HBASE-4217:
-------------------------------

Table TestHBACloseRegion3 is used in two unit tests and it is not dropped in between.

Here is the addendum I committed:
{code}
Index: src/test/java/org/apache/hadoop/hbase/client/TestAdmin.java
===================================================================
--- src/test/java/org/apache/hadoop/hbase/client/TestAdmin.java (revision 1162289)
+++ src/test/java/org/apache/hadoop/hbase/client/TestAdmin.java (working copy)
@@ -1025,7 +1025,7 @@
 
   @Test
   public void testCloseRegionWhenServerNameIsEmpty() throws Exception {
-    byte[] TABLENAME = Bytes.toBytes("TestHBACloseRegion3");
+    byte[] TABLENAME = Bytes.toBytes("TestHBACloseRegionWhenServerNameIsEmpty");
     HBaseAdmin admin = createTable(TABLENAME);
 
     HRegionServer rs = TEST_UTIL.getRSForFirstRegionInTable(TABLENAME);
@@ -1035,7 +1035,7 @@
       for (HRegionInfo regionInfo : onlineRegions) {
         if (!regionInfo.isMetaRegion() && !regionInfo.isRootRegion()) {
           if (regionInfo.getRegionNameAsString()
-              .contains("TestHBACloseRegion3")) {
+              .contains("TestHBACloseRegionWhenServerNameIsEmpty")) {
             admin.closeRegionWithEncodedRegionName(regionInfo.getEncodedName(),
                 " ");
           }
{code}
I think naming the table in accordance with the test case is a good practice.

> HRS.closeRegion should be able to close regions with only the encoded name
> --------------------------------------------------------------------------
>
>                 Key: HBASE-4217
>                 URL: https://issues.apache.org/jira/browse/HBASE-4217
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 0.90.4
>            Reporter: Jean-Daniel Cryans
>            Assignee: ramkrishna.s.vasudevan
>             Fix For: 0.92.0
>
>         Attachments: 4217-v4.txt, HBASE-4217.patch, HBASE-4217_1.patch, HBASE-4217_2.patch,
HBASE-4217_3.patch
>
>
> We had some sort of an outage this morning due to a few racks losing power, and some
regions were left in the following state:
> ERROR: Region UNKNOWN_REGION on sv4r17s9:60020, key=e32bbe1f48c9b3633c557dc0291b90a3,
not on HDFS or in META but deployed on sv4r17s9:60020
> That region was deleted by the master but the region server never got the memo. Right
now there's no way to force close it because HRS.closeRegion requires an HRI and the only
way to create one is to get it from .META. which in our case doesn't contain a row for that
region. Basically we have to wait until that server is dead to get rid of the region and make
hbck happy.
> The required change is to have closeRegion accept an encoded name in both HBA (when the
RS address is provided) and HRS since it's able to find it anyways from it's list of live
regions.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message