hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-6074) FlowRunEntity does not deserialize long values correctly
Date Mon, 09 Jan 2017 11:12:58 GMT

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

Hudson commented on YARN-6074:
------------------------------

FAILURE: Integrated in Jenkins build Hadoop-trunk-Commit #11089 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/11089/])
YARN-6074. FlowRunEntity does not deserialize long values correctly (varunsaxena: rev db490eccced3c42ac27253ca6cbaf10a77e0e116)
* (edit) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/timelineservice/FlowRunEntity.java


> 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
>             Fix For: 3.0.0-alpha2, YARN-5355, YARN-5355-branch-2
>
>         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


Mime
View raw message