fengnanli opened a new pull request #2047:
URL: https://github.com/apache/hadoop/pull/2047


   Summary:
   This patch is targeting improving router's performance
   for delegation tokens related operations.
   It achieves the goal by removing watchers from router on
   tokens since based on our experience. The huge number of
   watches inside Zookeeper is degrading Zookeeper's performance
   pretty hard. The current limit is about 1.2-1.5 million.
   
   Specific changes:
   1. Explicitly disable the watcher to tokens by not using
      PathChildrenCache or any curator provided cache at all.
   2. Schedule a sync task between router and Zookeeper at
      a configurable interval to make routers sync with their
      token information through Zookeeper.
   3. For token's change, always make sure to change local cache
      first instead of depending on callbacks of the watch event
      when using PathChildrenCache.
   The above three points are trying to make router token cache
   behaves as close as possible to the case when the PathChildrenCache
   is used. The below point handles one corner case.
   4. Before token remover(a background thread) removes token from
      Zookeeper, one router will first make sure this token hasn't
      been renewed by other peers. This happens only when somehow the
      sync failed for this token that router local cache doesn't have
      the corret renewal date (expiry date)
   
   Test Plan:
   1. Add several unit tests covering all common use cases.
   2. Deployed on two machines and performing all tests.
   3. Pressure testing: create production scale number of tokens (100k)
      and monitor the sync latency.
   
   ## NOTICE
   
   Please create an issue in ASF JIRA before opening a pull request,
   and you need to set the title of the pull request which starts with
   the corresponding JIRA issue number. (e.g. HADOOP-XXXXX. Fix a typo in YYY.)
   For more details, please see 
https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to