Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-3770

SerializedException should also handle java.lang.Error

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      IN SerializedExceptionPBImpl deserialize() method

          Class classType = null;
          if (YarnException.class.isAssignableFrom(realClass)) {
            classType = YarnException.class;
          } else if (IOException.class.isAssignableFrom(realClass)) {
            classType = IOException.class;
          } else if (RuntimeException.class.isAssignableFrom(realClass)) {
            classType = RuntimeException.class;
          } else {
            classType = Exception.class;
          }
          return instantiateException(realClass.asSubclass(classType), getMessage(),
            cause == null ? null : cause.deSerialize());
        }
      

      if realClass is a subclass of java.lang.Error deSerialize() throws ClassCastException.
      in the last else statement classType should be equal to Trowable.class instead of Exception.class.

        Attachments

        1. YARN-3770.1.patch
          3 kB
          Lavkesh Lahngir
        2. YARN-3770.patch
          3 kB
          Lavkesh Lahngir

          Issue Links

            Activity

              People

              • Assignee:
                lavkesh Lavkesh Lahngir
                Reporter:
                lavkesh Lavkesh Lahngir
              • Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: