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

Varun Saxena commented on YARN-6027:
------------------------------------

Thanks [~rohithsharma] for the patch. As discussed offline, I am in agreement 
with generating fromId from storage layer as it can be different depending on 
storage layer.
This is unlike UID which was primarily generated to replace multiple path 
params in REST URL and hence was storage independent.
Also as in HBase from ID will be equivalent to row key, I am in agreement with 
generating it from RowKey classes.

Few comments.
# As from Id will have to be provided for most of the row keys, should we have 
another interface to encode and decode escaped row keys in String format and 
implement it in respective row keys converters along with KeyConverter 
interface? Thoughts?
# Move decode(String fromId) and  getRowKeyAsString methods to 
FlowActivityRowKeyConverter if above point is agreeable? And then rename these 
methods suitably in FlowActivityRowKey.
# FlowActivityRowKey l.20: We have an unused import of java.util.Collections
# FlowActivityRowKey l.119. IllegalArgumentException should be thrown. Also no 
need of appending result of getMessage IMO as its quite generic.
# Can you add javadoc for fromId?
# In TimelineReaderUtils, DEFAULT_DELIMITER_CHAR and DEFAULT_SEPARATOR_CHAR can 
be private.
# We do not really have a public class for constants, so can we add FROMID_KEY 
as a public static constant in TimelineReaderUtils so that 
TestTimelineReaderWebServicesHBaseStorage#testGetFlowsForPagination can also 
use it. Just to avoid changing the test case if FROMID_KEY changes in future.
# Nit: In the test case, &&fromid should be &fromid.
# Can we have a couple of cases in test where enconding/decoding of separator 
and escape chars would be required?

> Support fromid(offset) filter for /flows API
> --------------------------------------------
>
>                 Key: YARN-6027
>                 URL: https://issues.apache.org/jira/browse/YARN-6027
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: timelineserver
>            Reporter: Rohith Sharma K S
>            Assignee: Rohith Sharma K S
>              Labels: yarn-5355-merge-blocker
>         Attachments: YARN-6027-YARN-5355.0001.patch, 
> YARN-6027-YARN-5355.0002.patch, YARN-6027-YARN-5355.0003.patch, 
> YARN-6027-YARN-5355.0004.patch
>
>
> In YARN-5585 , fromId is supported for retrieving entities. We need similar 
> filter for flows/flowRun apps and flow run and flow as well. 
> Along with supporting fromId, this JIRA should also discuss following points
> * Should we throw an exception for entities/entity retrieval if duplicates 
> found?
> * TimelieEntity :
> ** Should equals method also check for idPrefix?
> ** Does idPrefix is part of identifiers?



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to