runzhiwang opened a new pull request #240: [LIVY-541] Generate the unqiue 
session id when multiple livy servers work at the same time
URL: https://github.com/apache/incubator-livy/pull/240
 
 
   ## What changes were proposed in this pull request?
   
   [LIVY-541] Generate the unqiue session id when multiple livy servers work at 
the same time
   
   1. When generate unique session id with multiple livy servers working. 
First, get the distributed lock,
     Second, get the session id from the filesystem or zookeeper. Third, 
increase the sessionid and save it in  the filesystem or zookeeper. Forth, 
release the distributed lock.
   
   2.  ZooKeeperManager provides the distributed lock to generate the unique 
session id.
   
   3. If set recovery.mode = off, i.e. generate session id in 
BlackholeStateStore,  and set multi-active.enabled = true, store the session id 
in zookeeper.
   If set recovery.mode = off, and set multi-active.enabled = false, store the 
session id in memory, i.e. stateMap
   
   
   ## How was this patch tested?
   
   1. Start multiple livy server and set multi-active.enabled = true.
   2. Set zookeeper.url or state-store.url to save session id.
   3. Create session in different livy servers at the same time.
   4. Check the session id without duplicating. 
   

----------------------------------------------------------------
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


With regards,
Apache Git Services

Reply via email to