hama-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "realstolz.gmail" <realst...@gmail.com>
Subject Re: Concurrently send and receive message
Date Mon, 14 Jan 2013 01:53:03 GMT
peer.send() is not thread safe

On Jan 7, 2013, at 6:39 PM, Edward J. Yoon <edwardyoon@apache.org> wrote:

> Oh,
> 
> Sure no problem. ;)
> 
> On Mon, Jan 7, 2013 at 6:59 PM, realstolz.gmail <realstolz@gmail.com> wrote:
>> hi, Edward
>> 
>> Thank for your reply~
>> 
>> Sorry for my confusing expression.
>> My real question is
>> 1. Is it safe to concurrently send messages by multiple threads using the same peer
in one superstep (before calling sync())
>> 2. Is it safe to concurrently receive messages by multiple threads using the same
peer in one superstep (after calling sync())
>> 
>> not the interleave between send and receive operation, they are independent questions.
>> 
>> //In fact, I want use multithread in one peer process, but I'm not sure whether the
current message manager is concurrently sate
>> 
>> 
>> thanks,
>> -Rong
>> 
>> On Jan 7, 2013, at 5:45 PM, "Edward J. Yoon" <edwardyoon@apache.org> wrote:
>> 
>>> Nope, BSP tasks are synchronized by exchanging messages at barrier
>>> synchronization step. It means that you should call sync() method
>>> between send and getCurrentMessage().
>>> 
>>>> (BTW: I think the default setting for distributed version of message manager
is HadoopMessageManagerImpl. Is it right?)
>>> 
>>> Yes.
>>> 
>>> On Mon, Jan 7, 2013 at 6:01 PM, realstolz.gmail <realstolz@gmail.com> wrote:
>>>> I would like to know whether the message manager used by hama (distributed
version)
>>>> supports concurrently send and receive messages?
>>>> Is it safe to concurrently call peer.send() and peer.getCurrentMessage()
by multiple threads
>>>> in distributed version?
>>>> 
>>>> (BTW: I think the default setting for distributed version of message manager
is HadoopMessageManagerImpl. Is it right?)
>>>> 
>>>> thanks,
>>>> -Rong
>>>> 
>>> 
>>> 
>>> 
>>> --
>>> Best Regards, Edward J. Yoon
>>> @eddieyoon
>> 
> 
> 
> 
> -- 
> Best Regards, Edward J. Yoon
> @eddieyoon


Mime
View raw message