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

Andrew Purtell commented on HBASE-5061:
---------------------------------------

Usage:
{noformat}
./bin/hbase org.apache.hadoop.hbase.util.StoreFileLocalityChecker 
usage: org.apache.hadoop.hbase.util.StoreFileLocalityChecker [-f <arg>]
       [-h <arg>] [-r <arg>] [-s] [-t <arg>] [-v]
 -f,--file <arg>     Analyze a single file. Give the full path.
 -h,--host <arg>     Consider given host as local, defaults to the local
                     host
 -r,--region <arg>   Analyze all store files for the region. Can be the
                     full region name or a partial prefix.
 -s,--summary        Summary only
 -t,--table <arg>    Analyze all store files for regions of the table
                     served by the local regionserver. Give the table
                     name.
 -v,--verbose        Verbose output
{noformat}

{{./bin/hbase org.apache.hadoop.hbase.util.StoreFileLocalityChecker -t 
TestTable}} produces this output:
{noformat}
hdfs://acer.localdomain:8020/hbase/TestTable/9020c78f14084cfbed55106910a0c175/info/d42cdf9b15e942b1aba8c5752685a29e:
 1.0
hdfs://acer.localdomain:8020/hbase/TestTable/9020c78f14084cfbed55106910a0c175/info/f4459700138545d4bce236290db606fc:
 1.0
hdfs://acer.localdomain:8020/hbase/TestTable/ea9d52f79847c606b4b62056a7d5c6d8/info/463c359b8d6040bd9c8b64948611182d:
 1.0
hdfs://acer.localdomain:8020/hbase/TestTable/b13c50907b32c0aac503d593ef87f586/info/4cde1b33b93a4bfd8f950a64189e7808:
 1.0
hdfs://acer.localdomain:8020/hbase/TestTable/9d97ffcf9ceac643ba2c3e2b6ad2c416/info/07ec8228b74f434f852aac208437f6e6:
 1.0
hdfs://acer.localdomain:8020/hbase/TestTable/9d97ffcf9ceac643ba2c3e2b6ad2c416/info/59414c7c8a2a4dd5a0c304eb496f8c78:
 1.0
hdfs://acer.localdomain:8020/hbase/TestTable/9d97ffcf9ceac643ba2c3e2b6ad2c416/info/67dd2f83803e4b588926da299c51dffa:
 1.0
Block locality index
  Avg: 1.0
  Min: 1.0
  Max: 1.0
{noformat}

{{./bin/hbase org.apache.hadoop.hbase.util.StoreFileLocalityChecker -r 
TestTable,0000775744}} produces this output:
{noformat}
hdfs://acer.localdomain:8020/hbase/TestTable/b13c50907b32c0aac503d593ef87f586/info/4cde1b33b93a4bfd8f950a64189e7808:
 1.0
Block locality index
  Avg: 1.0
  Min: 1.0
  Max: 1.0
{noformat}

{{./bin/hbase org.apache.hadoop.hbase.util.StoreFileLocalityChecker -f 
hdfs://acer.localdomain:8020/hbase/TestTable/b13c50907b32c0aac503d593ef87f586/info/4cde1b33b93a4bfd8f950a64189e7808}}
 produces this output:
{noformat}
hdfs://acer.localdomain:8020/hbase/TestTable/b13c50907b32c0aac503d593ef87f586/info/4cde1b33b93a4bfd8f950a64189e7808:
 1.0
Block locality index
  Avg: 1.0
  Min: 1.0
  Max: 1.0
{noformat}

Happy to change this in ways people need.
                
> HFileLocalityChecker
> --------------------
>
>                 Key: HBASE-5061
>                 URL: https://issues.apache.org/jira/browse/HBASE-5061
>             Project: HBase
>          Issue Type: New Feature
>            Reporter: Andrew Purtell
>            Assignee: Andrew Purtell
>            Priority: Minor
>
> org.apache.hadoop.hbase.HFileLocalityChecker [options]
> A tool to report the number of local and nonlocal HFile blocks, and the ratio 
> of as a percentage.
> Where options are:
> |-f <file>|Analyze a store file|
> |-r <region>|Analyze all store files for the region|
> |-t <table>|Analyze all store files for regions of the table served by the 
> local regionserver|
> |-h <host>|Consider <host> local, defaults to the local host|
> |-v|Verbose operation|

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to