[ https://issues.apache.org/jira/browse/HBASE-7789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13574692#comment-13574692 ]
Ted Yu commented on HBASE-7789: ------------------------------- {code} + * Adds / subs a 10% jitter. Minimum is 1. + */ + public static long addJitter(final long pause, final float jitter) { {code} Since the above is a public method, please add javadoc for the parameters. {code} + return 1; + } else { {code} 'else' is not needed. {code} + * @return a sorted array list, by death time. {code} Please add sort order description. {code} + private static Comparator<Pair<ServerName, Long>> ServerNameDateComparator = ... + public int compare(Pair<ServerName, Long> o1, Pair<ServerName, Long> o2) { + return o1.getSecond().compareTo(o2.getSecond()); {code} Here only the time is compared. Maybe there is a better name for the comparator class ? > Clean DeadServer.java and add a Jitter method in ConnectionUtils > ---------------------------------------------------------------- > > Key: HBASE-7789 > URL: https://issues.apache.org/jira/browse/HBASE-7789 > Project: HBase > Issue Type: Bug > Components: master > Affects Versions: 0.96.0 > Reporter: nkeywal > Assignee: nkeywal > Fix For: 0.96.0 > > Attachments: 7789.v1.patch > > > I need to do some changes in DeadServer because of HBASE-7390. To minimize > the patch size and simplifies the feedback, I prefer to isolate the issue. > Changes are: > - Add the time when the server was declared as dead. It's what I need in > HBASE-7390, but it makes sense even without it, for example to be shown in > the UI. > - suppress the extends on Set & clean up all the not used methods > - use directly the object instead of a copy. > For connection utils, we currently have a jitter of 1%. I need a bigger one > for sure in one case, but I wonder if we should not increase it in all cases? > instead of plus 1%, we should have plus or minus 10% imho. > Tests are in progress locally, I will add the patch when they're ok. -- 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