Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A5482200BA6 for ; Tue, 18 Oct 2016 20:21:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A40CF160AF7; Tue, 18 Oct 2016 18:21:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 009D5160AFB for ; Tue, 18 Oct 2016 20:20:59 +0200 (CEST) Received: (qmail 54904 invoked by uid 500); 18 Oct 2016 18:20:59 -0000 Mailing-List: contact yarn-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list yarn-issues@hadoop.apache.org Received: (qmail 54646 invoked by uid 99); 18 Oct 2016 18:20:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Oct 2016 18:20:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id B637F2C4C79 for ; Tue, 18 Oct 2016 18:20:58 +0000 (UTC) Date: Tue, 18 Oct 2016 18:20:58 +0000 (UTC) From: "Sangjin Lee (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-5715) introduce entity prefix for return and sort order MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 18 Oct 2016 18:21:00 -0000 [ https://issues.apache.org/jira/browse/YARN-5715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15586228#comment-15586228 ] Sangjin Lee commented on YARN-5715: ----------------------------------- That sounds reasonable. I haven't checked, but don't we have a utils class there already? If so, we could add the method there. > introduce entity prefix for return and sort order > ------------------------------------------------- > > Key: YARN-5715 > URL: https://issues.apache.org/jira/browse/YARN-5715 > Project: Hadoop YARN > Issue Type: Sub-task > Components: timelineserver > Reporter: Sangjin Lee > Assignee: Rohith Sharma K S > Priority: Critical > Attachments: YARN-5715-YARN-5355.01.patch, YARN-5715-YARN-5355.02.patch, YARN-5715-YARN-5355.03.patch > > > While looking into YARN-5585, we have come across the need to provide a sort order different than the current entity id order. The current entity id order returns entities strictly in the lexicographical order, and as such it returns the earliest entities first. This may not be the most natural return order. A more natural return/sort order would be from the most recent entities. > To solve this, we would like to add what we call the "entity prefix" in the row key for the entity table. It is a number (long) that can be easily provided by the client on write. In the row key, it would be added before the entity id itself. > The entity prefix would be considered mandatory. On all writes (including updates) the correct entity prefix should be set by the client so that the correct row key is used. The entity prefix needs to be unique only within the scope of the application and the entity type. > For queries that return a list of entities, the prefix values will be returned along with the entity id's. Queries that specify the prefix and the id should be returned quickly using the row key. If the query omits the prefix but specifies the id (query by id), the query may be less efficient. > This JIRA should add the entity prefix to the entity API and add its handling to the schema and the write path. The read path will be addressed in YARN-5585. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: yarn-issues-help@hadoop.apache.org