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 7909118620 for ; Fri, 24 Jul 2015 20:54:06 +0000 (UTC) Received: (qmail 84139 invoked by uid 500); 24 Jul 2015 20:54:06 -0000 Delivered-To: apmail-hadoop-yarn-issues-archive@hadoop.apache.org Received: (qmail 84104 invoked by uid 500); 24 Jul 2015 20:54:06 -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 83965 invoked by uid 99); 24 Jul 2015 20:54:06 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jul 2015 20:54:06 +0000 Date: Fri, 24 Jul 2015 20:54:06 +0000 (UTC) From: "Jason Lowe (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (YARN-3976) Catch ApplicationNotFoundException instead of parent YarnException in YarnClient and AppReportFetcher 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-3976?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Lowe updated YARN-3976: ----------------------------- Target Version/s: 2.8.0 (was: 2.7.2) Priority: Trivial (was: Major) This is a trivial code cleanup and not really a bugfix, so moving out of the 2.7.2 release to reduce code churn on that patch release. > Catch ApplicationNotFoundException instead of parent YarnException in YarnClient and AppReportFetcher > ----------------------------------------------------------------------------------------------------- > > Key: YARN-3976 > URL: https://issues.apache.org/jira/browse/YARN-3976 > Project: Hadoop YARN > Issue Type: Bug > Affects Versions: 2.7.1 > Reporter: Mit Desai > Assignee: Mit Desai > Priority: Trivial > > It's is better to catch the ApplicationNotFoundException rather than the parent YarnException and rethrow it when it's not ApplicationNotFoundExcepton > {noformat} > catch (YarnException e) { > if (!historyServiceEnabled) { > // Just throw it as usual if historyService is not enabled. > throw e; > } > // Even if history-service is enabled, treat all exceptions still the same > // except the following > if (!(e.getClass() == ApplicationNotFoundException.class)) { > throw e; > } > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)