Re: i want look zookeeper each command param details web page??where is the document ? thank you very much!

2019-10-11 Thread Zili Chen
Hi, You can check out this file[1]. Interestingly it seems this page doesn't shown in the document site. Investigating... Best, tison. [1] https://github.com/apache/zookeeper/blob/master/zookeeper-docs/src/main/resources/markdown/zookeeperCLI.md 一直以来 <279377...@qq.com> 于2019年10月11日周五

Re: use 3.5.5 version ,,run command : create -t 15000 /1 value return err

2019-10-11 Thread Zili Chen
gt; > > > still return error! > > > ------原始邮件-- > 发件人:"Zili Chen" 发送时间:2019年10月11日(星期五) 中午1:43 > 收件人:"user" > 主题:Re: use 3.5.5 version ,,run command : create -t 15000 /1 value > return err > > > > so you need

Re: use 3.5.5 version ,,run command : create -t 15000 /1 value return err

2019-10-10 Thread Zili Chen
so you need to start the server with java system property zookeeper.extendedTypesEnabled set to true. Best, tison. Zili Chen 于2019年10月11日周五 下午1:35写道: > From the document it says > > # create the ttl node. > # set zookeeper.extendedTypesEnabled=true > # Otherwise:

Re: use 3.5.5 version ,,run command : create -t 15000 /1 value return err

2019-10-10 Thread Zili Chen
Do you connect to a server running in version 3.4.x? Best, tison. 一直以来 <279377...@qq.com> 于2019年10月11日周五 下午12:46写道: > [zk: 127.0.0.1:2181(CONNECTED) 0] ls / > [zookeeper] > [zk: 127.0.0.1:2181(CONNECTED) 1] create -t 15000 /1 value > KeeperErrorCode = Unimplemented for /1 > [zk:

Re: Leader election and leader operation based on zookeeper

2019-09-29 Thread Zili Chen
, but the one cached when it becomes leader. Best, tison. Zili Chen 于2019年9月22日周日 上午2:43写道: > >the Curator recipes delete and recreate their paths > > However, as mentioned above, we do a one-shot election(doesn't reuse the > curator recipe) so that > we check the latch path is always the

Re: how session expire works in zookeeper codebase?

2019-09-25 Thread Zili Chen
t may either find out session expiration from responses of their > requests, or through reconnection. > > > On Tue, Sep 24, 2019 at 11:04 AM Zili Chen wrote: > > > Enrico, > > > > Well I think I understand how it works now and why you said it is a weird > > edg

Re: how session expire works in zookeeper codebase?

2019-09-24 Thread Zili Chen
son. Zili Chen 于2019年9月24日周二 下午8:20写道: > Enrico, > > Thanks for your reply. > > Still I cannot understand how session expire detected on client side. The > only codepath > KeeperState.Expired generated is ClientCnxn#onConnected. It seems only > called on > client successfull

Re: how session expire works in zookeeper codebase?

2019-09-24 Thread Zili Chen
cluster is down the session > cannot expire. > > Hope that helps > Enrico > > Il mar 24 set 2019, 13:54 Zili Chen ha scritto: > > > Hi ZooKeepers, > > > > I want to trace where Watcher.Event.KeeperState.Expired generated and it > > seems only generated &g

how session expire works in zookeeper codebase?

2019-09-24 Thread Zili Chen
Hi ZooKeepers, I want to trace where Watcher.Event.KeeperState.Expired generated and it seems only generated when connect to server fails due to exceed session timeout. Besides, I find code snippet in ClientCnxn as below void queueEvent(String clientPath, int err, Set materializedWatchers,

Re: Ephemeral znode deleted infers session expired?

2019-09-23 Thread Zili Chen
node. > > On Thu, Sep 19, 2019 at 7:39 AM Zili Chen wrote: > > > Of course it is ensured that no other operations delete this leader latch > > znode. > > > > Best, > > tison. > > > > > > Zili Chen 于2019年9月19日周四 下午10:37写道: > > > &g

Re: Leader election and leader operation based on zookeeper

2019-09-21 Thread Zili Chen
d be error prone (it's one reason that they aren't public - > it's volatile internal state). > > -Jordan > > On Sep 21, 2019, at 1:26 PM, Zili Chen wrote: > > Hi Jordan, > > >I think using the leader path may not work > > could you share a situation where this strategy

Re: Leader election and leader operation based on zookeeper

2019-09-21 Thread Zili Chen
elected, > at least if you use the sync option. > > > > > > On Fri, Sep 20, 2019 at 1:31 AM Zili Chen wrote: > >> Hi ZooKeepers, >> >> Recently there is an ongoing refactor[1] in Flink community aimed at >> overcoming several inconsistent state iss

Re: Leader election and leader operation based on zookeeper

2019-09-20 Thread Zili Chen
eeper handle directly to get the session ID: > > CuratorFramework curator = ... > curator.getZookeeperClient().getZooKeeper() > > -JZ > > On Sep 20, 2019, at 10:21 PM, Zili Chen wrote: > > >>I am assuming the "write operation" here is write to ZooKeeper >

Re: Leader election and leader operation based on zookeeper

2019-09-20 Thread Zili Chen
the previous supposed to be fail operation succeeds? > > If my reasoning make sense, one idea might be on Flink side, once you > finish leader election with ZK, record the session ID and don't commit any > write operations if session ID changes. > > The fencing token + multi m

Leader election and leader operation based on zookeeper

2019-09-20 Thread Zili Chen
Hi ZooKeepers, Recently there is an ongoing refactor[1] in Flink community aimed at overcoming several inconsistent state issues on ZK we have met. I come here to share our design of leader election and leader operation. For leader operation, it is operation that should be committed only if the

Re: Ephemeral znode deleted infers session expired?

2019-09-19 Thread Zili Chen
Of course it is ensured that no other operations delete this leader latch znode. Best, tison. Zili Chen 于2019年9月19日周四 下午10:37写道: > Hi ZooKeepers, > > I'd like to know whether an ephemeral znode deleted infers its > corresponding session expired. > > The original situat

Ephemeral znode deleted infers session expired?

2019-09-19 Thread Zili Chen
Hi ZooKeepers, I'd like to know whether an ephemeral znode deleted infers its corresponding session expired. The original situation is that when I create a leader latch as ephemeral sequential znode. When the znode got deleted others possibly become new leader so that I'd like to forbid any

Re: Migrate from 3.4.x to 3.5.5

2019-09-16 Thread Zili Chen
rom an external source. Please exercise caution prior to opening > attachments, clicking on links, or providing any sensitive information.} Hi > Zili, "If so, it seems upgrade client side force user to upgrade server > side also.”Yes, if client is upgraded _and_ user wants to use a new feature > in 3.5, then server side has to be upgraded too. ;) Andor > > > On 2019. Sep 3., at 13:20, Zili Chen wrote:If > > so, it seems upgrade client side force user to upgrade server side > > also. > > >

Re: [RFR] ZOOKEEPER-3290: Throw detailed KeeperException when multi-op failed

2019-09-11 Thread Zili Chen
Zili Chen 于2019年8月25日周日 上午4:19写道: > Hi ZooKeepers, > > ZOOKEEPER-3290 has been revived and here is its pull request[1]. > > Basically it extends field of ErrorTxn/ErrorResponse/ErrorResult to > reflect accurate path info when a transaction failed. For example, > assum

Re: Migrate from 3.4.x to 3.5.5

2019-09-04 Thread Zili Chen
de server side > also.” > > Yes, if client is upgraded _and_ user wants to use a new feature in 3.5, > then server side has to be upgraded too. ;) > > Andor > > > > > On 2019. Sep 3., at 13:20, Zili Chen wrote: > > > > If so, it seems upgrade client side force user to upgrade server side > > also. > >

Re: Migrate from 3.4.x to 3.5.5

2019-09-03 Thread Zili Chen
Well, we cannot make any reasonable fallback from a previous version, but isn't it regraded as a break changes? Best, tison. Zili Chen 于2019年9月3日周二 下午7:20写道: > Hi here, > > If I communicate quorums running zk 3.4 with a zk 3.5 client, when I am > trying to create node in CO

Re: Migrate from 3.4.x to 3.5.5

2019-09-03 Thread Zili Chen
, we doesn't have a fallback when zk server version is 3.4 to PERSISTENT or something like that, but just fail with an exception. Is it expected? If so, it seems upgrade client side force user to upgrade server side also. Best, tison. Zili Chen 于2019年8月26日周一 下午8:47写道: > Thanks for your insi

[Question] How watches work?

2019-08-28 Thread Zili Chen
Hi zookeepers, Notice that we both hold watches manager in client side and server side, it really confuses me why we also trigger watches on server side. In my understanding, watchers registered on client and when client process WatchEvent, it triggers those watchers. Any advice on how watches

Re: Migrate from 3.4.x to 3.5.5

2019-08-26 Thread Zili Chen
’ve created a wiki page to collect upgrade experiences from users which > could give you some hint if you’re facing problems: > https://cwiki.apache.org/confluence/display/ZOOKEEPER/Upgrade+FAQ > > You can always drop an email here too to get help. > > Andor > > > >

Re: Migrate from 3.4.x to 3.5.5

2019-08-26 Thread Zili Chen
Detailedly, in Flink community we try to bump ZooKeeper version from 3.4.10 to 3.5.5 but without accurate idea about how it would break existing systems. Mainly we make use of the "client" of ZooKeeper. Zili Chen 于2019年8月26日周一 下午8:02写道: > Hi, > > Is there any migration gu

Migrate from 3.4.x to 3.5.5

2019-08-26 Thread Zili Chen
Hi, Is there any migration guide for potentially breaking changes and how to deal with them? Best, tison.

[RFR] ZOOKEEPER-3290: Throw detailed KeeperException when multi-op failed

2019-08-24 Thread Zili Chen
Hi ZooKeepers, ZOOKEEPER-3290 has been revived and here is its pull request[1]. Basically it extends field of ErrorTxn/ErrorResponse/ErrorResult to reflect accurate path info when a transaction failed. For example, assumed we do check1(path1)-create1(path2) and fail with NoNodeException,

Re: create or setData in transaction?

2019-08-16 Thread Zili Chen
K operations (create lock, create, maybe > set, delete lock) and requires two znodes. If you use a fair lock > implementation, you are have better completion guarantees. > > Does this do what you want? > > > > > > > On Wed, Aug 14, 2019 at 11:04 PM Zili Chen wrote: > > &

Re: create or setData in transaction?

2019-08-15 Thread Zili Chen
rrelevant (or could be said to be trivially > satisfied since there are no concurrent queries. > > > On Wed, Aug 14, 2019 at 6:45 PM Zili Chen wrote: > > > Thanks for your reply Ted. > > > > I cannot understand the statement "That leaves isolated which is k

Re: create or setData in transaction?

2019-08-14 Thread Zili Chen
Thanks for your reply Ted. I cannot understand the statement "That leaves isolated which is kind of hard to talk about with ZK since all operations are fast and sequential." well. Could you explain a bit? What is "that" means and where is the "hard" comes from? Best, tison. Ted Dunning

Re: create or setData in transaction?

2019-08-14 Thread Zili Chen
ttps://zookeeper.apache.org/doc/r3.5.5/zookeeperTutorial.html > > > > If that’s not enough, you could also try Curator which has even more > > built-in high level functionalities on top of basic ZK commands. > > > > Andor > > > > > > > &g

Re: create or setData in transaction?

2019-08-14 Thread Zili Chen
, tison. [1] https://www.mail-archive.com/user@curator.apache.org/msg01238.html Jordan Zimmerman 于2019年8月15日周四 上午8:23写道: > FYI - that "wart" had a workaround. You can't use the same workaround? > > -Jordan > > > On Aug 14, 2019, at 5:19 PM, Zili Chen wrote: > >

Re: create or setData in transaction?

2019-08-14 Thread Zili Chen
che.org/doc/r3.5.5/recipes.html > > https://zookeeper.apache.org/doc/r3.5.5/zookeeperTutorial.html > > > > If that’s not enough, you could also try Curator which has even more > > built-in high level functionalities on top of basic ZK commands. > > > > Andor > >

Re: create or setData in transaction?

2019-08-14 Thread Zili Chen
FYI, etcd provides a transaction mechanism which supports if-else like commits.[1] Best, tison. [1] https://godoc.org/github.com/coreos/etcd/clientv3#OpTxn Zili Chen 于2019年8月14日周三 下午11:52写道: > Hi Andor, > > Thanks for your attention. > > The problem is that in concurrent scen

Re: create or setData in transaction?

2019-08-14 Thread Zili Chen
o transaction in > ZK)? > > In Java you can do: > > try { > zk.create(); > } catch (NodeExistsException e) { > // swallow exception > } > zk.setData(); > … > > Regards, > Andor > > > > > > On 2019. Aug 6., at 14:44, Zili Chen wrote: > &

Re: create or setData in transaction?

2019-08-06 Thread Zili Chen
eption will be thrown. Best, tison. Enrico Olivelli 于2019年8月6日周二 下午8:27写道: > Il mar 6 ago 2019, 13:47 Zili Chen ha scritto: > > > Any ideas? > > > > > > Zili Chen 于2019年7月29日周一 上午11:12写道: > > > > > Hi ZooKeepers, > > > > > > Currently our

Re: create or setData in transaction?

2019-08-06 Thread Zili Chen
Any ideas? Zili Chen 于2019年7月29日周一 上午11:12写道: > Hi ZooKeepers, > > Currently our transaction mechanism supports doing > create/setData/checkExist/delete in transaction. However, taking this > scenario into consideration, we want to put data in path "/path" but >

create or setData in transaction?

2019-07-28 Thread Zili Chen
Hi ZooKeepers, Currently our transaction mechanism supports doing create/setData/checkExist/delete in transaction. However, taking this scenario into consideration, we want to put data in path "/path" but don't know whether the znode exists or not. Let's say we program as below if

Re: [ANNOUNCE] Apache ZooKeeper 3.5.5

2019-05-20 Thread Zili Chen
Congratulations! rammohan ganapavarapu 于2019年5月21日周二 上午7:25写道: > Congratulations, finally it's out  > > On Mon, May 20, 2019, 11:59 AM Enrico Olivelli > wrote: > > > Congratulations! > > > > Enrico > > > > Il lun 20 mag 2019, 19:28 Lars Francke ha > > scritto: > > > > > Congratulations on

Re: Deprecated CSVInputArchive and XMLInputArchive

2019-05-13 Thread Zili Chen
bably don't have test coverage for them either, so keeping them in > > the codebase could be questionable. > > > > Regards, > > Andor > > > > > > > > > > On Sat, Apr 13, 2019 at 7:00 PM Zili Chen wrote: > > > > > Hi, > > > &g

Deprecated CSVInputArchive and XMLInputArchive

2019-04-12 Thread Zili Chen
Hi, I'm not sure whether user list is a proper place but seems dev list is filled of notifications. During an investigation of the possibility that ZooKeeper support multi serialization frameworks, I found that in jute, CSVInputArchive and XMLInputArchive are never in use. I wonder the story of