saintstack commented on a change in pull request #3425:
URL: https://github.com/apache/hbase/pull/3425#discussion_r660744043
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/compactionserver/CSRpcServices.java
##########
@@ -19,11 +19,15 @@
Review comment:
It depends on hbase-server now? Given it is in it?
But yeah, could be done at a later stage.
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/compactionserver/CSRpcServices.java
##########
@@ -88,8 +93,18 @@ void start() {
public CompactResponse requestCompaction(RpcController controller,
CompactionProtos.CompactRequest request) {
requestCount.increment();
+ ServerName rsServerName = ProtobufUtil.toServerName(request.getServer());
+ RegionInfo regionInfo = ProtobufUtil.toRegionInfo(request.getRegionInfo());
+ ColumnFamilyDescriptor cfd =
ProtobufUtil.toColumnFamilyDescriptor(request.getFamily());
+ boolean major = request.getMajor();
+ int priority = request.getPriority();
+ List<HBaseProtos.ServerName> favoredNodes =
Collections.singletonList(request.getServer());
LOG.info("Receive compaction request from {}",
ProtobufUtil.toString(request));
- compactionServer.compactionThreadManager.requestCompaction();
+ CompactionTask compactionTask =
+
CompactionTask.newBuilder().setRsServerName(rsServerName).setRegionInfo(regionInfo)
+
.setColumnFamilyDescriptor(cfd).setRequestMajor(major).setPriority(priority)
+
.setFavoredNodes(favoredNodes).setSubmitTime(System.currentTimeMillis()).build();
+ compactionServer.compactionThreadManager.requestCompaction(compactionTask);
Review comment:
Sweet!
--
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]