[
https://issues.apache.org/jira/browse/HBASE-9049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13723112#comment-13723112
]
Jesse Yates commented on HBASE-9049:
------------------------------------
bq. This a bug fix?
Just a formatting fix - left over from my previous cut. I'll drop it.
bq. On your factory, why not lazy instantiation or just create instance on
construction rather than have this 'instantiate' method?
instantiate is just a light wrapper around the reflection needed to from the
configuration - the instance is created on construction, but I need the
reflection bit so I can plug my own factory in :)
I didn't want to go lazy as the double-checked locking all over the place
seemed like too much overhead for a think that you will probably use frequently.
bq. 'newCaller' is awkward as method name? 'get'?
Wanted that to keep in-line with the standard java syntax of new RpcCaller()- I
stole the naming pattern from the protobuf factory stuff. Happy to swap it to
just get(), but I think is a little bit more explicit and keeps a bit of
flexibility for doing things like creating a synchronized RpcCaller and an
unsynchronized RpcCaller from separate methods. So it would be an interface
like:
{code}
public class RpcRetryingCallerFactory{
public <T> RpcRetryingCaller<T> newCaller();
public <T> RpcRetryingCaller<T> newSynchronizedCaller();
}
{code}
versus
{code}
public class RpcRetryingCallerFactory{
public <T> RpcRetryingCaller<T> get();
public <T> RpcRetryingCaller<T> getSynchonized();
}
{code}
It really depends if we want to start reusing RpcCallers or continue creating a
new one each time; right now the "new" syntax seems more accurate.
> Generalize ServerCallable creation to support custom callables
> --------------------------------------------------------------
>
> Key: HBASE-9049
> URL: https://issues.apache.org/jira/browse/HBASE-9049
> Project: HBase
> Issue Type: Bug
> Affects Versions: 0.98.0, 0.95.2, 0.94.11
> Reporter: Jesse Yates
> Assignee: Jesse Yates
> Attachments: hbase-9049-trunk-v0.patch, hbase-9049-trunk-v1.patch
>
>
> Currently, sever callables are instantiated via direct calls. Instead, we can
> use a single factory and that allows more specialized callable
> implementations, for instance, using a circuit-breaker pattern (or the
> Hystrix implementation!) to minimize attempts to contact the server.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira