d-c-manning commented on code in PR #6998:
URL: https://github.com/apache/hbase/pull/6998#discussion_r2096953550
##########
hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterQosFunction.java:
##########
@@ -97,9 +100,34 @@ public void testRegionInTransition() throws IOException {
@Test
public void testAnnotations() {
- checkMethod(conf, "GetLastFlushedSequenceId", HConstants.ADMIN_QOS,
qosFunction);
- checkMethod(conf, "CompactRegion", HConstants.ADMIN_QOS, qosFunction);
- checkMethod(conf, "GetLastFlushedSequenceId", HConstants.ADMIN_QOS,
qosFunction);
checkMethod(conf, "GetRegionInfo", HConstants.ADMIN_QOS, qosFunction);
}
+
+ @Test
+ public void testRegionServerStatusProtos() {
+ RegionServerStatusProtos.RemoteProcedureResult splitWalProcedureResult =
+ RegionServerStatusProtos.RemoteProcedureResult.newBuilder()
+
.setStatus(RegionServerStatusProtos.RemoteProcedureResult.Status.SUCCESS).setProcId(100)
+ .build();
+
+ RegionServerStatusProtos.ReportProcedureDoneRequest
splitWalProcedureDoneReport =
+ RegionServerStatusProtos.ReportProcedureDoneRequest.newBuilder()
+ .addResult(splitWalProcedureResult).build();
+
+ RegionServerStatusProtos.GetLastFlushedSequenceIdRequest
lastFlushedSequenceIdRequest =
+ RegionServerStatusProtos.GetLastFlushedSequenceIdRequest.newBuilder()
+
.setRegionName(ByteString.copyFrom(RegionInfoBuilder.FIRST_META_REGIONINFO.getRegionName()))
+ .build();
+
+ RegionServerStatusProtos.RegionServerReportRequest
regionServerReportRequest =
+ RegionServerStatusProtos.RegionServerReportRequest.newBuilder()
+
.setServer(ProtobufUtil.toServerName(ServerName.valueOf("locahost:60020",
100))).build();
+
+ checkMethod(conf, "ReportProcedureDone", HConstants.HIGH_QOS, qosFunction,
+ splitWalProcedureDoneReport);
+ checkMethod(conf, "GetLastFlushedSequenceId", HConstants.HIGH_QOS,
qosFunction,
+ lastFlushedSequenceIdRequest);
+ checkMethod(conf, "RegionServerReport", HConstants.HIGH_QOS, qosFunction,
Review Comment:
I guess the point is previous line 101 has `checkMethod(conf,
"CompactRegion", HConstants.ADMIN_QOS, qosFunction);` and that check would
still be valid in `branch-2`, so you don't need to remove that line here.
Ultimately, I'm not sure how important it is, though, since the method is
removed in `master` branch as part of https://github.com/apache/hbase/pull/3612
(https://github.com/apache/hbase/commit/d26bcaaa915901970c4ddd56a9f1e601fedb29c4
and https://issues.apache.org/jira/browse/HBASE-25288)... and it's probably
unnecessarily `ADMIN_QOS` here in `branch-2`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]