helix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandre Porcelli <porce...@redhat.com>
Subject Re: Some newbie questions
Date Thu, 02 May 2013 23:27:19 GMT
I found a workaround for it that is basically setup a controller alongside each participant,
and use controllers to send/receive messages.

Cheers,
---
Alexandre Porcelli
porcelli@redhat.com



On May 2, 2013, at 6:29 PM, kishore g <g.kishore@gmail.com> wrote:

> Thanks Alexandre, that is helpful.
> 
> 
> 
> 
> On Thu, May 2, 2013 at 2:01 PM, Alexandre Porcelli <porcelli@redhat.com> wrote:
> Hi Guys,
> 
>  Me again... I've prepared a self contained case of what I'm trying to do...
> 
> https://github.com/porcelli/incubator-helix/blob/master/recipes/distributed-lock-manager/src/main/java/org/apache/helix/lockmanager/LockManagerDemo.java#L80
> 
>  Here is how I define the criteria and message: https://github.com/porcelli/incubator-helix/blob/master/recipes/distributed-lock-manager/src/main/java/org/apache/helix/lockmanager/LockProcess.java#L80
> 
>  And here the Message handler: https://github.com/porcelli/incubator-helix/blob/master/recipes/distributed-lock-manager/src/main/java/org/apache/helix/lockmanager/LockProcess.java#L151
> 
>  Hope this can help you help me ;)
> 
> Cheers,
> ---
> Alexandre Porcelli
> porcelli@redhat.com
> 
> 
> On May 2, 2013, at 3:54 PM, Alexandre Porcelli <porcelli@redhat.com> wrote:
> 
>> Hi Shi and Kishore,
>> 
>>  I'm using 0.6.0-incubating, and I've tried to set the DataSource, but it didn't
work (again: probably i'm doing something wrong). Just for curiosity I've tried on 0.6.1-incubating-SNAPSHOT
and got the same.
>>  
>> What really happens is the Message seems to be sent (no error, no timeout...) but
the participants doesn't get any message.
>> 
>>  Again, thank you all for your support.
>> 
>> Cheers,
>> ---
>> Alexandre Porcelli
>> porcelli@redhat.com
>> 
>> 
>> 
>> On May 2, 2013, at 3:26 PM, Shi Lu <lushi04@gmail.com> wrote:
>> 
>>> Hi Alexandre:
>>> 
>>> For the messaging part, in the messaging sending criteria, it can specify the
data source from which the message recipient are selected, it can be EXTERNALVIEW or IDEALSTATE..
By default the data source is ExternalView. In case an instance is disabled, it will not show
up in external view and no messages will be sent. If in the recipient criteria the data source
is set to IDEALSTATE the message should go through, like
>>> 
>>> recipientCriteria.setDataSource(DataSource.IDEALSTATES);
>>> 
>>> Cheers,
>>> -Shi
>>> 
>>> 
>>> On Thu, May 2, 2013 at 10:35 AM, Alexandre Porcelli <porcelli@redhat.com>
wrote:
>>> Hi Kishore,
>>> 
>>>  Thank or your quick answer, Vinayak sugestion partly worked for me... I said
`partly` because the messaging still not working as expected (note: probably I'm doing something
wrong here!). Here are some snippets of my own code: http://pastebin.com/SGfVJrUD
>>> 
>>>  Regarding contribution... today we're in a rush to release, but after it...
I plan start to work on Infinispan backend ;)
>>> 
>>> Cheers,
>>> ---
>>> Alexandre Porcelli
>>> porcelli@redhat.com
>>> 
>>> 
>>> On May 2, 2013, at 1:18 PM, kishore g <g.kishore@gmail.com> wrote:
>>> 
>>>> Hi Alexandre,
>>>> 
>>>> Glad you like Helix. 
>>>> 
>>>> 1. See if vinayaks suggestion works for you. I have couple of questions what
is the execution mode, you can get this from the idealstate MODE property. If its AUTO you
can change the preference list.
>>>> But I am surprised that after disabling the instance user defined messages
cannot happen. That was not intended in the design, so it might be a bug. Can you give more
information on how you are trying to send the message and what is the criteria set to compute
the recipients.
>>>> 
>>>> 2. Yes, Helix architecture is not tied to zookeeper. We are mainly using
it for storing the cluster state. We had another simple file based manager earlier but we
removed it in favor of running zookeeper locally in dev mode. It would be great to have this
contribution. There are quite a few use cases that can benefit from a non zk implementation.

>>>> 
>>>> thanks,
>>>> Kishore G
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> On Thu, May 2, 2013 at 9:06 AM, Vinayak Borkar <vinayakb@gmail.com>
wrote:
>>>> 
>>>>   1. I'm using a LeaderStandby in order to build a single global lock on
my cluster, it works as expected.. but in order to release the lock I have to put the current
leader in standby... I could achieve this by disabling the current instance. It works, but
doing this I loose (at least seems to be) the ability to send/receive user defined messages.
I'd like to know if it's possible to, via an api call, force a transition from Leader to Standby
without disable an instance.
>>>> 
>>>> I am a newbie to Helix too and I had a similar question a few days ago. Have
you looked into disabling the resource by using the disablePartition() call in HelixAdmin
using a partition number of 0? This should disable just the resource without impacting the
instance.
>>>> 
>>>> Vinayak
>>>> 
>>>> 
>>>> 
>>>>   2. I've been taking a quick look on Helix codebase, more specific on ZooKeeper
usage. Seems that you're using ZooKeeper as a default implementation, but Helix architecture
is not tied to it, right? I'm asking this, because I'm interested to implement (in a near
future) a different backend (Infinispan).
>>>> 
>>>> That's it for now...  thanks in advance.
>>>> 
>>>> Cheers,
>>>> ---
>>>> Alexandre Porcelli
>>>> porcelli@redhat.com
>>>> 
>>>> 
>>>> 
>>> 
>>> 
>> 
> 
> 


Mime
View raw message