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

Viraj Jasani edited comment on HBASE-22735 at 7/31/19 8:17 PM:
---------------------------------------------------------------

Ok, so HBASE-22744 was merged ~20 hr ago. 

[~apurtell] I agree with having admin helper methods with impl details and for 
master branch, we can get data from ServerMetrics(instead of ServerLoad) etc 
with all data retrieval methods in admin.rb.

However, is it fine to move/refactor the above logic as part of this JIRA? If 
no, for now, I can keep the above logic with list_regions.rb with updated 
classes(focus only on removing deprecated methods so list_regions is not 
broken) and with another followup JIRA, I can focus on moving the logic to 
admin.rb as helper methods and that patch can just focus on helper 
methods(admin.rb) for all branches.

Please let me know your preference.


was (Author: vjasani):
Ok, so HBASE-22744 was merged ~20 hr ago. 

[~apurtell] I agree with having admin helper methods with impl details and for 
master branch, we can get data from ServerMetrics(instead of ServerLoad), 
RegionMetrics(instead of RegionLoad), ClusterMetrics(instead of ClusterStatus), 
with all data retrieval methods in admin.rb.

However, is it fine to move/refactor the above logic as part of this JIRA? If 
yes, I can work on patch for master and branch-1 having similar 
logic(additional work for master due to recent deprecation). If not, for now, I 
can keep the above logic with list_regions.rb with updated classes(focus only 
on removing deprecated methods so list_regions is alive) and with another 
followup JIRA, I can focus on moving all the logic to admin.rb and that patch 
can just focus on refactoring for all branches only.

Please let me know your preference.

> list_regions may throw an error if a region is RIT
> --------------------------------------------------
>
>                 Key: HBASE-22735
>                 URL: https://issues.apache.org/jira/browse/HBASE-22735
>             Project: HBase
>          Issue Type: Bug
>          Components: shell
>    Affects Versions: 1.5.0
>            Reporter: Andrew Purtell
>            Assignee: Viraj Jasani
>            Priority: Minor
>             Fix For: 3.0.0, 1.5.0, 2.3.0, 2.2.1, 2.1.6, 1.3.6, 1.4.11
>
>         Attachments: HBASE-22735-master-tmp-justforreview.patch, 
> HBASE-22735.branch-1.01.patch, HBASE-22735.branch-1.02.patch, 
> HBASE-22735.branch-1.03.patch, HBASE-22735.branch-1.04.patch, 
> HBASE-22735.master.01.patch, HBASE-22735.master.02.patch, 
> HBASE-22735.master.03.patch, HBASE-22735.master.04.patch, Screen Shot 
> 2019-07-30 at 11.53.53 PM.png
>
>
> The 'list_regions' shell command gets a list of regions for a given table and 
> then prints them and some attributes such as the server where they are 
> located, current request count, data locality, and such. 
> However if a region is in transition the command might fail with
> {{ERROR: undefined method `getDataLocality' for nil:NilClass}}
> and there may be other ways this can happen. Protect against use of nil 
> references and just display what we can. 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to