[
https://issues.apache.org/jira/browse/HBASE-17973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15989731#comment-15989731
]
Sean Busbey commented on HBASE-17973:
-------------------------------------
{code}
+ startKey = Bytes.toString(hregion_info.getStartKey())
+ endKey = Bytes.toString(hregion_info.getEndKey())
+ region_load_map =
cluster_status.getLoad(server_name).getRegionsLoad()
+ region_load = region_load_map.get(hregion_info.getRegionName())
+ region_store_file_size = region_load.getStorefileSizeMB()
+ region_requests = region_load.getRequestsCount()
+ # Ignore regions which exceed our locality threshold
+ if accept_region_for_locality? region_load.getDataLocality(),
locality_threshold
+ results << { "server" => hregion.getServerName().toString(),
"name" => hregion_info.getRegionNameAsString(), "startkey" => startKey,
"endkey" => endKey,
+ "size" => region_store_file_size, "requests" =>
region_requests, "locality" => region_load.getDataLocality() }
end
{code}
Can we do the locality check prior to setting up all the pieces for the results?
> Create shell command to identify regions with poor locality
> -----------------------------------------------------------
>
> Key: HBASE-17973
> URL: https://issues.apache.org/jira/browse/HBASE-17973
> Project: HBase
> Issue Type: Improvement
> Components: shell
> Reporter: Josh Elser
> Assignee: Josh Elser
> Fix For: 2.0.0
>
> Attachments: HBASE-17973.001.patch
>
>
> The data locality of regions often plays a large role in the efficiency of
> HBase. Compactions are also expensive to execute, especially on very large
> tables. The balancer can do a good job trying to maintain locality (when
> tuned properly), but it is not perfect.
> This creates a less-than-desirable situation where it's a costly operation to
> take a cluster with spotty poor locality (e.g. a small percentage of
> regionservers with poor locality).
> We already have this information available via the {{ClusterStatus}} proto.
> We can easily write a shell command that can present regions which are
> lacking a certain percentage of locality.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)