saintstack commented on a change in pull request #775: HBASE-23230 Enforce
member visibility in HRegionServer
URL: https://github.com/apache/hbase/pull/775#discussion_r340818108
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
##########
@@ -2904,13 +2850,7 @@ public int compare(Long a, Long b) {
*/
SortedMap<Long, Collection<HRegion>>
getCopyOfOnlineRegionsSortedByOnHeapSize() {
// we'll sort the regions in reverse
- SortedMap<Long, Collection<HRegion>> sortedRegions = new TreeMap<>(
- new Comparator<Long>() {
- @Override
- public int compare(Long a, Long b) {
- return -1 * a.compareTo(b);
- }
- });
+ SortedMap<Long, Collection<HRegion>> sortedRegions = new
TreeMap<>(Comparator.reverseOrder());
Review comment:
Good
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services