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

SerializedException should also handle java.lang.Error

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.8.0, 3.0.0-alpha1
    • None
    • None
    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment