You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@accumulo.apache.org by z11373 <z1...@outlook.com> on 2016/03/02 00:09:34 UTC

Re: cached connector

Hi Keith/Josh,
Are createScanner, createMultiTableBatchWriter, and
connector.securityOperations().getUserAuthorizations expensive operations?
Apparently, I also cache them (called during initialization of my object
that being cached), and now I am not sure if not caching the connector (and
those additional calls) is good idea. One possible option I can think of is
using cache that expires after a period of time. With that, I may be able to
achieve better performance, and avoid this busted connector issue. What do
you guys think?

Thanks,
Z



--
View this message in context: http://apache-accumulo.1065345.n5.nabble.com/cached-connector-tp16202p16282.html
Sent from the Developers mailing list archive at Nabble.com.

Re: cached connector

Posted by z11373 <z1...@outlook.com>.
Sorry to bring up this old thread.
I decided to cache my object, because apparently it took additional 2s for
initializing Accumulo stuff (besides connection to 2 datacenters, it creates
writer/scanner for few tables). I do have different but somewhat related
question here.

My service is running on Jetty, and there are several instances running in
the cluster. Still, when there are many requests coming, 1 Jetty service
instance will need to handle many requests, and since I cache the object,
all of them will share the same Accumulo connector and writers (they don't
share scanners, because I read somewhere it said that's not recommended).

Will this approach of sharing Accumulo connector cause bottleneck, hence
lower the throughput?


Thanks,
Z



--
View this message in context: http://apache-accumulo.1065345.n5.nabble.com/cached-connector-tp16202p17254.html
Sent from the Developers mailing list archive at Nabble.com.

Re: cached connector

Posted by z11373 <z1...@outlook.com>.
Thanks Josh! I'll give a try, and see how it performs.



--
View this message in context: http://apache-accumulo.1065345.n5.nabble.com/cached-connector-tp16202p16284.html
Sent from the Developers mailing list archive at Nabble.com.

Re: cached connector

Posted by Josh Elser <jo...@gmail.com>.
None of the create* methods should be too bad. They aren't going to do 
much until you use them (e.g. Scanner, BatchScanner, BatchWriter).

getUserAuthorizations is going to be an Accumulo RPC and a (cached) 
ZooKeeper lookup in the server. This won't be bad unless you're calling 
it in a really tight loop. This would be something fairly easy to cache 
(and occasionally refresh).

z11373 wrote:
> Hi Keith/Josh,
> Are createScanner, createMultiTableBatchWriter, and
> connector.securityOperations().getUserAuthorizations expensive operations?
> Apparently, I also cache them (called during initialization of my object
> that being cached), and now I am not sure if not caching the connector (and
> those additional calls) is good idea. One possible option I can think of is
> using cache that expires after a period of time. With that, I may be able to
> achieve better performance, and avoid this busted connector issue. What do
> you guys think?
>
> Thanks,
> Z
>
>
>
> --
> View this message in context: http://apache-accumulo.1065345.n5.nabble.com/cached-connector-tp16202p16282.html
> Sent from the Developers mailing list archive at Nabble.com.