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

Himanshu Vashishtha commented on HBASE-7704:
--------------------------------------------

Stack: this is how it looks like now:
Help section: (one can also use --h, -help, --help)
{code}
/home/himanshu/Work/Cloudera/hbase-92/hbase/hbase-assembly/target/hbase-0.95.0-SNAPSHOT/bin/hbase
 org.apache.hadoop.hbase.util.HFileV1Detector -h
usage: HFileV1Detector [-h] [-n <arg>] [-p <arg>]
 -h,--help                    Help
 -n,--numberOfThreads <arg>   Number of threads to use while processing
                              HFiles.
 -p,--path <arg>              Path to a table, or hbase installation
In case no option is provided, it processes hbase.rootdir using 10 threads.
Example:
 To detect any HFileV1 in a given hbase installation '/myhbase':
 $ $HBASE_HOME/bin/hbase org.apache.hadoop.hbase.util.HFileV1Detector -p 
/myhbase
{code}

Directory with no hfilev1:
{code}
 
/home/himanshu/Work/Cloudera/hbase-92/hbase/hbase-assembly/target/hbase-0.95.0-SNAPSHOT/bin/hbase
 org.apache.hadoop.hbase.util.HFileV1Detector -p /hbase1
No HFile V1 Found
{code}

Directory with a corrupt file (neither v1, nor v2), and 2 hfilev1:
{code}
/home/himanshu/Work/Cloudera/hbase-92/hbase/hbase-assembly/target/hbase-0.95.0-SNAPSHOT/bin/hbase
 org.apache.hadoop.hbase.util.HFileV1Detector -p /cdh4-2

Following regions has HFileV1 and needs to be Major Compacted:

hdfs://localhost:41020/cdh4-2/usertable/fa02dac1f38d03577bd0f7e666f12812
hdfs://localhost:41020/cdh4-2/usertable/ecdd3eaee2d2fcf8184ac025555bb2af


Following HFileV1 are found:

hdfs://localhost:41020/cdh4-2/usertable/fa02dac1f38d03577bd0f7e666f12812/family/249450144068442524
hdfs://localhost:41020/cdh4-2/usertable/ecdd3eaee2d2fcf8184ac025555bb2af/family/249450144068442524


Following HFiles are corrupted as their version is unknown:

hdfs://localhost:41020/cdh4-2/usertable/fa02dac1f38d03577bd0f7e666f12812/family/1
{code}

Please review.
                
> migration tool that checks presence of HFile V1 files
> -----------------------------------------------------
>
>                 Key: HBASE-7704
>                 URL: https://issues.apache.org/jira/browse/HBASE-7704
>             Project: HBase
>          Issue Type: Task
>            Reporter: Ted Yu
>            Assignee: Himanshu Vashishtha
>            Priority: Blocker
>             Fix For: 0.95.1
>
>         Attachments: HBase-7704-v1.patch, HBase-7704-v2.patch, 
> HBase-7704-v3.patch, HBase-7704-v4.patch, HBASE-7704-v5.patch, 
> HBASE-7704-v6.patch
>
>
> Below was Stack's comment from HBASE-7660:
> Regards the migration 'tool', or 'tool' to check for presence of v1 files, I 
> imagine it as an addition to the hfile tool 
> http://hbase.apache.org/book.html#hfile_tool2 The hfile tool already takes a 
> bunch of args including printing out meta. We could add an option to print 
> out version only – or return 1 if version 1 or some such – and then do a bit 
> of code to just list all hfiles and run this script against each. Could MR it 
> if too many files.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to