[ 
https://issues.apache.org/jira/browse/HBASE-14925?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Karan Mehta updated HBASE-14925:
--------------------------------
    Release Note: 
Added a shell command 'list_regions' for displaying the table's region info 
through command line.

        List all regions for a particular table as an array and also filter 
them by server name (optional) as prefix
        and maximum locality (optional). By default, it will return all the 
regions for the table with any locality.
        The command displays server name, region name, start key, end key, size 
of the region in MB, number of requests
        and the locality. The information can be projected out via an array as 
third parameter. By default all these information
        is displayed. Possible array values are SERVER_NAME, REGION_NAME, 
START_KEY, END_KEY, SIZE, REQ and LOCALITY. Values
        are not case sensitive. If you don't want to filter by server name, 
pass an empty hash / string as shown below.

        Examples:
        hbase> list_regions 'table_name'
        hbase> list_regions 'table_name', 'server_name'
        hbase> list_regions 'table_name', {SERVER_NAME => 'server_name', 
LOCALITY_THRESHOLD => 0.8}
        hbase> list_regions 'table_name', {SERVER_NAME => 'server_name', 
LOCALITY_THRESHOLD => 0.8}, ['SERVER_NAME']
        hbase> list_regions 'table_name', {}, ['SERVER_NAME', 'start_key']
        hbase> list_regions 'table_name', '', ['SERVER_NAME', 'start_key']

> Develop HBase shell command/tool to list table's region info through command 
> line
> ---------------------------------------------------------------------------------
>
>                 Key: HBASE-14925
>                 URL: https://issues.apache.org/jira/browse/HBASE-14925
>             Project: HBase
>          Issue Type: Improvement
>          Components: shell
>            Reporter: Romil Choksi
>            Assignee: Karan Mehta
>             Fix For: 2.0.0, 1.4.0
>
>         Attachments: HBASE-14925.002.patch, 
> HBASE-14925.003.addendum.001.patch, HBASE-14925.003.patch, HBASE-14925.patch
>
>
> I am going through the hbase shell commands to see if there is anything I can 
> use to get all the regions info just for a particular table. I don’t see any 
> such command that provides me that information.
> It would be better to have a command that provides region info, start key, 
> end key etc taking a table name as the input parameter. This is available 
> through HBase UI on clicking on a particular table's link
> A tool/shell command to get a list of regions for a table or all tables in a 
> tabular structured output (that is machine readable)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to