[ 
https://issues.apache.org/jira/browse/HBASE-9101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13763582#comment-13763582
 ] 

stack commented on HBASE-9101:
------------------------------

bq. The reason is that the RpcScheduler constructor needs QosFunction (which is 
member of HRegionServer). I see this is not clean, but don't know if I can add 
it to the interface RegionServerServices. Any ideas?

The QosFunction is awful and has to die an ugly death.

We can do something basic -- as suggested by our [~eclark] -- where the client 
says what the priority is in rpc header; then the priority would be in your ipc 
context -- coming in from the client -- and you wouldn't have to ask the HRS 
what it is.

So, try to avoid somersaults so you can get QosFunction.  A simple getPriority 
in RSS would be ok implemented however folks want to (default would be call 
QoSFunction on the implementing RegionServer?  Would that work?

Thanks for doing this:

"+  // Please do not add a constants here, unless they are referenced by a lot 
of classes."

Why should scheduler or scheduler implemenation be reachable from packages 
other than ipc?  Can we shut down this public?

-interface RpcScheduler {
+public interface RpcScheduler {

Should scheduler instantiation be done by the RpcServer, and not by the 
HRegionServer?  That would allow encapsulation of scheduler inside ipc package 
and no leakage outside?

This could be inside rpc then SimpleRpcSchedulerFactory?

Else patch looks good.
                
> Addendum to pluggable RpcScheduler
> ----------------------------------
>
>                 Key: HBASE-9101
>                 URL: https://issues.apache.org/jira/browse/HBASE-9101
>             Project: HBase
>          Issue Type: Improvement
>          Components: IPC/RPC
>            Reporter: Chao Shi
>            Assignee: Chao Shi
>             Fix For: 0.98.0
>
>         Attachments: hbase-9101.patch, hbase-9101-v2.patch, 
> hbase-9101-v3.patch
>
>
> This patch fixes the review comments from [~stack] and a small fix:
> - Make RpcScheduler fully pluggable. One can write his/her own implementation 
> and add it to classpath and specify it by config 
> "hbase.region.server.rpc.scheduler.factory.class".
> - Add unit tests and fix that RpcScheduler.stop is not called (discovered by 
> tests)

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

Reply via email to