[ 
https://issues.apache.org/jira/browse/HBASE-11341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14032408#comment-14032408
 ] 

Jerry He commented on HBASE-11341:
----------------------------------

Hi, Matteo
My understanding is that a ZookeeperWatcher has to explicitly 'set watch' on a 
'path' or 'node' to  receive events of particular types related to that 'path' 
or 'node'
For example, in ZKProcedureCoordinatorRpcs.sendGlobalBarrierAcquire()
{code}
    // create the acquire barrier
    String acquire = zkProc.getAcquiredBarrierNode(procName);
    LOG.debug("Creating acquire znode:" + acquire);
    try {
      // notify all the procedure listeners to look for the acquire node
      byte[] data = ProtobufUtil.prependPBMagic(info);
      ZKUtil.createWithParents(zkProc.getWatcher(), acquire, data);
      // loop through all the children of the acquire phase and watch for them
      for (String node : nodeNames) {
        String znode = ZKUtil.joinZNode(acquire, node);
        LOG.debug("Watching for acquire node:" + znode);
        if (ZKUtil.watchAndCheckExists(zkProc.getWatcher(), znode)) {
          coordinator.memberAcquiredBarrier(procName, node);
        }
 {code}
or
{code}
ZKUtil.watchAndCheckExists(zkProc.getWatcher(), abortNode)
{code}

> ZKProcedureCoordinatorRpcs should respond only to members
> ---------------------------------------------------------
>
>                 Key: HBASE-11341
>                 URL: https://issues.apache.org/jira/browse/HBASE-11341
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.99.0, 0.94.20, 0.98.3
>            Reporter: Matteo Bertozzi
>            Assignee: Matteo Bertozzi
>            Priority: Minor
>             Fix For: 0.99.0, 0.94.21, 0.98.4
>
>         Attachments: HBASE-11341-v0.patch
>
>
> ZKProcedureCoordinatorRpcs nodeCreated() responds to events of every znode 
> under the procedure and not only members.
> {code}
> INFO: Received created event: /hbase/<proc>/reached/<instance>
> INFO: Received created event: /hbase/<proc>/reached/<instance>/<member>
> {code}
> the result is a warning (no other side effects)
> {code}
> WARN [main-EventThread] procedure.ProcedureCoordinator: Member '<instance>' 
> is trying to release an unknown procedure 'reached
> {code}
> [~apurtell] posted in HBASE-10926 the steps to reproduce it:
> {noformat}
> $ cd ./src/hbase
> $ git checkout master
> $ mvn -DskipTests clean install
> {noformat}
> In one console:
> {noformat}
> $ ./bin/hbase master start
> {noformat}
> In another console:
> {noformat}
> $ ./bin/hbase org.apache.hadoop.hbase.util.LoadTestTool -num_keys 100000 \
>     -read 10:100 -write 1:100:10
> {noformat}
> In a third console:
> {noformat}
> $ ./bin/hbase shell
> hbase> while true do ; flush 'cluster_test' ; sleep 10 ; end
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to