zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "maoling (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (ZOOKEEPER-3281) Add a new CLI:watch
Date Sat, 16 Mar 2019 09:35:00 GMT

     [ https://issues.apache.org/jira/browse/ZOOKEEPER-3281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

maoling updated ZOOKEEPER-3281:
-------------------------------
    Description: 
Terminal1:t1;
 Terminal2:t2;

PART1:
 --------------[-d] test for data change------------------------
 [t1]:
 watch -d /testwatch
 [t2]:
 set /testwatch mydata
 [t1]: result:
 WatchedEvent state:SyncConnected
 type:NodeDataChanged
 path:/testwatch
 new data:mydata
 ----------------------------------------------------------------
 [t1]:
 watch -d /testwatch
 [t2]:
 delete /testwatch
 [t1] result:
 WatchedEvent state:SyncConnected
 type:NodeDeleted
 path:/testwatch

PART2:
 --------------[-c] test for child change------------------------
 [t1]:
 watch -c /testwatch
 [t2]
 create /testwatch/child_1 mydata
 [t1] reslut:
 WatchedEvent state:SyncConnected
 type:NodeChildrenChanged
 path:/testwatch
 new child list:[child_1]
 ----------------------------------------------------------------
 [t1]:
 watch -c /testwatch
 [t2]:
 delete /testwatch/child_1
 [t1]:
 WatchedEvent state:SyncConnected
 type:NodeChildrenChanged
 path:/testwatch
 new child list:[]

PART3:
 ----------------[-e]test for exist watch----------------------
 [t2]:
 delete /testwatch
 [t1]:
 watch -e /testwatch
 [t2]:
 create /testwatch mydata
 [t1] result:
 WatchedEvent state:SyncConnected
 type:NodeCreated
 path:/testwatch
 ----------------------------------------------------------------
 [t1]:
 watch -e /testwatch
 [t2]:
 delete /testwatch
 WatchedEvent state:SyncConnected
 type:NodeDeleted
 path:/testwatch
 ----------------------------------------------------------------
 [t1]:
 watch -e /testwatch
 [t2]:
 set /testwatch mydata666666666
 [t1]:
 WatchedEvent state:SyncConnected
 type:NodeDataChanged
 path:/testwatch

----------------------------------------------------------------
a test for watching a non-existent key
[t1]: 
watch -d /non-existent_key
Node does not exist: /non-existent_key
watch -c /non-existent_key
Node does not exist: /non-existent_key
watch -e /non-existent_key
[t2]:
create /non-existent_key mydata
[t1]:
WatchedEvent state:SyncConnected
type:NodeCreated
path:/non-existent_key
----------------------------------------------------------------
the test for other watchedEvent state: e.g. Disconnected
[t1]:
watch -c /testwatch
#kill the zk server
WatchedEvent state:Disconnected
type:None
path:null

  was:
Terminal1:t1;
Terminal2:t2;

PART1:
--------------[-d] test for data change------------------------
[t1]:
 watch -d /testwatch
[t2]:
 set /testwatch mydata
[t1]: result:
 WatchedEvent state:SyncConnected
 type:NodeDataChanged
 path:/testwatch
 new data:mydata
----------------------------------------------------------------
[t1]:
 watch -d /testwatch
[t2]:
 delete /testwatch
[t1] result:
 WatchedEvent state:SyncConnected
 type:NodeDeleted
 path:/testwatch

PART2:
--------------[-c] test for child change------------------------
[t1]:
 watch -c /testwatch
[t2]
 create /testwatch/child_1 mydata
[t1] reslut:
 WatchedEvent state:SyncConnected
 type:NodeChildrenChanged
 path:/testwatch
 new child list:[child_1]
----------------------------------------------------------------
[t1]:
 watch -c /testwatch
[t2]:
 delete /testwatch/child_1
[t1]:
 WatchedEvent state:SyncConnected
 type:NodeChildrenChanged
 path:/testwatch
 new child list:[]

PART3:
----------------[-e]test for exist watch----------------------
[t2]:
 delete /testwatch
[t1]:
 watch -e /testwatch
[t2]:
 create /testwatch mydata
[t1] result:
 WatchedEvent state:SyncConnected
 type:NodeCreated
 path:/testwatch
----------------------------------------------------------------
[t1]:
 watch -e /testwatch
[t2]:
 delete /testwatch
 WatchedEvent state:SyncConnected
 type:NodeDeleted
 path:/testwatch
----------------------------------------------------------------
[t1]:
 watch -e /testwatch
[t2]:
 set /testwatch mydata666666666
[t1]:
 WatchedEvent state:SyncConnected
 type:NodeDataChanged
 path:/testwatch


> Add a new CLI:watch
> -------------------
>
>                 Key: ZOOKEEPER-3281
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3281
>             Project: ZooKeeper
>          Issue Type: New Feature
>          Components: scripts
>    Affects Versions: 3.6.0
>            Reporter: maoling
>            Assignee: maoling
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Terminal1:t1;
>  Terminal2:t2;
> PART1:
>  --------------[-d] test for data change------------------------
>  [t1]:
>  watch -d /testwatch
>  [t2]:
>  set /testwatch mydata
>  [t1]: result:
>  WatchedEvent state:SyncConnected
>  type:NodeDataChanged
>  path:/testwatch
>  new data:mydata
>  ----------------------------------------------------------------
>  [t1]:
>  watch -d /testwatch
>  [t2]:
>  delete /testwatch
>  [t1] result:
>  WatchedEvent state:SyncConnected
>  type:NodeDeleted
>  path:/testwatch
> PART2:
>  --------------[-c] test for child change------------------------
>  [t1]:
>  watch -c /testwatch
>  [t2]
>  create /testwatch/child_1 mydata
>  [t1] reslut:
>  WatchedEvent state:SyncConnected
>  type:NodeChildrenChanged
>  path:/testwatch
>  new child list:[child_1]
>  ----------------------------------------------------------------
>  [t1]:
>  watch -c /testwatch
>  [t2]:
>  delete /testwatch/child_1
>  [t1]:
>  WatchedEvent state:SyncConnected
>  type:NodeChildrenChanged
>  path:/testwatch
>  new child list:[]
> PART3:
>  ----------------[-e]test for exist watch----------------------
>  [t2]:
>  delete /testwatch
>  [t1]:
>  watch -e /testwatch
>  [t2]:
>  create /testwatch mydata
>  [t1] result:
>  WatchedEvent state:SyncConnected
>  type:NodeCreated
>  path:/testwatch
>  ----------------------------------------------------------------
>  [t1]:
>  watch -e /testwatch
>  [t2]:
>  delete /testwatch
>  WatchedEvent state:SyncConnected
>  type:NodeDeleted
>  path:/testwatch
>  ----------------------------------------------------------------
>  [t1]:
>  watch -e /testwatch
>  [t2]:
>  set /testwatch mydata666666666
>  [t1]:
>  WatchedEvent state:SyncConnected
>  type:NodeDataChanged
>  path:/testwatch
> ----------------------------------------------------------------
> a test for watching a non-existent key
> [t1]: 
> watch -d /non-existent_key
> Node does not exist: /non-existent_key
> watch -c /non-existent_key
> Node does not exist: /non-existent_key
> watch -e /non-existent_key
> [t2]:
> create /non-existent_key mydata
> [t1]:
> WatchedEvent state:SyncConnected
> type:NodeCreated
> path:/non-existent_key
> ----------------------------------------------------------------
> the test for other watchedEvent state: e.g. Disconnected
> [t1]:
> watch -c /testwatch
> #kill the zk server
> WatchedEvent state:Disconnected
> type:None
> path:null



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message