HBase
  1. HBase
  2. HBASE-5801

[hbck] Hbck should handle case where some regions have different HTD settings in .regioninfo files (0.90 specific)

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.90.7
    • Fix Version/s: 0.90.7
    • Component/s: hbck
    • Labels:
      None

      Description

      Recently, we encountered a case where some regions in a table have different HTableDescriptor settings serialized into HDFS their HRegionInfo .regioninfo file. hbck expects all HTDs within a table to be the same and currently bails out in this situation.

      We need to either point out a proper set of actions for the user to execute or automatically convert the region to a common HTD (likely the most common on, or possibly the "first one".)

      Not sure if this requires reformatting data but may require closing and restarting a region.

      This issue is hbase 0.90.x specific – 0.92+ keep all table info in a single .tableinfo file.

      1. hbase_5801_v3.patch
        14 kB
        Jimmy Xiang
      2. hbase_5801_v2.patch
        13 kB
        Jimmy Xiang

        Activity

        Hide
        Jonathan Hsieh added a comment -

        Thanks Jimmy. Committed to 0.90.

        Show
        Jonathan Hsieh added a comment - Thanks Jimmy. Committed to 0.90.
        Hide
        Jonathan Hsieh added a comment -

        Hey Jimmy, code looks good, I found a few typos, will fix before commit.

        Typos: are -> is ; multipe -> multiple

        +          LOG.warn("Region " + hbi.toString() + " are deployed on multiple region servers."
        +            + " Please fix the multiple assignments before fixing multipe table desc.");
        

        Remove @param / @praam / @throws (or fill them in).

        +   * Replace the .regioninfo with a new one with the expected table desc,
        +   * then re-assign the region.
        +   *
        +   * @param admin
        +   * @praam hsa
        +   * @param hbi
        +   * @param htd
        +   * @param sidelineTableDir
        +   * @throws IOException
        +   * @throws KeeperException
        +   * @throws InterruptedException
        + 
        

        typo: regioninfoSidelinPath -> regioninfoSidelinePath

        +    Path regioninfoSidelinPath = new Path(sidelineRegionDir, HRegion.REGIONINFO_FILE);
        
        Show
        Jonathan Hsieh added a comment - Hey Jimmy, code looks good, I found a few typos, will fix before commit. Typos: are -> is ; multipe -> multiple + LOG.warn( "Region " + hbi.toString() + " are deployed on multiple region servers." + + " Please fix the multiple assignments before fixing multipe table desc." ); Remove @param / @praam / @throws (or fill them in). + * Replace the .regioninfo with a new one with the expected table desc, + * then re-assign the region. + * + * @param admin + * @praam hsa + * @param hbi + * @param htd + * @param sidelineTableDir + * @ throws IOException + * @ throws KeeperException + * @ throws InterruptedException + typo: regioninfoSidelinPath -> regioninfoSidelinePath + Path regioninfoSidelinPath = new Path(sidelineRegionDir, HRegion.REGIONINFO_FILE);
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12524474/hbase_5801_v3.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 3 new or modified tests.

        -1 patch. The patch command could not apply the patch.

        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/1660//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12524474/hbase_5801_v3.patch against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. -1 patch. The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/1660//console This message is automatically generated.
        Hide
        Jimmy Xiang added a comment -

        I ran TestHBaseFsck 10x with v3 patch and all passed.

        Show
        Jimmy Xiang added a comment - I ran TestHBaseFsck 10x with v3 patch and all passed.
        Hide
        Jonathan Hsieh added a comment -

        Thanks for following through Jimmy. Adding more flakey tests is just going to cause more trouble down the line and it is better if we figure out and catch them before they get in!

        Show
        Jonathan Hsieh added a comment - Thanks for following through Jimmy. Adding more flakey tests is just going to cause more trouble down the line and it is better if we figure out and catch them before they get in!
        Hide
        Jimmy Xiang added a comment -

        I looked into it and found out why deleteTable fails: one of the region is not closed.
        I will put up another patch soon.

        Show
        Jimmy Xiang added a comment - I looked into it and found out why deleteTable fails: one of the region is not closed. I will put up another patch soon.
        Hide
        Jonathan Hsieh added a comment -

        I don't think that is good enough – if deleteTable failing, it is an indication that the repairs are not sufficient.

        In the original HBASE-5128, we had a 50% fail rate on some tests and tracking down the root of the flakyness lead to the offline call to fix master/rs state, and making the HRI comparator more specific.

        This issue feels similar and may be related to something like that...

        Show
        Jonathan Hsieh added a comment - I don't think that is good enough – if deleteTable failing, it is an indication that the repairs are not sufficient. In the original HBASE-5128 , we had a 50% fail rate on some tests and tracking down the root of the flakyness lead to the offline call to fix master/rs state, and making the HRI comparator more specific. This issue feels similar and may be related to something like that...
        Hide
        Jimmy Xiang added a comment -

        deleteTable is to clean up after the test, which is flaky. Probably it is because the ZK is not reliable.
        I was thinking to let the table stay if failed to delete it.

        Show
        Jimmy Xiang added a comment - deleteTable is to clean up after the test, which is flaky. Probably it is because the ZK is not reliable. I was thinking to let the table stay if failed to delete it.
        Hide
        Jonathan Hsieh added a comment -

        Jimmy, before committing I ran test a few times and it seemed to be flaky – in 6 runs it passed 3x and failed 2x hanging:

        -------------------------------------------------------------------------------
        Test set: org.apache.hadoop.hbase.util.TestHBaseFsck
        -------------------------------------------------------------------------------
        Tests run: 16, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 717.576 sec <<< FAILURE!
        testMultipleTableDesc(org.apache.hadoop.hbase.util.TestHBaseFsck)  Time elapsed: 600.022 sec  <<< ERROR!
        java.lang.Exception: test timed out after 600000 milliseconds
                at java.lang.Thread.sleep(Native Method)
                at org.apache.hadoop.hbase.util.TestHBaseFsck.deleteTable(TestHBaseFsck.java:269)
                at org.apache.hadoop.hbase.util.TestHBaseFsck.testMultipleTableDesc(TestHBaseFsck.java:968)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
                at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
                at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
                at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
                at org.junit.internal.runners.statements.FailOnTimeout$1.run(FailOnTimeout.java:28)
        

        and also failed with an unable to read .regioninfo error. (didn't save this log, sorry)

        Mind digging in to make it more robust?

        Show
        Jonathan Hsieh added a comment - Jimmy, before committing I ran test a few times and it seemed to be flaky – in 6 runs it passed 3x and failed 2x hanging: ------------------------------------------------------------------------------- Test set: org.apache.hadoop.hbase.util.TestHBaseFsck ------------------------------------------------------------------------------- Tests run: 16, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 717.576 sec <<< FAILURE! testMultipleTableDesc(org.apache.hadoop.hbase.util.TestHBaseFsck) Time elapsed: 600.022 sec <<< ERROR! java.lang.Exception: test timed out after 600000 milliseconds at java.lang. Thread .sleep(Native Method) at org.apache.hadoop.hbase.util.TestHBaseFsck.deleteTable(TestHBaseFsck.java:269) at org.apache.hadoop.hbase.util.TestHBaseFsck.testMultipleTableDesc(TestHBaseFsck.java:968) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.FailOnTimeout$1.run(FailOnTimeout.java:28) and also failed with an unable to read .regioninfo error. (didn't save this log, sorry) Mind digging in to make it more robust?
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/4833/#review7237
        -----------------------------------------------------------

        Ship it!

        lgtm.

        • jmhsieh

        On 2012-04-23 20:16:23, Jimmy Xiang wrote:

        -----------------------------------------------------------

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/4833/

        -----------------------------------------------------------

        (Updated 2012-04-23 20:16:23)

        Review request for hbase and jmhsieh.

        Summary

        -------

        Added option to fix inconsistent table descriptors:

        1. sideline the current .regioninfo file

        2. create a new one with HTD from HBaseAdmin (meta, first entry)

        3. offline the region and wait till it assigned again

        This addresses bug HBASE-5801.

        https://issues.apache.org/jira/browse/HBASE-5801

        Diffs

        -----

        src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java 50f9128

        src/main/java/org/apache/hadoop/hbase/util/HBaseFsckRepair.java 06d2b73

        src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java 103d8bf

        Diff: https://reviews.apache.org/r/4833/diff

        Testing

        -------

        TestHBaseFsck* are green. On live cluster, it does the fix as expected.

        Thanks,

        Jimmy

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4833/#review7237 ----------------------------------------------------------- Ship it! lgtm. jmhsieh On 2012-04-23 20:16:23, Jimmy Xiang wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4833/ ----------------------------------------------------------- (Updated 2012-04-23 20:16:23) Review request for hbase and jmhsieh. Summary ------- Added option to fix inconsistent table descriptors: 1. sideline the current .regioninfo file 2. create a new one with HTD from HBaseAdmin (meta, first entry) 3. offline the region and wait till it assigned again This addresses bug HBASE-5801 . https://issues.apache.org/jira/browse/HBASE-5801 Diffs ----- src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java 50f9128 src/main/java/org/apache/hadoop/hbase/util/HBaseFsckRepair.java 06d2b73 src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java 103d8bf Diff: https://reviews.apache.org/r/4833/diff Testing ------- TestHBaseFsck* are green. On live cluster, it does the fix as expected. Thanks, Jimmy
        Hide
        Jimmy Xiang added a comment -

        Set fixed version to 0.90.7.

        Show
        Jimmy Xiang added a comment - Set fixed version to 0.90.7.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12523861/hbase_5801_v2.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 3 new or modified tests.

        -1 patch. The patch command could not apply the patch.

        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/1615//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12523861/hbase_5801_v2.patch against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. -1 patch. The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/1615//console This message is automatically generated.
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/4833/
        -----------------------------------------------------------

        (Updated 2012-04-23 20:16:23.668746)

        Review request for hbase and jmhsieh.

        Changes
        -------

        Addressed Jon's comments.

        Summary
        -------

        Added option to fix inconsistent table descriptors:
        1. sideline the current .regioninfo file
        2. create a new one with HTD from HBaseAdmin (meta, first entry)
        3. offline the region and wait till it assigned again

        This addresses bug HBASE-5801.
        https://issues.apache.org/jira/browse/HBASE-5801

        Diffs (updated)


        src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java 50f9128
        src/main/java/org/apache/hadoop/hbase/util/HBaseFsckRepair.java 06d2b73
        src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java 103d8bf

        Diff: https://reviews.apache.org/r/4833/diff

        Testing
        -------

        TestHBaseFsck* are green. On live cluster, it does the fix as expected.

        Thanks,

        Jimmy

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4833/ ----------------------------------------------------------- (Updated 2012-04-23 20:16:23.668746) Review request for hbase and jmhsieh. Changes ------- Addressed Jon's comments. Summary ------- Added option to fix inconsistent table descriptors: 1. sideline the current .regioninfo file 2. create a new one with HTD from HBaseAdmin (meta, first entry) 3. offline the region and wait till it assigned again This addresses bug HBASE-5801 . https://issues.apache.org/jira/browse/HBASE-5801 Diffs (updated) src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java 50f9128 src/main/java/org/apache/hadoop/hbase/util/HBaseFsckRepair.java 06d2b73 src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java 103d8bf Diff: https://reviews.apache.org/r/4833/diff Testing ------- TestHBaseFsck* are green. On live cluster, it does the fix as expected. Thanks, Jimmy
        Hide
        jiraposter@reviews.apache.org added a comment -

        On 2012-04-23 08:08:05, jmhsieh wrote:

        > src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java, line 1239

        > <https://reviews.apache.org/r/4833/diff/2/?file=103677#file103677line1239>

        >

        > Check return value and warn / throw exn if fails.

        Will fix.

        On 2012-04-23 08:08:05, jmhsieh wrote:

        > src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java, line 1591

        > <https://reviews.apache.org/r/4833/diff/2/?file=103677#file103677line1591>

        >

        > Did you intend for this to always happen or only if the user had set the fixTableDesc option?

        This will always happen in the fixing mode evnet fixTableDesc is not set. Otherwise, hbck can't move on if there are multiple table desc.

        On 2012-04-23 08:08:05, jmhsieh wrote:

        > src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java, line 1592

        > <https://reviews.apache.org/r/4833/diff/2/?file=103677#file103677line1592>

        >

        > This should probably at least WARN.

        Changed to WARN.

        On 2012-04-23 08:08:05, jmhsieh wrote:

        > src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java, line 2476

        > <https://reviews.apache.org/r/4833/diff/2/?file=103677#file103677line2476>

        >

        > typo: "Mutliple"

        Fixed.

        On 2012-04-23 08:08:05, jmhsieh wrote:

        > src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java, line 923

        > <https://reviews.apache.org/r/4833/diff/2/?file=103679#file103679line923>

        >

        > nit: awkward comment.

        Changed it a little bit.

        On 2012-04-23 08:08:05, jmhsieh wrote:

        > src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java, line 1238

        > <https://reviews.apache.org/r/4833/diff/2/?file=103677#file103677line1238>

        >

        > Check return value and warn / throw exn if fails.

        I think this one is fine if I fix the next one.

        • Jimmy

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/4833/#review7126
        -----------------------------------------------------------

        On 2012-04-20 22:45:47, Jimmy Xiang wrote:

        -----------------------------------------------------------

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/4833/

        -----------------------------------------------------------

        (Updated 2012-04-20 22:45:47)

        Review request for hbase and jmhsieh.

        Summary

        -------

        Added option to fix inconsistent table descriptors:

        1. sideline the current .regioninfo file

        2. create a new one with HTD from HBaseAdmin (meta, first entry)

        3. offline the region and wait till it assigned again

        This addresses bug HBASE-5801.

        https://issues.apache.org/jira/browse/HBASE-5801

        Diffs

        -----

        src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java 50f9128

        src/main/java/org/apache/hadoop/hbase/util/HBaseFsckRepair.java 06d2b73

        src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java 103d8bf

        Diff: https://reviews.apache.org/r/4833/diff

        Testing

        -------

        TestHBaseFsck* are green. On live cluster, it does the fix as expected.

        Thanks,

        Jimmy

        Show
        jiraposter@reviews.apache.org added a comment - On 2012-04-23 08:08:05, jmhsieh wrote: > src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java, line 1239 > < https://reviews.apache.org/r/4833/diff/2/?file=103677#file103677line1239 > > > Check return value and warn / throw exn if fails. Will fix. On 2012-04-23 08:08:05, jmhsieh wrote: > src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java, line 1591 > < https://reviews.apache.org/r/4833/diff/2/?file=103677#file103677line1591 > > > Did you intend for this to always happen or only if the user had set the fixTableDesc option? This will always happen in the fixing mode evnet fixTableDesc is not set. Otherwise, hbck can't move on if there are multiple table desc. On 2012-04-23 08:08:05, jmhsieh wrote: > src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java, line 1592 > < https://reviews.apache.org/r/4833/diff/2/?file=103677#file103677line1592 > > > This should probably at least WARN. Changed to WARN. On 2012-04-23 08:08:05, jmhsieh wrote: > src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java, line 2476 > < https://reviews.apache.org/r/4833/diff/2/?file=103677#file103677line2476 > > > typo: "Mutliple" Fixed. On 2012-04-23 08:08:05, jmhsieh wrote: > src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java, line 923 > < https://reviews.apache.org/r/4833/diff/2/?file=103679#file103679line923 > > > nit: awkward comment. Changed it a little bit. On 2012-04-23 08:08:05, jmhsieh wrote: > src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java, line 1238 > < https://reviews.apache.org/r/4833/diff/2/?file=103677#file103677line1238 > > > Check return value and warn / throw exn if fails. I think this one is fine if I fix the next one. Jimmy ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4833/#review7126 ----------------------------------------------------------- On 2012-04-20 22:45:47, Jimmy Xiang wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4833/ ----------------------------------------------------------- (Updated 2012-04-20 22:45:47) Review request for hbase and jmhsieh. Summary ------- Added option to fix inconsistent table descriptors: 1. sideline the current .regioninfo file 2. create a new one with HTD from HBaseAdmin (meta, first entry) 3. offline the region and wait till it assigned again This addresses bug HBASE-5801 . https://issues.apache.org/jira/browse/HBASE-5801 Diffs ----- src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java 50f9128 src/main/java/org/apache/hadoop/hbase/util/HBaseFsckRepair.java 06d2b73 src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java 103d8bf Diff: https://reviews.apache.org/r/4833/diff Testing ------- TestHBaseFsck* are green. On live cluster, it does the fix as expected. Thanks, Jimmy
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/4833/#review7126
        -----------------------------------------------------------

        Hey Jimmy, looks pretty nice but there are few things to take care of. Can you follow up on some of the comments below?

        src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
        <https://reviews.apache.org/r/4833/#comment15741>

        Check return value and warn / throw exn if fails.

        src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
        <https://reviews.apache.org/r/4833/#comment15742>

        Check return value and warn / throw exn if fails.

        src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
        <https://reviews.apache.org/r/4833/#comment15745>

        I think this warning should always be emitted whenever we have != 1 htds.size().

        src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
        <https://reviews.apache.org/r/4833/#comment15747>

        Did you intend for this to always happen or only if the user had set the fixTableDesc option?

        src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
        <https://reviews.apache.org/r/4833/#comment15746>

        This should probably at least WARN.

        src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
        <https://reviews.apache.org/r/4833/#comment15743>

        typo: "Mutliple"

        src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java
        <https://reviews.apache.org/r/4833/#comment15744>

        nit: awkward comment.

        • jmhsieh

        On 2012-04-20 22:45:47, Jimmy Xiang wrote:

        -----------------------------------------------------------

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/4833/

        -----------------------------------------------------------

        (Updated 2012-04-20 22:45:47)

        Review request for hbase and jmhsieh.

        Summary

        -------

        Added option to fix inconsistent table descriptors:

        1. sideline the current .regioninfo file

        2. create a new one with HTD from HBaseAdmin (meta, first entry)

        3. offline the region and wait till it assigned again

        This addresses bug HBASE-5801.

        https://issues.apache.org/jira/browse/HBASE-5801

        Diffs

        -----

        src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java 50f9128

        src/main/java/org/apache/hadoop/hbase/util/HBaseFsckRepair.java 06d2b73

        src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java 103d8bf

        Diff: https://reviews.apache.org/r/4833/diff

        Testing

        -------

        TestHBaseFsck* are green. On live cluster, it does the fix as expected.

        Thanks,

        Jimmy

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4833/#review7126 ----------------------------------------------------------- Hey Jimmy, looks pretty nice but there are few things to take care of. Can you follow up on some of the comments below? src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java < https://reviews.apache.org/r/4833/#comment15741 > Check return value and warn / throw exn if fails. src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java < https://reviews.apache.org/r/4833/#comment15742 > Check return value and warn / throw exn if fails. src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java < https://reviews.apache.org/r/4833/#comment15745 > I think this warning should always be emitted whenever we have != 1 htds.size(). src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java < https://reviews.apache.org/r/4833/#comment15747 > Did you intend for this to always happen or only if the user had set the fixTableDesc option? src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java < https://reviews.apache.org/r/4833/#comment15746 > This should probably at least WARN. src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java < https://reviews.apache.org/r/4833/#comment15743 > typo: "Mutliple" src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java < https://reviews.apache.org/r/4833/#comment15744 > nit: awkward comment. jmhsieh On 2012-04-20 22:45:47, Jimmy Xiang wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4833/ ----------------------------------------------------------- (Updated 2012-04-20 22:45:47) Review request for hbase and jmhsieh. Summary ------- Added option to fix inconsistent table descriptors: 1. sideline the current .regioninfo file 2. create a new one with HTD from HBaseAdmin (meta, first entry) 3. offline the region and wait till it assigned again This addresses bug HBASE-5801 . https://issues.apache.org/jira/browse/HBASE-5801 Diffs ----- src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java 50f9128 src/main/java/org/apache/hadoop/hbase/util/HBaseFsckRepair.java 06d2b73 src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java 103d8bf Diff: https://reviews.apache.org/r/4833/diff Testing ------- TestHBaseFsck* are green. On live cluster, it does the fix as expected. Thanks, Jimmy
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/4833/
        -----------------------------------------------------------

        Review request for hbase and jmhsieh.

        Summary
        -------

        Added option to fix inconsistent table descriptors:
        1. sideline the current .regioninfo file
        2. create a new one with HTD from HBaseAdmin (meta, first entry)
        3. offline the region and wait till it assigned again

        This addresses bug HBASE-5801.
        https://issues.apache.org/jira/browse/HBASE-5801

        Diffs


        src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java 50f9128
        src/main/java/org/apache/hadoop/hbase/util/HBaseFsckRepair.java 06d2b73
        src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java 103d8bf

        Diff: https://reviews.apache.org/r/4833/diff

        Testing
        -------

        TestHBaseFsck* are green. On live cluster, it does the fix as expected.

        Thanks,

        Jimmy

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4833/ ----------------------------------------------------------- Review request for hbase and jmhsieh. Summary ------- Added option to fix inconsistent table descriptors: 1. sideline the current .regioninfo file 2. create a new one with HTD from HBaseAdmin (meta, first entry) 3. offline the region and wait till it assigned again This addresses bug HBASE-5801 . https://issues.apache.org/jira/browse/HBASE-5801 Diffs src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java 50f9128 src/main/java/org/apache/hadoop/hbase/util/HBaseFsckRepair.java 06d2b73 src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java 103d8bf Diff: https://reviews.apache.org/r/4833/diff Testing ------- TestHBaseFsck* are green. On live cluster, it does the fix as expected. Thanks, Jimmy

          People

          • Assignee:
            Jimmy Xiang
            Reporter:
            Jonathan Hsieh
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development