@InterfaceAudience.Private public class AnnotationReadingPriorityFunction extends Object implements PriorityFunction
Modifier and Type | Field and Description |
---|---|
protected Map<String,Integer> |
annotatedQos |
static String |
SCAN_VTIME_WEIGHT_CONF_KEY
Used to control the scan delay, currently sqrt(numNextCall * weight)
|
Constructor and Description |
---|
AnnotationReadingPriorityFunction(RSRpcServices rpcServices)
Calls
AnnotationReadingPriorityFunction(RSRpcServices, Class) using the result of
rpcServices#getClass() |
AnnotationReadingPriorityFunction(RSRpcServices rpcServices,
Class<? extends RSRpcServices> clz)
Constructs the priority function given the RPC server implementation and the annotations on the
methods in the provided
clz . |
Modifier and Type | Method and Description |
---|---|
protected int |
getAnnotatedPriority(org.apache.hadoop.hbase.protobuf.generated.RPCProtos.RequestHeader header)
See if the method has an annotation.
|
protected int |
getBasePriority(org.apache.hadoop.hbase.protobuf.generated.RPCProtos.RequestHeader header,
com.google.protobuf.Message param)
Get the priority for a given request from the header and the param
This doesn't consider which user is sending the request at all.
|
long |
getDeadline(org.apache.hadoop.hbase.protobuf.generated.RPCProtos.RequestHeader header,
com.google.protobuf.Message param)
Based on the request content, returns the deadline of the request.
|
int |
getPriority(org.apache.hadoop.hbase.protobuf.generated.RPCProtos.RequestHeader header,
com.google.protobuf.Message param,
User user)
Returns a 'priority' based on the request type.
|
public static final String SCAN_VTIME_WEIGHT_CONF_KEY
public AnnotationReadingPriorityFunction(RSRpcServices rpcServices)
AnnotationReadingPriorityFunction(RSRpcServices, Class)
using the result of
rpcServices#getClass()
rpcServices
- The RPC server implementationpublic AnnotationReadingPriorityFunction(RSRpcServices rpcServices, Class<? extends RSRpcServices> clz)
clz
.rpcServices
- The RPC server implementationclz
- The concrete RPC server implementation's classpublic int getPriority(org.apache.hadoop.hbase.protobuf.generated.RPCProtos.RequestHeader header, com.google.protobuf.Message param, User user)
getPriority
in interface PriorityFunction
protected int getAnnotatedPriority(org.apache.hadoop.hbase.protobuf.generated.RPCProtos.RequestHeader header)
header
- protected int getBasePriority(org.apache.hadoop.hbase.protobuf.generated.RPCProtos.RequestHeader header, com.google.protobuf.Message param)
public long getDeadline(org.apache.hadoop.hbase.protobuf.generated.RPCProtos.RequestHeader header, com.google.protobuf.Message param)
getDeadline
in interface PriorityFunction
header
- param
- Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.