You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2013/08/06 18:02:49 UTC

[jira] [Commented] (HBASE-9116) Add a view/edit tool for favored node mappings for regions

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

Ted Yu commented on HBASE-9116:
-------------------------------

Useful tool :-)
{code}
+    List<Float> dispersion = report.getDispersionInformation();
+    if (simplePrint) {
+      DecimalFormat df = new java.text.DecimalFormat("#.##");
+      System.out.println("\tAvg dispersion score: "
+          + df.format(dispersion.get(0)) + " hosts;\tMax dispersion score: "
{code}
It would be easier to maintain the code if index to dispersions has corresponding enum.

For FSRegionScanner :
{code}
+   * Maps region encoded names to maps of hostnames to fractional locality of
+   * that region on that host.
+   */
+  private Map<String, Map<String, Float>> regionDegreeLocalityMapping;
{code}
Should ServerName be used as key for the inner Map above ?
{code}
+        // not part of a table?
+        if (parent.getName().startsWith(".")
+            && !parent.getName().equals(".META.")) {
{code}
The above would need adjustment once namespace patch goes in.

RegionPlacementMaintainer.java needs license
{code}
+   * @param newPlanMap - new AssignmentPlan
+   * @return how many primaries will move per table
+   */
+  public Map<String, Integer> getRegionsMovement(FavoredNodes newPlan)
{code}
Parameter and its javadoc don't seem to match.
                
> Add a view/edit tool for favored node mappings for regions
> ----------------------------------------------------------
>
>                 Key: HBASE-9116
>                 URL: https://issues.apache.org/jira/browse/HBASE-9116
>             Project: HBase
>          Issue Type: Improvement
>          Components: Region Assignment
>    Affects Versions: 0.95.0
>            Reporter: Devaraj Das
>            Assignee: Devaraj Das
>         Attachments: 9116-1.txt
>
>
> Add a tool that one can run offline to view the favored node mappings for regions, and also fix the mappings if needed. Such a tool exists in the 0.89-fb branch. Will port it over to trunk/0.95.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira