hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Varun Saxena (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-4455) Support fetching metrics by time range
Date Fri, 14 Jul 2017 13:38:00 GMT

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

Varun Saxena commented on YARN-4455:

Thanks [~rohithsharma] for the review.

bq. Just for curiosity, what are we writing and reading with supplemented Timestamp ?
Primarily used to distinguish between metrics written in flow run table from different apps.
So that we have 2 different puts for different apps and one does not overwrite metric of other
just because the timestamps were same. Not really required for entity and app tables but multiplying
it by a factor ensures that code path is common while writing.

bq. Method setMetricsTimeRange has conditional statement in each line. Can it be optimized
by implicitly assuming that tsBegin will not be less than 0 since TimelineDataManager validates
it? Similarly for tsEnd?
The code below is to handle overflow. When we calculate supplemented timestamp (i.e. multiply
tsBegin and tsEnd by a factor of 1000), overflow can potentially occur. Actual timestamps
would not be in that range but if input from user is wrong, the value can become negative
due to overflow after multiplication. Hence, the check. 
          ((supplementedTsBegin < 0) ? 0 : supplementedTsBegin),
          ((supplementedTsEnd < 0) ? Long.MAX_VALUE : supplementedTsEnd));

Will fix the nit.

> 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-5355
>            Reporter: Varun Saxena
>            Assignee: Varun Saxena
>              Labels: YARN-5355, yarn-5355-merge-blocker
>         Attachments: YARN-4455-YARN-5355.01.patch, YARN-4455-YARN-5355.02.patch

This message was sent by Atlassian JIRA

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

View raw message