wchevreuil commented on code in PR #7149:
URL: https://github.com/apache/hbase/pull/7149#discussion_r2242481172


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java:
##########
@@ -3661,4 +3661,28 @@ public FlushTableResponse flushTable(RpcController 
controller, FlushTableRequest
       throw new ServiceException(ioe);
     }
   }
+
+  @Override
+  public MasterProtos.RefreshHFilesResponse refreshHFiles(RpcController 
controller,
+    MasterProtos.RefreshHFilesRequest request) throws ServiceException {
+    // TODO Check if table exists otherwise send exception.
+    try {
+      Long procId;
+      if (request.hasTableName()) { // if we have provided table name as 
parameter
+        // refreshHfiles for the given user tables
+        procId = 
server.refreshHfiles(ProtobufUtil.toTableName(request.getTableName()),
+          request.getNonceGroup(), request.getNonce());
+      } else if (request.hasNamespace()) { // if we have provided namespace as 
parameter
+        // refreshHfiles for all the user tables under the namespace
+        procId =
+          server.refreshHfiles(request.getNamespace(), 
request.getNonceGroup(), request.getNonce());
+      } else { // When no parameter is provided
+        // refreshHfiles for all the user tables in HBase
+        procId = server.refreshHfiles(request.getNonceGroup(), 
request.getNonce());
+      }

Review Comment:
   nit: remove comments. The code itself is easy to follow.



-- 
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]

Reply via email to