You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@livy.apache.org by GitBox <gi...@apache.org> on 2020/01/30 08:16:28 UTC

[GitHub] [incubator-livy] runzhiwang opened a new pull request #274: [LIVY-721][SERVER] Distributed session id generation

runzhiwang opened a new pull request #274: [LIVY-721][SERVER] Distributed session id generation
URL: https://github.com/apache/incubator-livy/pull/274
 
 
   ## What changes were proposed in this pull request?
   
   1. When generate unique session id with multiple-active HA mode. First, get the distributed lock,
   Second, get the session id from filesystem or zookeeper. Third, increase the session id and save it in the filesystem or zookeeper. Forth, release the distributed lock.
   
   2. ZooKeeperManager provides the distributed lock to generate the distributed session id.
   
   3. `LocalSessionIdGenerator` used when only one livy work. and `DistributedSessionIdGenerator` used when serveral livy work at the same time, such as in multi-active HA mode. Maybe the name `Local `of  `LocalSessionIdGenerator` is confused, because it also use hdfs or zookeeper. But I do not have a better name, maybe rename `LocalSessionIdGenerator` to `StandaloneSessionIdGenerator`  ?
     
   ## How was this patch tested?
   
   Existed UT and IT.
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services