use of org.apache.hadoop.hbase.ipc.PriorityFunction in project hbase by apache.
the class TestPriorityRpc method testQosFunctionWithoutKnownArgument.
@Test
public void testQosFunctionWithoutKnownArgument() throws IOException {
//The request is not using any of the
//known argument classes (it uses one random request class)
//(known argument classes are listed in
//HRegionServer.QosFunctionImpl.knownArgumentClasses)
RequestHeader.Builder headerBuilder = RequestHeader.newBuilder();
headerBuilder.setMethodName("foo");
RequestHeader header = headerBuilder.build();
PriorityFunction qosFunc = regionServer.rpcServices.getPriority();
assertEquals(HConstants.NORMAL_QOS, qosFunc.getPriority(header, null, User.createUserForTesting(regionServer.conf, "someuser", new String[] { "somegroup" })));
}
Aggregations