You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by dhruba borthakur <dh...@gmail.com> on 2010/06/22 11:11:37 UTC

Review Request: Provide a HBase checker called HBaseFsck

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://review.hbase.org/r/219/
-----------------------------------------------------------

Review request for hbase.


Summary
-------

This utility scans the META table and verifies that the relevant regins are served by region servers. It prints out inconsistencies if a region server is serving a region that does not exist in META and vice versa. This utility then scans HDFS and prints out inconsistencies between tables found in HDFS and what is listed in META table. This utility is a reporting utility (just like HDFS fsck), does not fix anything automatically.

You can run this as
bin/hbase —config <confdir> org.apache.hadoop.hbase.client.HBaseFsck -details > /tmp/hsck.out
The output will be stored in /tmp/hsck.out


This addresses bug http://issues.apache.org/jira/browse/HBASE-7.
    http://issues.apache.org/jira/browse/http://issues.apache.org/jira/browse/HBASE-7


Diffs
-----

  /src/main/java/org/apache/hadoop/hbase/client/HBaseFsck.java PRE-CREATION 

Diff: http://review.hbase.org/r/219/diff


Testing
-------


Thanks,

dhruba


Re: Review Request: Provide a HBase checker called HBaseFsck

Posted by st...@duboce.net.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://review.hbase.org/r/219/#review263
-----------------------------------------------------------

Ship it!


Lets just commit it.  Its a great start.  There are nitpicks below but they are not important.  I tried it and it 'basically works.  Need experience with this tool to make it better (e.g. add in what the hbase-7 ruby script does).   Also, start adding unit tests to insure this tool does not start to rot as hbase develops.... 


/src/main/java/org/apache/hadoop/hbase/client/HBaseFsck.java
<http://review.hbase.org/r/219/#comment1116>

    Put declaration and assignment together?



/src/main/java/org/apache/hadoop/hbase/client/HBaseFsck.java
<http://review.hbase.org/r/219/#comment1117>

    Would be nice to have this stuff appear in UI... later we can change this System.out.println into a print(key, value)... and then change the print implementation based off context....



/src/main/java/org/apache/hadoop/hbase/client/HBaseFsck.java
<http://review.hbase.org/r/219/#comment1118>

    You need a filter here because tables are not only thing in this top-level dir: e.g. .log dir.



/src/main/java/org/apache/hadoop/hbase/client/HBaseFsck.java
<http://review.hbase.org/r/219/#comment1119>

    Could read the .regioninfo file in this dir and output it so admin could see key range of this region.



/src/main/java/org/apache/hadoop/hbase/client/HBaseFsck.java
<http://review.hbase.org/r/219/#comment1122>

    It doesn't 'return'... it populates the passed Map (Why not have it return the Map?  The 'final' attribute?).



/src/main/java/org/apache/hadoop/hbase/client/HBaseFsck.java
<http://review.hbase.org/r/219/#comment1120>

    I should add this to the bin/hbase output so you can just do:
    
    ./bin/hbase fsck and it outputs usage, etc.



/src/main/java/org/apache/hadoop/hbase/client/HBaseFsck.java
<http://review.hbase.org/r/219/#comment1121>

    If I do as you suggest and pass a -conf as in 
    
    bin/hbase —config <confdir> ....
    
    It says 'Could not create Java virtual machine...'
    
    You need to do --config.
    
    ... so its kinda odd that config is gnu-style opts but opts for this command are java-style... but no biggie


- stack


On 2010-06-22 02:11:37, dhruba borthakur wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://review.hbase.org/r/219/
> -----------------------------------------------------------
> 
> (Updated 2010-06-22 02:11:37)
> 
> 
> Review request for hbase.
> 
> 
> Summary
> -------
> 
> This utility scans the META table and verifies that the relevant regins are served by region servers. It prints out inconsistencies if a region server is serving a region that does not exist in META and vice versa. This utility then scans HDFS and prints out inconsistencies between tables found in HDFS and what is listed in META table. This utility is a reporting utility (just like HDFS fsck), does not fix anything automatically.
> 
> You can run this as
> bin/hbase —config <confdir> org.apache.hadoop.hbase.client.HBaseFsck -details > /tmp/hsck.out
> The output will be stored in /tmp/hsck.out
> 
> 
> This addresses bug http://issues.apache.org/jira/browse/HBASE-7.
>     http://issues.apache.org/jira/browse/http://issues.apache.org/jira/browse/HBASE-7
> 
> 
> Diffs
> -----
> 
>   /src/main/java/org/apache/hadoop/hbase/client/HBaseFsck.java PRE-CREATION 
> 
> Diff: http://review.hbase.org/r/219/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> dhruba
> 
>