@InterfaceAudience.Private public abstract class AnnotationReadingPriorityFunction<T extends HBaseRpcServicesBase<?>> extends Object implements PriorityFunction
Modifier and Type | Field and Description |
---|---|
protected Map<String,Integer> |
annotatedQos |
protected T |
rpcServices |
Constructor and Description |
---|
AnnotationReadingPriorityFunction(T rpcServices)
Constructs the priority function given the RPC server implementation and the annotations on the
methods.
|
Modifier and Type | Method and Description |
---|---|
protected int |
getAnnotatedPriority(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.RequestHeader header)
See if the method has an annotation.
|
protected abstract int |
getBasePriority(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.RequestHeader header,
org.apache.hbase.thirdparty.com.google.protobuf.Message param)
Get the priority for a given request from the header and the param.
|
int |
getPriority(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.RequestHeader header,
org.apache.hbase.thirdparty.com.google.protobuf.Message param,
User user)
Returns a 'priority' based on the request type.
|
protected abstract int |
normalizePriority(int priority) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDeadline
protected final Map<String,Integer> annotatedQos
protected final T extends HBaseRpcServicesBase<?> rpcServices
public AnnotationReadingPriorityFunction(T rpcServices)
rpcServices
- The RPC server implementationpublic int getPriority(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.RequestHeader header, org.apache.hbase.thirdparty.com.google.protobuf.Message param, User user)
SimpleRpcScheduler
as example. It maintains a queue per 'priority type':
getPriority
in interface PriorityFunction
protected int getAnnotatedPriority(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.RequestHeader header)
protected abstract int normalizePriority(int priority)
protected abstract int getBasePriority(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.RequestHeader header, org.apache.hbase.thirdparty.com.google.protobuf.Message param)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.