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

Rohith Sharma K S commented on YARN-5585:
-----------------------------------------

bq. entities may not stored in their creation time order (although may quite 
possibly be so). Therefore this is slightly different to the fromId in ATS v1, 
where it will "retrieve entities earlier than and including the specified ID".
Right, entities are not stored in creation time order. But once rows are 
retrieved from HBase, it is sorted as TimelineEntity#compareTo provided. 
Say rows fetched are in format <entity-id,creationTime> like 
HBase stored entities in a row and fetched in the order <e5,c5> <e2,c2> <e1,c1> 
<e4,c4> <e3,c3> 
then after sorting <e5,c5> <e4,c4> <e3,c3> <e2,c2> <e1,c1> are returned. So I 
think behavior remain same. Here, fromId=e3 then e2,e1 can be returned. 

I think I see one potential issue because of *entities may not stored in their 
creation time order* is filters *createdtimestart* and *createdtimeend* might 
not work properly. Say if these two filter are set as c1 and c5 respectively 
then HBase will return empty result scanner I think, since c1 comes after c5 in 
a row. This behavior need to confirm from HBase end. To test this behavior 
YARN-5094 blocks:-(

> [Atsv2] Add a new filter fromId in REST endpoints
> -------------------------------------------------
>
>                 Key: YARN-5585
>                 URL: https://issues.apache.org/jira/browse/YARN-5585
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: timelinereader
>            Reporter: Rohith Sharma K S
>            Assignee: Rohith Sharma K S
>
> TimelineReader REST API's provides lot of filters to retrieve the 
> applications. Along with those, it would be good to add new filter i.e fromId 
> so that entities can be retrieved after the fromId. 
> Example : If applications are stored database, app-1 app-2 ... app-10.
> *getApps?limit=5* gives app-1 to app-10. But to retrieve next 5 apps, it is 
> difficult.
> So proposal is to have fromId in the filter like 
> *getApps?limit=5&&fromId=app-5* which gives list of apps from app-6 to 
> app-10. 
> This is very useful for pagination in web UI.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to