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

Vrushali C commented on YARN-4455:
----------------------------------

Yes, we do need APIs for time range queries. These would be on the entity table 
and the application table. 

The metrics are already stored with event timestamp as part of the cell 
timestamp. If we know the metric name, we should set it in the scan and then 
use HBase 
scan#setTimeRange 
(https://hbase.apache.org/1.2/apidocs/org/apache/hadoop/hbase/client/Scan.html#setTimeRange-long-long-)
 .

If the scan is querying more than 1 CFs, then the jira you have linked 
[~varun_saxena] is the right way to go. With timeline metrics, all our metrics 
are only in one CF, so we should try as far as possible that the scan uses only 
that CF for better performance. If we do need to query more than 1 CF, then the 
API suggested by Varun should absolutely be used. 

Also, if we have only 1 specific timestamp that we know we want to query for, 
we should use scan#setTimestamp. 
(https://hbase.apache.org/1.2/apidocs/org/apache/hadoop/hbase/client/Scan.html#setTimeStamp-long-)

Couple of more points to keep in mind since timeseries data does have the 
potential to blow up the response size.  So
- We should ensure we limit the number of records being returned. 
- We should also set the maxVersions to be 1. 
https://hbase.apache.org/1.2/apidocs/org/apache/hadoop/hbase/client/Scan.html#setMaxVersions-int-


> Support fetching metrics by time range
> --------------------------------------
>
>                 Key: YARN-4455
>                 URL: https://issues.apache.org/jira/browse/YARN-4455
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: timelineserver
>    Affects Versions: YARN-2928
>            Reporter: Varun Saxena
>            Assignee: Varun Saxena
>              Labels: YARN-5355, yarn-5355-merge-blocker
>




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

---------------------------------------------------------------------
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