For now, BatchSession & InteractiveSession both extend Session and use SessionManager. This cause several issues:
1. Garbage Collection is not necessary for BatchSession.
2. BatchSession & InteractiveSession use their own SessionManager which means there would be a same session id for both BatchSession & InteractiveSession. e.g. In the following log there's 2 session with id 0 which is very confused.
16/06/14 15:10:39 INFO SessionManager: Registering new session 0
16/06/14 15:29:30 INFO InteractiveSession: Creating LivyClient for sessionId: 0
16/06/14 15:29:30 WARN RSCConf: Your hostname, jzhangMBPr.local, resolves to a loopback address, but we couldn't find any external IP address!
16/06/14 15:29:30 WARN RSCConf: Set livy.rsc.rpc.server.address if you need to bind to another address.
16/06/14 15:29:30 INFO SessionManager: Registering new session 0