Details

    • Hadoop Flags:
      Reviewed

      Description

      I see that FlowRunEntity methods getRunId() and getMaxEndTime() does not deserialize in efficient way which causes class cast exception based on the number.

        public long getRunId() {
          Object runId = getInfo().get(FLOW_RUN_ID_INFO_KEY);
          return runId == null ? 0L : (Long) runId;
        }
      

      and

        public long getMaxEndTime() {
          Object time = getInfo().get(FLOW_RUN_END_TIME);
          return time == null ? 0L : (Long)time;
        }
      

      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.

      1. YARN-6074.patch
        1 kB
        Rohith Sharma K S

        Activity

        Hide
        rohithsharma Rohith Sharma K S added a comment -

        Updated patch by type casting to Number and getting long value.

        Show
        rohithsharma Rohith Sharma K S added a comment - Updated patch by type casting to Number and getting long value.
        Hide
        varun_saxena Varun Saxena added a comment -

        I think this can go in trunk. Right ?

        Show
        varun_saxena Varun Saxena added a comment - I think this can go in trunk. Right ?
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 16s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
        +1 mvninstall 12m 37s trunk passed
        +1 compile 0m 24s trunk passed
        +1 checkstyle 0m 13s trunk passed
        +1 mvnsite 0m 26s trunk passed
        +1 mvneclipse 0m 13s trunk passed
        +1 findbugs 1m 9s trunk passed
        +1 javadoc 0m 18s trunk passed
        +1 mvninstall 0m 25s the patch passed
        +1 compile 0m 22s the patch passed
        +1 javac 0m 22s the patch passed
        +1 checkstyle 0m 10s the patch passed
        +1 mvnsite 0m 25s the patch passed
        +1 mvneclipse 0m 10s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 1m 12s the patch passed
        +1 javadoc 0m 17s the patch passed
        +1 unit 0m 25s hadoop-yarn-api in the patch passed.
        +1 asflicense 0m 16s The patch does not generate ASF License warnings.
        20m 33s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:a9ad5d6
        JIRA Issue YARN-6074
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12846268/YARN-6074.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 215da7e16072 3.13.0-95-generic #142-Ubuntu SMP Fri Aug 12 17:00:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / f59e36b
        Default Java 1.8.0_111
        findbugs v3.0.0
        Test Results https://builds.apache.org/job/PreCommit-YARN-Build/14605/testReport/
        modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api
        Console output https://builds.apache.org/job/PreCommit-YARN-Build/14605/console
        Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 16s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 mvninstall 12m 37s trunk passed +1 compile 0m 24s trunk passed +1 checkstyle 0m 13s trunk passed +1 mvnsite 0m 26s trunk passed +1 mvneclipse 0m 13s trunk passed +1 findbugs 1m 9s trunk passed +1 javadoc 0m 18s trunk passed +1 mvninstall 0m 25s the patch passed +1 compile 0m 22s the patch passed +1 javac 0m 22s the patch passed +1 checkstyle 0m 10s the patch passed +1 mvnsite 0m 25s the patch passed +1 mvneclipse 0m 10s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 12s the patch passed +1 javadoc 0m 17s the patch passed +1 unit 0m 25s hadoop-yarn-api in the patch passed. +1 asflicense 0m 16s The patch does not generate ASF License warnings. 20m 33s Subsystem Report/Notes Docker Image:yetus/hadoop:a9ad5d6 JIRA Issue YARN-6074 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12846268/YARN-6074.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 215da7e16072 3.13.0-95-generic #142-Ubuntu SMP Fri Aug 12 17:00:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / f59e36b Default Java 1.8.0_111 findbugs v3.0.0 Test Results https://builds.apache.org/job/PreCommit-YARN-Build/14605/testReport/ modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api Console output https://builds.apache.org/job/PreCommit-YARN-Build/14605/console Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        rohithsharma Rohith Sharma K S added a comment -

        I think this can go in trunk. Right ?

        Yup.. Need to be committed in branch yarn-5355 as well.

        Show
        rohithsharma Rohith Sharma K S added a comment - I think this can go in trunk. Right ? Yup.. Need to be committed in branch yarn-5355 as well.
        Hide
        rohithsharma Rohith Sharma K S added a comment -

        Varun Saxena do you mind committing this patch? FlowRunId test cases in YARN-6064 are dependent on this!!

        Show
        rohithsharma Rohith Sharma K S added a comment - Varun Saxena do you mind committing this patch? FlowRunId test cases in YARN-6064 are dependent on this!!
        Hide
        varun_saxena Varun Saxena added a comment -

        Ok...Will commit soon.

        Show
        varun_saxena Varun Saxena added a comment - Ok...Will commit soon.
        Hide
        varun_saxena Varun Saxena added a comment -

        Committed to trunk, YARN-5355 and YARN-5355-branch-2.
        Thanks Rohith Sharma K S for your contribution

        Show
        varun_saxena Varun Saxena added a comment - Committed to trunk, YARN-5355 and YARN-5355 -branch-2. Thanks Rohith Sharma K S for your contribution
        Hide
        hudson Hudson added a comment -

        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
        Show
        hudson Hudson added a comment - 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
        Hide
        sjlee0 Sangjin Lee added a comment -

        Thanks for catching this Rohith Sharma K S.

        Show
        sjlee0 Sangjin Lee added a comment - Thanks for catching this Rohith Sharma K S .

          People

          • Assignee:
            rohithsharma Rohith Sharma K S
            Reporter:
            rohithsharma Rohith Sharma K S
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development