[
https://issues.apache.org/jira/browse/HAMA-839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13868477#comment-13868477
]
Hudson commented on HAMA-839:
-----------------------------
SUCCESS: Integrated in Hama-Nightly-for-Hadoop-2.x #144 (See
[https://builds.apache.org/job/Hama-Nightly-for-Hadoop-2.x/144/])
HAMA-839: Support NullWritable in Hama Pipes (millecker: rev 1557100)
* /hama/trunk/CHANGES.txt
* /hama/trunk/c++/src/main/native/examples/conf/matrixmultiplication.xml
* /hama/trunk/c++/src/main/native/examples/conf/piestimator.xml
* /hama/trunk/c++/src/main/native/examples/conf/summation.xml
* /hama/trunk/c++/src/main/native/examples/impl/matrixmultiplication.cc
* /hama/trunk/c++/src/main/native/examples/impl/piestimator.cc
* /hama/trunk/c++/src/main/native/examples/impl/summation.cc
* /hama/trunk/c++/src/main/native/pipes/api/hama/Pipes.hh
* /hama/trunk/c++/src/main/native/pipes/impl/Pipes.cc
* /hama/trunk/core/src/main/java/org/apache/hama/pipes/PipesApplication.java
* /hama/trunk/core/src/main/java/org/apache/hama/pipes/PipesBSP.java
* /hama/trunk/core/src/main/java/org/apache/hama/pipes/Submitter.java
*
/hama/trunk/core/src/main/java/org/apache/hama/pipes/protocol/BinaryProtocol.java
*
/hama/trunk/core/src/main/java/org/apache/hama/pipes/protocol/DownwardProtocol.java
*
/hama/trunk/core/src/main/java/org/apache/hama/pipes/protocol/StreamingProtocol.java
*
/hama/trunk/core/src/main/java/org/apache/hama/pipes/protocol/UplinkReader.java
*
/hama/trunk/core/src/main/java/org/apache/hama/pipes/util/SequenceFileDumper.java
* /hama/trunk/core/src/test/java/org/apache/hama/pipes/TestPipes.java
> 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<string,string,string,double,int> {
> +class PiEstimatorBSP: public BSP<void,void,void,double,int> {
> ...
> - void cleanup(BSPContext<string,string,string,double,int>& context) {
> + void cleanup(BSPContext<void,void,void,double,int>& 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<?, ?, *K2!=void*, *V2!=void*, ?>}}|
> |{code}void write(const K2& key){code}| method is available at compile time
> if {{BSP<?, ?, *K2!=void*, *V2==void*, ?>}}|
> |{code}void write(const V2& value){code}| method is available at compile time
> if {{BSP<?, ?, *K2==void*, *V2!=void*, ?>}}|
> | | method will *not* be available at compile time if {{BSP<?, ?, *K2==void*,
> *V2==void*, ?>}}|
> * Message
> |{code}void sendMessage(const string& peerName, const M& msg){code}| method
> will *not* be available at compile time if {{BSP<?, ?, ?, ?, *M==void*>}}|
> |{code}M getCurrentMessage(){code}| method will *not* be available at compile
> time if {{BSP<?, ?, ?, ?, *M==void*>}}|
> Hama Pipes supports NullWritables in *SequenceFileInputFormat* and
> *SequenceFileOutputFormat*.
> The same is valid for the *SequenceFile* methods:
> * SequenceFile.Reader
> |{code}bool sequenceFileReadNext<K, V>(int fileID, K& key, V& value){code}|
> method is available at compile time if {{<*K!=void*, *V!=void*>}}|
> |{code}bool sequenceFileReadNext<K>(int fileID, K& key){code}| method is
> available at compile time if {{<*K!=void*>}}|
> |{code}bool sequenceFileReadNext<V>(int fileID, V& value){code}| method is
> available at compile time if {{<*V!=void*>}}|
> * SequenceFile.Writer
> |{code}bool sequenceFileAppend<K, V>(int fileID, const K& key, const V&
> value){code}| method is available at compile time if {{<*K!=void*,
> *V!=void*>}}|
> |{code}bool sequenceFileAppend<K>(int fileID, K& key){code}| method is
> available at compile time if {{<*K!=void*>}}|
> |{code}bool sequenceFileAppend<V>(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)