You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hama.apache.org by 步青云 <ma...@qq.com> on 2016/04/17 10:46:21 UTC

How do Hama count the Total Message Received?

Hello, 
      Every one. I got a problem.
      When I run a hama job with different task num, the total message received is different. For example, when I set the tasks num as 10, the total message received is 2338859. While for the same input, If I set the tasks num as 20,  the total message received is 3035567. I'm sure my input settings is right.
     So I want to know, How do hama count the total message received? Because I'm doing experiment, I need to know the total message.
     Anyone could help me? Thanks a lot.

RE: How do Hama count the Total Message Received?

Posted by "Edward J. Yoon" <ed...@samsung.com>.
Hi,

TOTAL_MESSAGES_RECEIVED is sum of received messages count of each task. In
case of GraphJob, there're some additional messages that relate to
broadcasting and aggregation processing internally.

So, if you want to count exact the number of messages in your program, you
can write your own custom counter like below:

public void compute(Iterable<IntWritable> messages) throws IOException {

this.getCounter(CUSTOM_COUNTER.RECIVED_MESSAGE_COUNTER).increment(messages.s
ize());
  ...
}

Please see also, http://hama.apache.org/hama_bsp_tutorial.html

--
Best Regards, Edward J. Yoon

-----Original Message-----
From: 꼍행暾 [mailto:mailliuping@qq.com]
Sent: Sunday, April 17, 2016 5:46 PM
To: user
Subject: How do Hama count the Total Message Received?

Hello,
      Every one. I got a problem.
      When I run a hama job with different task num, the total message
received is different. For example, when I set the tasks num as 10, the
total message received is 2338859. While for the same input, If I set the
tasks num as 20,  the total message received is 3035567. I'm sure my input
settings is right.
     So I want to know, How do hama count the total message received?
Because I'm doing experiment, I need to know the total message.
     Anyone could help me? Thanks a lot.