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

SerializedException should also handle java.lang.Error

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate 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

        Issue Links

        Activity

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

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment