Return-Path: X-Original-To: apmail-incubator-hama-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-hama-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 91BF57762 for ; Mon, 5 Dec 2011 10:34:16 +0000 (UTC) Received: (qmail 27989 invoked by uid 500); 5 Dec 2011 10:34:16 -0000 Delivered-To: apmail-incubator-hama-dev-archive@incubator.apache.org Received: (qmail 27794 invoked by uid 500); 5 Dec 2011 10:34:08 -0000 Mailing-List: contact hama-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hama-dev@incubator.apache.org Delivered-To: mailing list hama-dev@incubator.apache.org Received: (qmail 27762 invoked by uid 99); 5 Dec 2011 10:34:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Dec 2011 10:34:05 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Dec 2011 10:34:02 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 9244CC6A81 for ; Mon, 5 Dec 2011 10:33:41 +0000 (UTC) Date: Mon, 5 Dec 2011 10:33:41 +0000 (UTC) From: "Edward J. Yoon (Updated) (JIRA)" To: hama-dev@incubator.apache.org Message-ID: <1575970444.40710.1323081221600.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1894835117.6341.1320663831481.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (HAMA-469) The statusUpdate() method should be called finally. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HAMA-469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Edward J. Yoon updated HAMA-469: -------------------------------- Attachment: HAMA-469_v02.patch > The statusUpdate() method should be called finally. > --------------------------------------------------- > > Key: HAMA-469 > URL: https://issues.apache.org/jira/browse/HAMA-469 > Project: Hama > Issue Type: Bug > Components: bsp > Affects Versions: 0.3.0 > Reporter: Edward J. Yoon > Assignee: Edward J. Yoon > Priority: Minor > Labels: newbie > Fix For: 0.4.0 > > Attachments: HAMA-469_v01.patch, HAMA-469_v02.patch > > > {code} > public void sync() throws InterruptedException { > try { > enterBarrier(); > Iterator>> it = messenger > .getMessageIterator(); > while (it.hasNext()) { > Entry> entry = it.next(); > final InetSocketAddress addr = entry.getKey(); > final Iterable messages = entry.getValue(); > final BSPMessageBundle bundle = combineMessages(messages); > if (conf.getBoolean("bsp.checkpoint.enabled", false)) { > checkpoint(checkpointedPath(), bundle); > } > // remove this message during runtime to save a bit of memory > it.remove(); > messenger.transfer(addr, bundle); > } > leaveBarrier(); > currentTaskStatus.incrementSuperstepCount(); > umbilical.statusUpdate(taskId, currentTaskStatus); > // Clear outgoing queues. > messenger.clearOutgoingQueues(); > } catch (Exception e) { > LOG.fatal( > "Caught exception during superstep " > + currentTaskStatus.getSuperstepCount() + "!", e); > } > } > {code} > I think, the task status should be set to "Failed" when exception occurs in the sync() method. And the statusUpdate() method should be called finally. > So instead of logging a fatal exception, we should mutate the currentTaskStatus object and set the task status to FAILED. > We should update the umbilical via > bq. umbilical.statusUpdate(taskId, currentTaskStatus); > Now that the barrier is broken, we should make the task fail as well -> throw a RuntimeException. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira