Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 1E630200BBD for ; Mon, 24 Oct 2016 09:30:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1D1C8160AE1; Mon, 24 Oct 2016 07:30:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 638A2160AEB for ; Mon, 24 Oct 2016 09:29:59 +0200 (CEST) Received: (qmail 97305 invoked by uid 500); 24 Oct 2016 07:29:58 -0000 Mailing-List: contact issues-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@spark.apache.org Received: (qmail 97245 invoked by uid 99); 24 Oct 2016 07:29:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Oct 2016 07:29:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 784532C001E for ; Mon, 24 Oct 2016 07:29:58 +0000 (UTC) Date: Mon, 24 Oct 2016 07:29:58 +0000 (UTC) From: "David Shar (JIRA)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SPARK-18027) .sparkStaging not clean on RM ApplicationNotFoundException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 24 Oct 2016 07:30:00 -0000 [ https://issues.apache.org/jira/browse/SPARK-18027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15601231#comment-15601231 ] David Shar commented on SPARK-18027: ------------------------------------ Yes, I believe it is safer, we cannot be sure what Yarn is doing on connection failure. > .sparkStaging not clean on RM ApplicationNotFoundException > ---------------------------------------------------------- > > Key: SPARK-18027 > URL: https://issues.apache.org/jira/browse/SPARK-18027 > Project: Spark > Issue Type: Bug > Components: YARN > Affects Versions: 1.6.0 > Reporter: David Shar > Priority: Minor > > Hi, > It seems that SPARK-7705 didn't fix all issues with .sparkStaging folder cleanup. > in Client.scala:monitorApplication > {code} > val report: ApplicationReport = > try { > getApplicationReport(appId) > } catch { > case e: ApplicationNotFoundException => > logError(s"Application $appId not found.") > return (YarnApplicationState.KILLED, FinalApplicationStatus.KILLED) > case NonFatal(e) => > logError(s"Failed to contact YARN for application $appId.", e) > return (YarnApplicationState.FAILED, FinalApplicationStatus.FAILED) > } > .... > if (state == YarnApplicationState.FINISHED || > state == YarnApplicationState.FAILED || > state == YarnApplicationState.KILLED) { > cleanupStagingDir(appId) > return (state, report.getFinalApplicationStatus) > } > {code} > In case of ApplicationNotFoundException, we don't cleanup the sparkStaging folder. > I believe we should call cleanupStagingDir(appId) on the catch clause above. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org For additional commands, e-mail: issues-help@spark.apache.org