Return-Path: X-Original-To: apmail-hadoop-yarn-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-yarn-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F308C17E93 for ; Fri, 12 Jun 2015 05:29:01 +0000 (UTC) Received: (qmail 34346 invoked by uid 500); 12 Jun 2015 05:29:01 -0000 Delivered-To: apmail-hadoop-yarn-issues-archive@hadoop.apache.org Received: (qmail 34297 invoked by uid 500); 12 Jun 2015 05:29:01 -0000 Mailing-List: contact yarn-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: yarn-issues@hadoop.apache.org Delivered-To: mailing list yarn-issues@hadoop.apache.org Received: (qmail 34285 invoked by uid 99); 12 Jun 2015 05:29:01 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Jun 2015 05:29:01 +0000 Date: Fri, 12 Jun 2015 05:29:01 +0000 (UTC) From: "Amareshwari Sriramadasu (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-3770) SerializedException should also handle java.lang.Error MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/YARN-3770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14582968#comment-14582968 ] Amareshwari Sriramadasu commented on YARN-3770: ----------------------------------------------- +1 for patch. Changes look good. > SerializedException should also handle java.lang.Error > ------------------------------------------------------- > > Key: YARN-3770 > URL: https://issues.apache.org/jira/browse/YARN-3770 > Project: Hadoop YARN > Issue Type: Bug > Reporter: Lavkesh Lahngir > Assignee: Lavkesh Lahngir > Attachments: YARN-3770.1.patch, YARN-3770.patch > > > IN SerializedExceptionPBImpl deserialize() method > {code} > 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()); > } > {code} > 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. -- This message was sent by Atlassian JIRA (v6.3.4#6332)