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 2EBD717334 for ; Thu, 4 Jun 2015 22:43:39 +0000 (UTC) Received: (qmail 98600 invoked by uid 500); 4 Jun 2015 22:43:39 -0000 Delivered-To: apmail-hadoop-yarn-issues-archive@hadoop.apache.org Received: (qmail 98553 invoked by uid 500); 4 Jun 2015 22:43:39 -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 98536 invoked by uid 99); 4 Jun 2015 22:43:39 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jun 2015 22:43:39 +0000 Date: Thu, 4 Jun 2015 22:43:38 +0000 (UTC) From: "zhihai xu (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-3745) SerializedException should also try to instantiate internal exception with the default constructor 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-3745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14573724#comment-14573724 ] zhihai xu commented on YARN-3745: --------------------------------- [~lavkesh], thanks for working on this issue. This looks like a good catch. One question about the patch, why retrying on SecurityException? Will retrying on NoSuchMethodException be enough? If need retrying on SecurityException, Can we add a test case against it? There is a typo in the comment {{This does not has constructor with String argument}}, should be {{have}} instead of {{has}}. Also could we make the comment {{Try with String constructor if it fails try with default.}} clearer as {{Try constructor with String argument, if it fails, try default.}} Can we add some comment to explain why ClassNotFoundException is expected in the test? > SerializedException should also try to instantiate internal exception with the default constructor > -------------------------------------------------------------------------------------------------- > > Key: YARN-3745 > URL: https://issues.apache.org/jira/browse/YARN-3745 > Project: Hadoop YARN > Issue Type: Bug > Affects Versions: 2.6.0 > Reporter: Lavkesh Lahngir > Assignee: Lavkesh Lahngir > Attachments: YARN-3745.1.patch, YARN-3745.patch > > > While deserialising a SerializedException it tries to create internal exception in instantiateException() with cn = cls.getConstructor(String.class). > if cls does not has a constructor with String parameter it throws Nosuchmethodexception > for example ClosedChannelException class. > We should also try to instantiate exception with default constructor so that inner exception can to propagated. -- This message was sent by Atlassian JIRA (v6.3.4#6332)