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

Jimmy Xiang commented on HBASE-8368:
------------------------------------

This is an interesting idea.  It should help in some cases. However, it may 
not, for assignment events, since they get their own thread pool.  We should 
consider the thread context switch overhead as well.

We can have a thread pool to process events concurrently, and make sure the 
events generated on the same znode are always processed in order. However, some 
application may not work with this.
                
> Improve ZK notification handling in Master
> ------------------------------------------
>
>                 Key: HBASE-8368
>                 URL: https://issues.apache.org/jira/browse/HBASE-8368
>             Project: HBase
>          Issue Type: Improvement
>          Components: master
>    Affects Versions: 0.95.0
>            Reporter: Jeffrey Zhong
>            Assignee: Jeffrey Zhong
>             Fix For: 0.98.0
>
>
> In ZooKeeperWatcher, we handle ZK notifications in a single queue(except AM) 
> and each listener is handling notifications synchronously. 
> This cause potential performance issue if Master is handling an event which 
> may jam the queue so that ZooKeeperWatcher won't get new notifications in 
> time. For example, we have several region un-assigned notifications in 
> pipeline and logsplitting or SSH handling etc handling will be delayed.
> I'm proposing:
> During registerListeners, we can let a user to choose which queue current 
> listener want to register. For example, 
> registerListener(QueueName, ZNodePathPrefix, listener);
> Such as:
> registerListener("unsigned_regions", "/hbase/unassigned", AMlistener);
> registerListener("logSplitting", "/hbase/splitlog", 
> LogSplittingManagerlistener);
> ...
> For each queue, we use a single thread(consumer) to process events in order.
> The ZNodePathPrefix is to pre-filter out notifications that current listener 
> is only interested in. 
> For listeners without specifying a queue name, the listener will be put on a 
> new "default" queue.
> Please let me know if you have better ideas!
> Thanks.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to