Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-5355 YARN Timeline Service v.2: alpha 2
  3. YARN-6074

FlowRunEntity does not deserialize long values correctly

    XMLWordPrintableJSON

Details

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

      Attachments

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

        Activity

          People

            rohithsharma Rohith Sharma K S
            rohithsharma Rohith Sharma K S
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: