From notifications-return-43577-archive-asf-public=cust-asf.ponee.io@accumulo.apache.org Wed May 30 18:47:50 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 6E6DD18063B for ; Wed, 30 May 2018 18:47:49 +0200 (CEST) Received: (qmail 53278 invoked by uid 500); 30 May 2018 16:47:48 -0000 Mailing-List: contact notifications-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jira@apache.org Delivered-To: mailing list notifications@accumulo.apache.org Received: (qmail 53266 invoked by uid 99); 30 May 2018 16:47:48 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 May 2018 16:47:48 +0000 From: GitBox To: notifications@accumulo.apache.org Subject: [GitHub] ctubbsii commented on a change in pull request #501: Improve some comparators using Java 8 Message-ID: <152769886780.1460.18065406687043711405.gitbox@gitbox.apache.org> Date: Wed, 30 May 2018 16:47:47 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit ctubbsii commented on a change in pull request #501: Improve some comparators using Java 8 URL: https://github.com/apache/accumulo/pull/501#discussion_r191841536 ########## File path: core/src/main/java/org/apache/accumulo/core/data/impl/KeyExtent.java ########## @@ -383,32 +384,14 @@ public static Mutation getPrevRowUpdateMutation(KeyExtent ke) { return m; } + private static final Comparator COMPARATOR = Comparator + .comparing(KeyExtent::getTableId) + .thenComparing(KeyExtent::getEndRow, Comparator.nullsLast(Text::compareTo)) Review comment: Oh, I think I understand now. How about something like: ```java // The last tablet in a table has no end row, so null sorts last for end row; similarly, the first tablet has no previous end row, so null sorts first for previous end row ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services