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 3330310AE3 for ; Fri, 10 Jan 2014 11:49:11 +0000 (UTC) Received: (qmail 17832 invoked by uid 500); 10 Jan 2014 11:49:05 -0000 Delivered-To: apmail-hama-dev-archive@hama.apache.org Received: (qmail 17633 invoked by uid 500); 10 Jan 2014 11:48:54 -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 17598 invoked by uid 99); 10 Jan 2014 11:48:51 -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 11:48:51 +0000 Date: Fri, 10 Jan 2014 11:48:50 +0000 (UTC) From: "Edward J. Yoon (JIRA)" To: dev@hama.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HAMA-839) Support NullWritable in Hama Pipes 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-839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13867745#comment-13867745 ] Edward J. Yoon commented on HAMA-839: ------------------------------------- +1 > Support NullWritable in Hama Pipes > ---------------------------------- > > Key: HAMA-839 > URL: https://issues.apache.org/jira/browse/HAMA-839 > Project: Hama > Issue Type: Improvement > Components: bsp core, pipes > Affects Versions: 0.6.3 > Reporter: Martin Illecker > Assignee: Martin Illecker > Priority: Minor > Labels: pipes > Fix For: 0.7.0 > > Attachments: HAMA-839_1.patch, HAMA-839_2.patch > > > h3. Support NullWritable in Hama Pipes > It should be possible to read, write and send NullWritables in Hama Pipes. > Therefore the *void* type is supported in C++ templates. > e.g., PiEstimator (InputKeyClass, InputValueClass and OutputKeyClass are NullWritables) > {code} > -class PiEstimatorBSP: public BSP { > +class PiEstimatorBSP: public BSP { > ... > - void cleanup(BSPContext& context) { > + void cleanup(BSPContext& context) { > ... > double pi = 4.0 * total_hits / (msg_count * iterations_); > - context.write("Estimated value of PI", pi); > + context.write(pi); > } > } > {code} > This is affecting the following C++ methods: > * Input > |{code}bool readNext(K1& key, V1& value){code}| method is available at compile time if {{BSP<*K1!=void*, *V1!=void*, ?, ?, ?>}}| > |{code}bool readNext(K1& key){code}| method is available at compile time if {{BSP<*K1!=void*, *V1==void*, ?, ?, ?>}}| > |{code}bool readNext(V1& value){code}| method is available at compile time if {{BSP<*K1==void*, *V1!=void*, ?, ?, ?>}}| > | | method will *not* be available at compile time if {{BSP<*K1==void*, *V1==void*, ?, ?, ?>}}| > * Output > |{code}void write(const K2& key, const V2& value){code}| method is available at compile time if {{BSP}}| > |{code}void write(const K2& key){code}| method is available at compile time if {{BSP}}| > |{code}void write(const V2& value){code}| method is available at compile time if {{BSP}}| > | | method will *not* be available at compile time if {{BSP}}| > * Message > |{code}void sendMessage(const string& peerName, const M& msg){code}| method will *not* be available at compile time if {{BSP}}| > |{code}M getCurrentMessage(){code}| method will *not* be available at compile time if {{BSP}}| > Hama Pipes supports NullWritables in *SequenceFileInputFormat* and *SequenceFileOutputFormat*. > The same is valid for the *SequenceFile* methods: > * SequenceFile.Reader > |{code}bool sequenceFileReadNext(int fileID, K& key, V& value){code}| method is available at compile time if {{<*K!=void*, *V!=void*>}}| > |{code}bool sequenceFileReadNext(int fileID, K& key){code}| method is available at compile time if {{<*K!=void*>}}| > |{code}bool sequenceFileReadNext(int fileID, V& value){code}| method is available at compile time if {{<*V!=void*>}}| > * SequenceFile.Writer > |{code}bool sequenceFileAppend(int fileID, const K& key, const V& value){code}| method is available at compile time if {{<*K!=void*, *V!=void*>}}| > |{code}bool sequenceFileAppend(int fileID, K& key){code}| method is available at compile time if {{<*K!=void*>}}| > |{code}bool sequenceFileAppend(int fileID, V& value){code}| method is available at compile time if {{<*V!=void*>}}| -- This message was sent by Atlassian JIRA (v6.1.5#6160)