You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Varun Saxena (JIRA)" <ji...@apache.org> on 2017/01/09 10:53:58 UTC

[jira] [Updated] (YARN-6074) FlowRunEntity does not deserialize long values correctly

     [ https://issues.apache.org/jira/browse/YARN-6074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Varun Saxena updated YARN-6074:
-------------------------------
    Summary: FlowRunEntity does not deserialize long values correctly  (was: FlowRunEntity does not deserialize long values in efficient way. )

> FlowRunEntity does not deserialize long values correctly
> --------------------------------------------------------
>
>                 Key: YARN-6074
>                 URL: https://issues.apache.org/jira/browse/YARN-6074
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: timelinereader
>            Reporter: Rohith Sharma K S
>            Assignee: Rohith Sharma K S
>         Attachments: YARN-6074.patch
>
>
> I see that FlowRunEntity methods *getRunId()* and *getMaxEndTime()* does not deserialize in efficient way which causes class cast exception based on the number.
> {code}
>   public long getRunId() {
>     Object runId = getInfo().get(FLOW_RUN_ID_INFO_KEY);
>     return runId == null ? 0L : (Long) runId;
>   }
> {code} 
> and 
> {code}
>   public long getMaxEndTime() {
>     Object time = getInfo().get(FLOW_RUN_END_TIME);
>     return time == null ? 0L : (Long)time;
>   }
> {code} 
> The reason for class caste exception is Json has data type Number which includes all java primitive types. So, if number with in the range of Integer max, then Object is converted to Integer which fails  to type cast to Long. 



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