Re: Sharing sqlContext between Akka router and "routee" actors ...

2014-12-21 Thread Cheng Lian
SQLContext is thread safe, so this should be generally safe, otherwise it should be a bug. However, please note that if you're using HiveContext (which is usually recommended), all the routee actors share a single Hive session. This means if one routee execute "use db1", then the current databa

Re: Sharing sqlContext between Akka router and "routee" actors ...

2014-12-18 Thread Soumya Simanta
why do you need a router? I mean cannot you do with just one actor which has the SQLContext inside it? On Thu, Dec 18, 2014 at 9:45 PM, Manoj Samel wrote: > Hi, > > Akka router creates a sqlContext and creates a bunch of "routees" actors > with sqlContext as parameter. The actors then execute q

Sharing sqlContext between Akka router and "routee" actors ...

2014-12-18 Thread Manoj Samel
Hi, Akka router creates a sqlContext and creates a bunch of "routees" actors with sqlContext as parameter. The actors then execute query on that sqlContext. Would this pattern be a issue ? Any other way sparkContext etc. should be shared cleanly in Akka routers/routees ? Thanks,