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

Ashish Singhi commented on HBASE-14925:
---------------------------------------

{code}
+        for server_name in cluster_status.getServers()
+          for name, region in 
cluster_status.getLoad(server_name).getRegionsLoad()
+            region_name = region.getNameAsString()
+            regionStoreFileSize = region.getStorefileSizeMB()
+            regionRequests = region.getRequestsCount()
+            if region_name.start_with? tgtTable
{code}
Instead of loading all the regions available in the cluster we can get the 
regions of the target table only and print it details. We can get the target 
table regions location from Connection#getRegionLocator#getAllRegionLocations, 
otherwise imagine a cluster having 1M regions, the response of this command 
will be very slow.

Also similar like web UI you can log other information of Regions like start 
key, end 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
>         Attachments: 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