curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kashtan <djkash...@gmail.com>
Subject Re: NodeExistsException with Shared Value recipe in Curator
Date Mon, 31 Aug 2015 19:43:18 GMT
I am running with the debugger in eclipse and I see the try/catch block,
but it does not stop zookeeper from printing in the logs that there was a
NodeExistsException. I believe that the NodeExistsException is being
printed by the Zookeeper Server? I have all my logs routed to one file.

The message looks like this:
2015-08-31 15:27:46,740 [myid:] - INFO [ProcessThread(sid:0
cport:-1)::PrepRequestProcessor@645] - Got user-level KeeperException when
processing sessionid:0x14f84fd269c0003 type:create cxid:0xa4 zxid:0x62d
txntype:-1 reqpath:n/a Error
Path:/results/response-5932e7bc-2fe6-4745-8e36-6ed49d6f31a3
Error:KeeperErrorCode = NodeExists for
/results/response-5932e7bc-2fe6-4745-8e36-6ed49d6f31a3

I had the same issue earlier with two different parts of my code and I
could not solve this issue with try/catch blocks. I had to do a
checkExists() before creating a new node.

BTW I am using Curator 2.8.0

On Mon, Aug 31, 2015 at 3:08 PM, Jordan Zimmerman <
jordan@jordanzimmerman.com> wrote:

> Can you write a test that shows this? It doesn’t seem possible given your
> description. Have a look at SharedValue.start(). Note that it catches
> NodeExistsException.
>
> -JZ
>
>
>
> On August 31, 2015 at 12:06:30 PM, Daniel Kashtan (djkashtan@gmail.com)
> wrote:
>
> I inherited some Curator code that creates a Shared Value recipe in two
> different parts of my code, using the same path. Once the second Shared
> Value has .start() called, the NodeExistsException from the Zookeeper
> server is created in the logs.
>
> I am not sure how to handle this issue. Can I retrieve the Shared Value
> instance from Curator instead of trying to create a second new instance of
> the Shared Value on the same path?
>
> --
> -Daniel
>
>


-- 
-Daniel

Mime
View raw message