You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@curator.apache.org by Alvaro Gareppe <ag...@gmail.com> on 2015/12/04 17:23:29 UTC
Reconnection configuration
Its there a way to configure the reconnetion policy in curator ?
Meaning.. "what to do on connection lost ? "
Cause now there is a retry policy.. but the connection its always re
attempted.
--
Ing. Alvaro Gareppe
agareppe@gmail.com
Re: Reconnection configuration
Posted by Alvaro Gareppe <ag...@gmail.com>.
So.. If i just change the library dependency it should all work the same
way ? Excellent.. I'll try that
Thanks
On Fri, Dec 4, 2015 at 2:25 PM, Jordan Zimmerman <jordan@jordanzimmerman.com
> wrote:
> If you limit yourself to 3.4.x APIs it should work.
>
> ====================
> Jordan Zimmerman
>
> On Dec 4, 2015, at 12:18 PM, Alvaro Gareppe <ag...@gmail.com> wrote:
>
> Ohh.. but to use curator 3.. I need zookeeper 3.5 that is on alpha no ?
>
> On Fri, Dec 4, 2015 at 2:04 PM, Jordan Zimmerman <
> jordan@jordanzimmerman.com> wrote:
>
>> Prior to Curator 3.0.0, LOST meant that the retry policy had expired.
>> However in 3.0.0, LOST now means that the ZK session has expired. See here:
>> http://curator.apache.org/errors.html
>>
>> ====================
>> Jordan Zimmerman
>>
>> On Dec 4, 2015, at 11:59 AM, Alvaro Gareppe <ag...@gmail.com> wrote:
>>
>> I want to be able to say to curator retry to connect to zookeeper 4 times
>> even tough my operations have an unlimited retry policy.
>>
>> Why? because when I say RetryPolicy = retry forever and zookeeper dies
>>
>> I get (as expected) a connection event = SUSPENDED in the connection
>> listener, but after a while I dont get a LOST event that I expect even
>> tough the session is dead and the ephemeral nodes are gone... I'm using
>> that LOST state to know that my ephemeral nodes are gone cause if not I
>> want to kill the connection
>>
>> Maybe there is a way without a connection policy (asuming that dotn
>> exist)...
>>
>> So at the end my question is.. how to now when the connection its in a
>> state where you are reconnected but all your ephemeral nodes are gone?
>> cause I thought that LOST was that state.. but there are cases where I'm
>> not getting that
>>
>>
>>
>> On Fri, Dec 4, 2015 at 1:30 PM, Jordan Zimmerman <
>> jordan@jordanzimmerman.com> wrote:
>>
>>> What would that mean? I don't understand the difference.
>>>
>>> ====================
>>> Jordan Zimmerman
>>>
>>> On Dec 4, 2015, at 11:23 AM, Alvaro Gareppe <ag...@gmail.com> wrote:
>>>
>>> Its there a way to configure the reconnetion policy in curator ?
>>>
>>> Meaning.. "what to do on connection lost ? "
>>>
>>> Cause now there is a retry policy.. but the connection its always re
>>> attempted.
>>>
>>> --
>>> Ing. Alvaro Gareppe
>>> agareppe@gmail.com
>>>
>>>
>>
>>
>> --
>> Ing. Alvaro Gareppe
>> agareppe@gmail.com
>>
>>
>
>
> --
> Ing. Alvaro Gareppe
> agareppe@gmail.com
>
>
--
Ing. Alvaro Gareppe
agareppe@gmail.com
Re: Reconnection configuration
Posted by Jordan Zimmerman <jo...@jordanzimmerman.com>.
If you limit yourself to 3.4.x APIs it should work.
====================
Jordan Zimmerman
> On Dec 4, 2015, at 12:18 PM, Alvaro Gareppe <ag...@gmail.com> wrote:
>
> Ohh.. but to use curator 3.. I need zookeeper 3.5 that is on alpha no ?
>
>> On Fri, Dec 4, 2015 at 2:04 PM, Jordan Zimmerman <jo...@jordanzimmerman.com> wrote:
>> Prior to Curator 3.0.0, LOST meant that the retry policy had expired. However in 3.0.0, LOST now means that the ZK session has expired. See here: http://curator.apache.org/errors.html
>>
>> ====================
>> Jordan Zimmerman
>>
>>> On Dec 4, 2015, at 11:59 AM, Alvaro Gareppe <ag...@gmail.com> wrote:
>>>
>>> I want to be able to say to curator retry to connect to zookeeper 4 times even tough my operations have an unlimited retry policy.
>>>
>>> Why? because when I say RetryPolicy = retry forever and zookeeper dies
>>>
>>> I get (as expected) a connection event = SUSPENDED in the connection listener, but after a while I dont get a LOST event that I expect even tough the session is dead and the ephemeral nodes are gone... I'm using that LOST state to know that my ephemeral nodes are gone cause if not I want to kill the connection
>>>
>>> Maybe there is a way without a connection policy (asuming that dotn exist)...
>>>
>>> So at the end my question is.. how to now when the connection its in a state where you are reconnected but all your ephemeral nodes are gone? cause I thought that LOST was that state.. but there are cases where I'm not getting that
>>>
>>>
>>>
>>>> On Fri, Dec 4, 2015 at 1:30 PM, Jordan Zimmerman <jo...@jordanzimmerman.com> wrote:
>>>> What would that mean? I don't understand the difference.
>>>>
>>>> ====================
>>>> Jordan Zimmerman
>>>>
>>>>> On Dec 4, 2015, at 11:23 AM, Alvaro Gareppe <ag...@gmail.com> wrote:
>>>>>
>>>>> Its there a way to configure the reconnetion policy in curator ?
>>>>>
>>>>> Meaning.. "what to do on connection lost ? "
>>>>>
>>>>> Cause now there is a retry policy.. but the connection its always re attempted.
>>>>>
>>>>> --
>>>>> Ing. Alvaro Gareppe
>>>>> agareppe@gmail.com
>>>
>>>
>>>
>>> --
>>> Ing. Alvaro Gareppe
>>> agareppe@gmail.com
>
>
>
> --
> Ing. Alvaro Gareppe
> agareppe@gmail.com
Re: Reconnection configuration
Posted by Alvaro Gareppe <ag...@gmail.com>.
Ohh.. but to use curator 3.. I need zookeeper 3.5 that is on alpha no ?
On Fri, Dec 4, 2015 at 2:04 PM, Jordan Zimmerman <jordan@jordanzimmerman.com
> wrote:
> Prior to Curator 3.0.0, LOST meant that the retry policy had expired.
> However in 3.0.0, LOST now means that the ZK session has expired. See here:
> http://curator.apache.org/errors.html
>
> ====================
> Jordan Zimmerman
>
> On Dec 4, 2015, at 11:59 AM, Alvaro Gareppe <ag...@gmail.com> wrote:
>
> I want to be able to say to curator retry to connect to zookeeper 4 times
> even tough my operations have an unlimited retry policy.
>
> Why? because when I say RetryPolicy = retry forever and zookeeper dies
>
> I get (as expected) a connection event = SUSPENDED in the connection
> listener, but after a while I dont get a LOST event that I expect even
> tough the session is dead and the ephemeral nodes are gone... I'm using
> that LOST state to know that my ephemeral nodes are gone cause if not I
> want to kill the connection
>
> Maybe there is a way without a connection policy (asuming that dotn
> exist)...
>
> So at the end my question is.. how to now when the connection its in a
> state where you are reconnected but all your ephemeral nodes are gone?
> cause I thought that LOST was that state.. but there are cases where I'm
> not getting that
>
>
>
> On Fri, Dec 4, 2015 at 1:30 PM, Jordan Zimmerman <
> jordan@jordanzimmerman.com> wrote:
>
>> What would that mean? I don't understand the difference.
>>
>> ====================
>> Jordan Zimmerman
>>
>> On Dec 4, 2015, at 11:23 AM, Alvaro Gareppe <ag...@gmail.com> wrote:
>>
>> Its there a way to configure the reconnetion policy in curator ?
>>
>> Meaning.. "what to do on connection lost ? "
>>
>> Cause now there is a retry policy.. but the connection its always re
>> attempted.
>>
>> --
>> Ing. Alvaro Gareppe
>> agareppe@gmail.com
>>
>>
>
>
> --
> Ing. Alvaro Gareppe
> agareppe@gmail.com
>
>
--
Ing. Alvaro Gareppe
agareppe@gmail.com
Re: Reconnection configuration
Posted by Jordan Zimmerman <jo...@jordanzimmerman.com>.
Prior to Curator 3.0.0, LOST meant that the retry policy had expired. However in 3.0.0, LOST now means that the ZK session has expired. See here: http://curator.apache.org/errors.html
====================
Jordan Zimmerman
> On Dec 4, 2015, at 11:59 AM, Alvaro Gareppe <ag...@gmail.com> wrote:
>
> I want to be able to say to curator retry to connect to zookeeper 4 times even tough my operations have an unlimited retry policy.
>
> Why? because when I say RetryPolicy = retry forever and zookeeper dies
>
> I get (as expected) a connection event = SUSPENDED in the connection listener, but after a while I dont get a LOST event that I expect even tough the session is dead and the ephemeral nodes are gone... I'm using that LOST state to know that my ephemeral nodes are gone cause if not I want to kill the connection
>
> Maybe there is a way without a connection policy (asuming that dotn exist)...
>
> So at the end my question is.. how to now when the connection its in a state where you are reconnected but all your ephemeral nodes are gone? cause I thought that LOST was that state.. but there are cases where I'm not getting that
>
>
>
>> On Fri, Dec 4, 2015 at 1:30 PM, Jordan Zimmerman <jo...@jordanzimmerman.com> wrote:
>> What would that mean? I don't understand the difference.
>>
>> ====================
>> Jordan Zimmerman
>>
>>> On Dec 4, 2015, at 11:23 AM, Alvaro Gareppe <ag...@gmail.com> wrote:
>>>
>>> Its there a way to configure the reconnetion policy in curator ?
>>>
>>> Meaning.. "what to do on connection lost ? "
>>>
>>> Cause now there is a retry policy.. but the connection its always re attempted.
>>>
>>> --
>>> Ing. Alvaro Gareppe
>>> agareppe@gmail.com
>
>
>
> --
> Ing. Alvaro Gareppe
> agareppe@gmail.com
Re: Reconnection configuration
Posted by Alvaro Gareppe <ag...@gmail.com>.
I want to be able to say to curator retry to connect to zookeeper 4 times
even tough my operations have an unlimited retry policy.
Why? because when I say RetryPolicy = retry forever and zookeeper dies
I get (as expected) a connection event = SUSPENDED in the connection
listener, but after a while I dont get a LOST event that I expect even
tough the session is dead and the ephemeral nodes are gone... I'm using
that LOST state to know that my ephemeral nodes are gone cause if not I
want to kill the connection
Maybe there is a way without a connection policy (asuming that dotn
exist)...
So at the end my question is.. how to now when the connection its in a
state where you are reconnected but all your ephemeral nodes are gone?
cause I thought that LOST was that state.. but there are cases where I'm
not getting that
On Fri, Dec 4, 2015 at 1:30 PM, Jordan Zimmerman <jordan@jordanzimmerman.com
> wrote:
> What would that mean? I don't understand the difference.
>
> ====================
> Jordan Zimmerman
>
> On Dec 4, 2015, at 11:23 AM, Alvaro Gareppe <ag...@gmail.com> wrote:
>
> Its there a way to configure the reconnetion policy in curator ?
>
> Meaning.. "what to do on connection lost ? "
>
> Cause now there is a retry policy.. but the connection its always re
> attempted.
>
> --
> Ing. Alvaro Gareppe
> agareppe@gmail.com
>
>
--
Ing. Alvaro Gareppe
agareppe@gmail.com
Re: Reconnection configuration
Posted by Jordan Zimmerman <jo...@jordanzimmerman.com>.
What would that mean? I don't understand the difference.
====================
Jordan Zimmerman
> On Dec 4, 2015, at 11:23 AM, Alvaro Gareppe <ag...@gmail.com> wrote:
>
> Its there a way to configure the reconnetion policy in curator ?
>
> Meaning.. "what to do on connection lost ? "
>
> Cause now there is a retry policy.. but the connection its always re attempted.
>
> --
> Ing. Alvaro Gareppe
> agareppe@gmail.com