Return-Path: X-Original-To: apmail-hama-dev-archive@www.apache.org Delivered-To: apmail-hama-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4CAAF1041B for ; Fri, 10 Jan 2014 06:28:02 +0000 (UTC) Received: (qmail 97731 invoked by uid 500); 10 Jan 2014 06:27:16 -0000 Delivered-To: apmail-hama-dev-archive@hama.apache.org Received: (qmail 97685 invoked by uid 500); 10 Jan 2014 06:27:11 -0000 Mailing-List: contact dev-help@hama.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hama.apache.org Delivered-To: mailing list dev@hama.apache.org Received: (qmail 97527 invoked by uid 99); 10 Jan 2014 06:26:58 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Jan 2014 06:26:58 +0000 Date: Fri, 10 Jan 2014 06:26:58 +0000 (UTC) From: "Edward J. Yoon (JIRA)" To: dev@hama.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HAMA-842) Add persistent queue option to JobConf 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/HAMA-842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13867552#comment-13867552 ] Edward J. Yoon commented on HAMA-842: ------------------------------------- To reduce the number of additions, we have to check the size of localQueue and localQueueForNextIteration queues, and then switching intelligently. > Add persistent queue option to JobConf > -------------------------------------- > > Key: HAMA-842 > URL: https://issues.apache.org/jira/browse/HAMA-842 > Project: Hama > Issue Type: New Feature > Affects Versions: 0.6.3 > Reporter: Edward J. Yoon > Assignee: Edward J. Yoon > Fix For: 0.7.0 > > > By default, incoming (local) queue will be reset in every superstep. It means that unconsumed messages will be lost. If this is persistent queue, unconsumed messages will be persisted in incoming queue. > {code} > public final void clearOutgoingQueues() { > if (localQueue != null) { > localQueue.close(); > } > localQueue = localQueueForNextIteration.getMessageQueue(); > localQueue.prepareRead(); > localQueueForNextIteration = getSynchronizedReceiverQueue(); > notifyInit(); > } > {code} > Simply we can add unconsumed messages to localQueueForNextIteration before switching local queue. -- This message was sent by Atlassian JIRA (v6.1.5#6160)